]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
drm/i915: Clean up connector->*_allowed setup
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 12 Sep 2022 11:18:11 +0000 (14:18 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 26 Sep 2022 14:08:01 +0000 (17:08 +0300)
All the connectors are zero initialized so no need to clear
the *_allowed flags we don't support. Only leave the ones we want
to set. And while at it switch to booleans instead of ints.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220912111814.17466-13-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/icl_dsi.c
drivers/gpu/drm/i915/display/intel_crt.c
drivers/gpu/drm/i915/display/intel_dp.c
drivers/gpu/drm/i915/display/intel_dvo.c
drivers/gpu/drm/i915/display/intel_hdmi.c
drivers/gpu/drm/i915/display/intel_lvds.c
drivers/gpu/drm/i915/display/intel_sdvo.c
drivers/gpu/drm/i915/display/intel_tv.c
drivers/gpu/drm/i915/display/vlv_dsi.c

index 59546cbcaeda985fd94d416025f931bd62690565..47f13750f6fa66716cb6a3342473cc0c07c9fdb1 100644 (file)
@@ -2038,8 +2038,6 @@ void icl_dsi_init(struct drm_i915_private *dev_priv)
                           DRM_MODE_CONNECTOR_DSI);
        drm_connector_helper_add(connector, &gen11_dsi_connector_helper_funcs);
        connector->display_info.subpixel_order = SubPixelHorizontalRGB;
-       connector->interlace_allowed = false;
-       connector->doublescan_allowed = false;
        intel_connector->get_hw_state = intel_connector_get_hw_state;
 
        /* attach connector to encoder */
index eba58345619a02ae119fc0e60ee7b9cbda766c3f..94d0a5e1dd0309136e1ff20e630e00157a416367 100644 (file)
@@ -1050,11 +1050,8 @@ void intel_crt_init(struct drm_i915_private *dev_priv)
        else
                crt->base.pipe_mask = ~0;
 
-       if (DISPLAY_VER(dev_priv) == 2)
-               connector->interlace_allowed = 0;
-       else
-               connector->interlace_allowed = 1;
-       connector->doublescan_allowed = 0;
+       if (DISPLAY_VER(dev_priv) != 2)
+               connector->interlace_allowed = true;
 
        crt->adpa_reg = adpa_reg;
 
index 0d195f8b190ae368cf84406b00335f2f3baeddb0..ecde1fd41726bc11846881592e7cbcf5884c3c95 100644 (file)
@@ -5411,7 +5411,6 @@ intel_dp_init_connector(struct intel_digital_port *dig_port,
 
        if (!HAS_GMCH(dev_priv))
                connector->interlace_allowed = true;
-       connector->doublescan_allowed = 0;
 
        intel_connector->polled = DRM_CONNECTOR_POLL_HPD;
 
index 167c9b7318f8610a0a014c0349253fcc8e48231d..595087288922501a8ec3c86d78a0abbf047d83f0 100644 (file)
@@ -515,8 +515,6 @@ void intel_dvo_init(struct drm_i915_private *dev_priv)
                drm_connector_helper_add(connector,
                                         &intel_dvo_connector_helper_funcs);
                connector->display_info.subpixel_order = SubPixelHorizontalRGB;
-               connector->interlace_allowed = false;
-               connector->doublescan_allowed = false;
 
                intel_connector_attach_encoder(intel_connector, intel_encoder);
                if (dvo->type == INTEL_DVO_CHIP_LVDS) {
index 7816b2a33feeb76b0ec805f53642c2c43aa13c79..93519fb23d9dc6ff9db208e9d44ba38dbc1eb3bf 100644 (file)
@@ -2956,9 +2956,8 @@ void intel_hdmi_init_connector(struct intel_digital_port *dig_port,
                                    ddc);
        drm_connector_helper_add(connector, &intel_hdmi_connector_helper_funcs);
 
-       connector->interlace_allowed = 1;
-       connector->doublescan_allowed = 0;
-       connector->stereo_allowed = 1;
+       connector->interlace_allowed = true;
+       connector->stereo_allowed = true;
 
        if (DISPLAY_VER(dev_priv) >= 10)
                connector->ycbcr_420_allowed = true;
index 951170af7bb3bea4e52f27f3b19263c2b93756b8..270368b43729b0cb729e606c641e780bef99b8cb 100644 (file)
@@ -924,8 +924,6 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)
 
        drm_connector_helper_add(connector, &intel_lvds_connector_helper_funcs);
        connector->display_info.subpixel_order = SubPixelHorizontalRGB;
-       connector->interlace_allowed = false;
-       connector->doublescan_allowed = false;
 
        lvds_encoder->reg = lvds_reg;
 
index f5b744bef18ffe974a5b41b3ae0fd49002c24f00..2a99ec7ff737c7ab73af61d869035afbf839ec1b 100644 (file)
@@ -2689,9 +2689,8 @@ intel_sdvo_connector_init(struct intel_sdvo_connector *connector,
        drm_connector_helper_add(drm_connector,
                                 &intel_sdvo_connector_helper_funcs);
 
-       connector->base.base.interlace_allowed = 1;
-       connector->base.base.doublescan_allowed = 0;
        connector->base.base.display_info.subpixel_order = SubPixelHorizontalRGB;
+       connector->base.base.interlace_allowed = true;
        connector->base.get_hw_state = intel_sdvo_connector_get_hw_state;
 
        intel_connector_attach_encoder(&connector->base, &encoder->base);
index 2b985bfc7fc24489dbbeab01e33f75c53c4b5d4a..b2e93c2ad8f32dbaabed25f648d026318a04f6b5 100644 (file)
@@ -2013,8 +2013,6 @@ intel_tv_init(struct drm_i915_private *dev_priv)
        intel_tv->type = DRM_MODE_CONNECTOR_Unknown;
 
        drm_connector_helper_add(connector, &intel_tv_connector_helper_funcs);
-       connector->interlace_allowed = false;
-       connector->doublescan_allowed = false;
 
        intel_tv_add_properties(connector);
 }
index 421ad02f8e9be96218199e7ee07aad311153bd8b..dee0147a316ce77b3f618858622c8256032752e7 100644 (file)
@@ -1971,8 +1971,6 @@ void vlv_dsi_init(struct drm_i915_private *dev_priv)
        drm_connector_helper_add(connector, &intel_dsi_connector_helper_funcs);
 
        connector->display_info.subpixel_order = SubPixelHorizontalRGB; /*XXX*/
-       connector->interlace_allowed = false;
-       connector->doublescan_allowed = false;
 
        intel_connector_attach_encoder(intel_connector, intel_encoder);