[Intel-gfx] [RFC][PATCH 04/11] drm: Split the display info into static and dynamic parts
From: Ville Syrjälä Currently we have a mix of static and dynamic information stored in the display info structure. That makes it rather difficult to repopulate the dynamic parts when a new EDID appears. Let's make life easier by splitting the structure up into static and dynamic parts. The static part will consist of subpixel_order, panel_orientation, and bus_formats. Actually I'm not sure where bus_formats & co. fit in all this. For some drivers those seem to be static, even though they might fill them out from .get_modes(). For other drivers this stuff even gets frobbed at runtime, making it more some kind of a bastard encoder/connector state. I'll just stick it into the static side so that the behaviour doesn't change when I start clear out the entire dynamic state with memset(). Cc: Keith Packard Cc: Daniel Vetter Cc: Hans de Goede Cc: Shashank Sharma Cc: Stefan Agner Cc: Thierry Reding Cc: Boris Brezillon Cc: Philipp Zabel Cc: Laurent Pinchart Cc: Manfred Schlaegl Cc: Marek Vasut Cc: Archit Taneja Cc: Andrzej Hajda Cc: Alison Wang Cc: Eric Anholt Cc: Linus Walleij Cc: linux-renesas-...@vger.kernel.org Cc: Maxime Ripard Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 2 +- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 2 +- drivers/gpu/drm/bridge/sii902x.c | 2 +- drivers/gpu/drm/bridge/tc358767.c | 2 +- drivers/gpu/drm/drm_connector.c| 12 +- drivers/gpu/drm/drm_fb_helper.c| 2 +- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 2 +- drivers/gpu/drm/gma500/cdv_intel_hdmi.c| 2 +- drivers/gpu/drm/gma500/cdv_intel_lvds.c| 2 +- drivers/gpu/drm/gma500/mdfld_dsi_output.c | 2 +- drivers/gpu/drm/gma500/oaktrail_hdmi.c | 2 +- drivers/gpu/drm/gma500/oaktrail_lvds.c | 2 +- drivers/gpu/drm/gma500/psb_intel_lvds.c| 2 +- drivers/gpu/drm/gma500/psb_intel_sdvo.c| 2 +- drivers/gpu/drm/i915/i915_debugfs.c| 2 +- drivers/gpu/drm/i915/intel_dsi.c | 4 +- drivers/gpu/drm/i915/intel_dvo.c | 2 +- drivers/gpu/drm/i915/intel_lvds.c | 2 +- drivers/gpu/drm/i915/intel_sdvo.c | 2 +- drivers/gpu/drm/imx/imx-ldb.c | 4 +- drivers/gpu/drm/imx/parallel-display.c | 2 +- drivers/gpu/drm/mxsfb/mxsfb_crtc.c | 6 +- drivers/gpu/drm/panel/panel-arm-versatile.c| 2 +- drivers/gpu/drm/panel/panel-ilitek-ili9322.c | 8 +- drivers/gpu/drm/panel/panel-lvds.c | 4 +- .../gpu/drm/panel/panel-raspberrypi-touchscreen.c | 2 +- drivers/gpu/drm/panel/panel-seiko-43wvf1g.c| 4 +- drivers/gpu/drm/panel/panel-simple.c | 4 +- drivers/gpu/drm/pl111/pl111_display.c | 4 +- drivers/gpu/drm/radeon/radeon_connectors.c | 4 +- drivers/gpu/drm/rcar-du/rcar_du_encoder.c | 2 +- drivers/gpu/drm/sun4i/sun4i_tcon.c | 4 +- drivers/gpu/drm/tve200/tve200_display.c| 2 +- drivers/gpu/drm/vc4/vc4_dpi.c | 4 +- include/drm/drm_connector.h| 123 - 36 files changed, 125 insertions(+), 106 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c index 74d2efaec52f..1ba72dc2a85b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c @@ -1927,7 +1927,7 @@ amdgpu_connector_add(struct amdgpu_device *adev, } else connector->polled = DRM_CONNECTOR_POLL_HPD; - connector->display_info.subpixel_order = subpixel_order; + connector->static_display_info.subpixel_order = subpixel_order; drm_connector_register(connector); if (has_aux) diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c index 120dd3b26fc2..7e9f7f1ab1b1 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c @@ -639,7 +639,7 @@ static int dce_virtual_connector_encoder_init(struct amdgpu_device *adev, drm_connector_init(adev->ddev, connector, &dce_virtual_connector_funcs, DRM_MODE_CONNECTOR_VIRTUAL); drm_connector_helper_add(connector, &dce_virtual_connector_helper_funcs); - connector->display_info.subpixel_order = SubPixelHorizontalRGB; + connector->static_display_info.subpixel_order = SubPixelHorizontalRGB; connector->interlace_allowed = false; connector->doublescan_allowed = false; drm_connector_register(connector); diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c b/drivers/gpu/drm/atmel-hlcd
Re: [Intel-gfx] [RFC][PATCH 04/11] drm: Split the display info into static and dynamic parts
On Tue, Feb 27, 2018 at 02:56:53PM +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > Currently we have a mix of static and dynamic information stored in > the display info structure. That makes it rather difficult to repopulate > the dynamic parts when a new EDID appears. Let's make life easier by > splitting the structure up into static and dynamic parts. > > The static part will consist of subpixel_order, panel_orientation, > and bus_formats. > > Actually I'm not sure where bus_formats & co. fit in all this. For some > drivers those seem to be static, even though they might fill them out > from .get_modes(). For other drivers this stuff even gets frobbed at > runtime, making it more some kind of a bastard encoder/connector state. > I'll just stick it into the static side so that the behaviour doesn't > change when I start clear out the entire dynamic state with memset(). > > Cc: Keith Packard > Cc: Daniel Vetter > Cc: Hans de Goede > Cc: Shashank Sharma > Cc: Stefan Agner > Cc: Thierry Reding > Cc: Boris Brezillon > Cc: Philipp Zabel > Cc: Laurent Pinchart > Cc: Manfred Schlaegl > Cc: Marek Vasut > Cc: Archit Taneja > Cc: Andrzej Hajda > Cc: Alison Wang > Cc: Eric Anholt > Cc: Linus Walleij > Cc: linux-renesas-...@vger.kernel.org > Cc: Maxime Ripard For sun4i, Acked-by: Maxime Ripard Thanks! Maxime -- Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com signature.asc Description: PGP signature ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [RFC][PATCH 04/11] drm: Split the display info into static and dynamic parts
On Tue, 2018-02-27 at 14:56 +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > Currently we have a mix of static and dynamic information stored in > the display info structure. That makes it rather difficult to repopulate > the dynamic parts when a new EDID appears. Let's make life easier by > splitting the structure up into static and dynamic parts. > > The static part will consist of subpixel_order, panel_orientation, > and bus_formats. > > Actually I'm not sure where bus_formats & co. fit in all this. For some > drivers those seem to be static, even though they might fill them out > from .get_modes(). > > For other drivers this stuff even gets frobbed at > runtime, making it more some kind of a bastard encoder/connector state. > I'll just stick it into the static side so that the behaviour doesn't > change when I start clear out the entire dynamic state with memset(). [...] > drivers/gpu/drm/imx/imx-ldb.c | 4 +- > drivers/gpu/drm/imx/parallel-display.c | 2 +- For imx-drm, Acked-by: Philipp Zabel regards Philipp ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [RFC][PATCH 04/11] drm: Split the display info into static and dynamic parts
On Tuesday 27 February 2018 06:26 PM, Ville Syrjala wrote: From: Ville Syrjälä Currently we have a mix of static and dynamic information stored in the display info structure. That makes it rather difficult to repopulate the dynamic parts when a new EDID appears. Let's make life easier by splitting the structure up into static and dynamic parts. The static part will consist of subpixel_order, panel_orientation, and bus_formats. Actually I'm not sure where bus_formats & co. fit in all this. For some drivers those seem to be static, even though they might fill them out from .get_modes(). For other drivers this stuff even gets frobbed at runtime, making it more some kind of a bastard encoder/connector state. I'll just stick it into the static side so that the behaviour doesn't change when I start clear out the entire dynamic state with memset(). [...] diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c index b1ab4ab09532..abd0bce9c31e 100644 --- a/drivers/gpu/drm/bridge/sii902x.c +++ b/drivers/gpu/drm/bridge/sii902x.c @@ -174,7 +174,7 @@ static int sii902x_get_modes(struct drm_connector *connector) kfree(edid); } - ret = drm_display_info_set_bus_formats(&connector->display_info, + ret = drm_display_info_set_bus_formats(&connector->static_display_info, &bus_format, 1); if (ret) return ret; diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c index 08ab7d6aea65..042ded9ca749 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -1193,7 +1193,7 @@ static int tc_bridge_attach(struct drm_bridge *bridge) if (tc->panel) drm_panel_attach(tc->panel, &tc->connector); - drm_display_info_set_bus_formats(&tc->connector.display_info, + drm_display_info_set_bus_formats(&tc->connector.static_display_info, &bus_format, 1); drm_mode_connector_attach_encoder(&tc->connector, tc->bridge.encoder); The sii902x driver sets the bus_formats in get_modes, but it's a fixed value and we may as well do it in bridge's attach op. For the bridge drivers: Reviewed-by: Archit Taneja Thanks, Archit ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [RFC][PATCH 04/11] drm: Split the display info into static and dynamic parts
for I915: Acked-by: Shashank Sharma Regards Shashank On 2/27/2018 6:26 PM, Ville Syrjala wrote: From: Ville Syrjälä Currently we have a mix of static and dynamic information stored in the display info structure. That makes it rather difficult to repopulate the dynamic parts when a new EDID appears. Let's make life easier by splitting the structure up into static and dynamic parts. The static part will consist of subpixel_order, panel_orientation, and bus_formats. Actually I'm not sure where bus_formats & co. fit in all this. For some drivers those seem to be static, even though they might fill them out from .get_modes(). For other drivers this stuff even gets frobbed at runtime, making it more some kind of a bastard encoder/connector state. I'll just stick it into the static side so that the behaviour doesn't change when I start clear out the entire dynamic state with memset(). Cc: Keith Packard Cc: Daniel Vetter Cc: Hans de Goede Cc: Shashank Sharma Cc: Stefan Agner Cc: Thierry Reding Cc: Boris Brezillon Cc: Philipp Zabel Cc: Laurent Pinchart Cc: Manfred Schlaegl Cc: Marek Vasut Cc: Archit Taneja Cc: Andrzej Hajda Cc: Alison Wang Cc: Eric Anholt Cc: Linus Walleij Cc: linux-renesas-...@vger.kernel.org Cc: Maxime Ripard Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 2 +- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 2 +- drivers/gpu/drm/bridge/sii902x.c | 2 +- drivers/gpu/drm/bridge/tc358767.c | 2 +- drivers/gpu/drm/drm_connector.c| 12 +- drivers/gpu/drm/drm_fb_helper.c| 2 +- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 2 +- drivers/gpu/drm/gma500/cdv_intel_hdmi.c| 2 +- drivers/gpu/drm/gma500/cdv_intel_lvds.c| 2 +- drivers/gpu/drm/gma500/mdfld_dsi_output.c | 2 +- drivers/gpu/drm/gma500/oaktrail_hdmi.c | 2 +- drivers/gpu/drm/gma500/oaktrail_lvds.c | 2 +- drivers/gpu/drm/gma500/psb_intel_lvds.c| 2 +- drivers/gpu/drm/gma500/psb_intel_sdvo.c| 2 +- drivers/gpu/drm/i915/i915_debugfs.c| 2 +- drivers/gpu/drm/i915/intel_dsi.c | 4 +- drivers/gpu/drm/i915/intel_dvo.c | 2 +- drivers/gpu/drm/i915/intel_lvds.c | 2 +- drivers/gpu/drm/i915/intel_sdvo.c | 2 +- drivers/gpu/drm/imx/imx-ldb.c | 4 +- drivers/gpu/drm/imx/parallel-display.c | 2 +- drivers/gpu/drm/mxsfb/mxsfb_crtc.c | 6 +- drivers/gpu/drm/panel/panel-arm-versatile.c| 2 +- drivers/gpu/drm/panel/panel-ilitek-ili9322.c | 8 +- drivers/gpu/drm/panel/panel-lvds.c | 4 +- .../gpu/drm/panel/panel-raspberrypi-touchscreen.c | 2 +- drivers/gpu/drm/panel/panel-seiko-43wvf1g.c| 4 +- drivers/gpu/drm/panel/panel-simple.c | 4 +- drivers/gpu/drm/pl111/pl111_display.c | 4 +- drivers/gpu/drm/radeon/radeon_connectors.c | 4 +- drivers/gpu/drm/rcar-du/rcar_du_encoder.c | 2 +- drivers/gpu/drm/sun4i/sun4i_tcon.c | 4 +- drivers/gpu/drm/tve200/tve200_display.c| 2 +- drivers/gpu/drm/vc4/vc4_dpi.c | 4 +- include/drm/drm_connector.h| 123 - 36 files changed, 125 insertions(+), 106 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c index 74d2efaec52f..1ba72dc2a85b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c @@ -1927,7 +1927,7 @@ amdgpu_connector_add(struct amdgpu_device *adev, } else connector->polled = DRM_CONNECTOR_POLL_HPD; - connector->display_info.subpixel_order = subpixel_order; + connector->static_display_info.subpixel_order = subpixel_order; drm_connector_register(connector); if (has_aux) diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c index 120dd3b26fc2..7e9f7f1ab1b1 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c @@ -639,7 +639,7 @@ static int dce_virtual_connector_encoder_init(struct amdgpu_device *adev, drm_connector_init(adev->ddev, connector, &dce_virtual_connector_funcs, DRM_MODE_CONNECTOR_VIRTUAL); drm_connector_helper_add(connector, &dce_virtual_connector_helper_funcs); - connector->display_info.subpixel_order = SubPixelHorizontalRGB; + connector->static_display_info.subpixel_order = SubPixelHorizontalRGB; connector->interlace_allowed = false; connector->doublescan_allowed = false;
Re: [Intel-gfx] [RFC][PATCH 04/11] drm: Split the display info into static and dynamic parts
On 27.02.2018 13:56, Ville Syrjala wrote: > From: Ville Syrjälä > > Currently we have a mix of static and dynamic information stored in > the display info structure. That makes it rather difficult to repopulate > the dynamic parts when a new EDID appears. Let's make life easier by > splitting the structure up into static and dynamic parts. > > The static part will consist of subpixel_order, panel_orientation, > and bus_formats. > > Actually I'm not sure where bus_formats & co. fit in all this. For some > drivers those seem to be static, even though they might fill them out > from .get_modes(). For other drivers this stuff even gets frobbed at > runtime, making it more some kind of a bastard encoder/connector state. > I'll just stick it into the static side so that the behaviour doesn't > change when I start clear out the entire dynamic state with memset(). Back when I introduced bus flags it was meant to be a static information. So for the general idea/drm_connector.h: Reviewed-by: Stefan Agner [...] > drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 2 +- For fsl-dcu: Acked-by: Stefan Agner -- Stefan > drivers/gpu/drm/gma500/cdv_intel_hdmi.c| 2 +- > drivers/gpu/drm/gma500/cdv_intel_lvds.c| 2 +- > drivers/gpu/drm/gma500/mdfld_dsi_output.c | 2 +- > drivers/gpu/drm/gma500/oaktrail_hdmi.c | 2 +- > drivers/gpu/drm/gma500/oaktrail_lvds.c | 2 +- > drivers/gpu/drm/gma500/psb_intel_lvds.c| 2 +- > drivers/gpu/drm/gma500/psb_intel_sdvo.c| 2 +- > drivers/gpu/drm/i915/i915_debugfs.c| 2 +- > drivers/gpu/drm/i915/intel_dsi.c | 4 +- > drivers/gpu/drm/i915/intel_dvo.c | 2 +- > drivers/gpu/drm/i915/intel_lvds.c | 2 +- > drivers/gpu/drm/i915/intel_sdvo.c | 2 +- > drivers/gpu/drm/imx/imx-ldb.c | 4 +- > drivers/gpu/drm/imx/parallel-display.c | 2 +- > drivers/gpu/drm/mxsfb/mxsfb_crtc.c | 6 +- > drivers/gpu/drm/panel/panel-arm-versatile.c| 2 +- > drivers/gpu/drm/panel/panel-ilitek-ili9322.c | 8 +- > drivers/gpu/drm/panel/panel-lvds.c | 4 +- > .../gpu/drm/panel/panel-raspberrypi-touchscreen.c | 2 +- > drivers/gpu/drm/panel/panel-seiko-43wvf1g.c| 4 +- > drivers/gpu/drm/panel/panel-simple.c | 4 +- > drivers/gpu/drm/pl111/pl111_display.c | 4 +- > drivers/gpu/drm/radeon/radeon_connectors.c | 4 +- > drivers/gpu/drm/rcar-du/rcar_du_encoder.c | 2 +- > drivers/gpu/drm/sun4i/sun4i_tcon.c | 4 +- > drivers/gpu/drm/tve200/tve200_display.c| 2 +- > drivers/gpu/drm/vc4/vc4_dpi.c | 4 +- > include/drm/drm_connector.h| 123 > - > 36 files changed, 125 insertions(+), 106 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c > index 74d2efaec52f..1ba72dc2a85b 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c > @@ -1927,7 +1927,7 @@ amdgpu_connector_add(struct amdgpu_device *adev, > } else > connector->polled = DRM_CONNECTOR_POLL_HPD; > > - connector->display_info.subpixel_order = subpixel_order; > + connector->static_display_info.subpixel_order = subpixel_order; > drm_connector_register(connector); > > if (has_aux) > diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c > b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c > index 120dd3b26fc2..7e9f7f1ab1b1 100644 > --- a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c > +++ b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c > @@ -639,7 +639,7 @@ static int > dce_virtual_connector_encoder_init(struct amdgpu_device *adev, > drm_connector_init(adev->ddev, connector, &dce_virtual_connector_funcs, > DRM_MODE_CONNECTOR_VIRTUAL); > drm_connector_helper_add(connector, > &dce_virtual_connector_helper_funcs); > - connector->display_info.subpixel_order = SubPixelHorizontalRGB; > + connector->static_display_info.subpixel_order = SubPixelHorizontalRGB; > connector->interlace_allowed = false; > connector->doublescan_allowed = false; > drm_connector_register(connector); > diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c > b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c > index d73281095fac..2d18c8ef22a0 100644 > --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c > +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c > @@ -238,7 +238,7 @@ static int > atmel_hlcdc_crtc_select_output_mode(struct drm_crtc_state *state) > crtc = drm_crtc_to_atmel_hlcdc_crtc(state->crtc); > > for_each_new_connector_in_state(state->state, connector, cstate, i) { > - struct drm_display_in
Re: [Intel-gfx] [RFC][PATCH 04/11] drm: Split the display info into static and dynamic parts
On Tue, Feb 27, 2018 at 7:56 AM, Ville Syrjala wrote: > From: Ville Syrjälä > > Currently we have a mix of static and dynamic information stored in > the display info structure. That makes it rather difficult to repopulate > the dynamic parts when a new EDID appears. Let's make life easier by > splitting the structure up into static and dynamic parts. > > The static part will consist of subpixel_order, panel_orientation, > and bus_formats. > > Actually I'm not sure where bus_formats & co. fit in all this. For some > drivers those seem to be static, even though they might fill them out > from .get_modes(). For other drivers this stuff even gets frobbed at > runtime, making it more some kind of a bastard encoder/connector state. > I'll just stick it into the static side so that the behaviour doesn't > change when I start clear out the entire dynamic state with memset(). > > Cc: Keith Packard > Cc: Daniel Vetter > Cc: Hans de Goede > Cc: Shashank Sharma > Cc: Stefan Agner > Cc: Thierry Reding > Cc: Boris Brezillon > Cc: Philipp Zabel > Cc: Laurent Pinchart > Cc: Manfred Schlaegl > Cc: Marek Vasut > Cc: Archit Taneja > Cc: Andrzej Hajda > Cc: Alison Wang > Cc: Eric Anholt > Cc: Linus Walleij > Cc: linux-renesas-...@vger.kernel.org > Cc: Maxime Ripard > Signed-off-by: Ville Syrjälä Acked-by: Alex Deucher ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [RFC][PATCH 04/11] drm: Split the display info into static and dynamic parts
On Tue, Feb 27, 2018 at 1:56 PM, Ville Syrjala wrote: > From: Ville Syrjälä > > Currently we have a mix of static and dynamic information stored in > the display info structure. That makes it rather difficult to repopulate > the dynamic parts when a new EDID appears. Let's make life easier by > splitting the structure up into static and dynamic parts. > > The static part will consist of subpixel_order, panel_orientation, > and bus_formats. > > Actually I'm not sure where bus_formats & co. fit in all this. For some > drivers those seem to be static, even though they might fill them out > from .get_modes(). For other drivers this stuff even gets frobbed at > runtime, making it more some kind of a bastard encoder/connector state. > I'll just stick it into the static side so that the behaviour doesn't > change when I start clear out the entire dynamic state with memset(). > > Cc: Keith Packard > Cc: Daniel Vetter > Cc: Hans de Goede > Cc: Shashank Sharma > Cc: Stefan Agner > Cc: Thierry Reding > Cc: Boris Brezillon > Cc: Philipp Zabel > Cc: Laurent Pinchart > Cc: Manfred Schlaegl > Cc: Marek Vasut > Cc: Archit Taneja > Cc: Andrzej Hajda > Cc: Alison Wang > Cc: Eric Anholt > Cc: Linus Walleij > Cc: linux-renesas-...@vger.kernel.org > Cc: Maxime Ripard > Signed-off-by: Ville Syrjälä Acked-by: Linus Walleij Yours, Linus Walleij ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [RFC][PATCH 04/11] drm: Split the display info into static and dynamic parts
On Tue, Feb 27, 2018 at 02:56:53PM +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > Currently we have a mix of static and dynamic information stored in > the display info structure. That makes it rather difficult to repopulate > the dynamic parts when a new EDID appears. Let's make life easier by > splitting the structure up into static and dynamic parts. > > The static part will consist of subpixel_order, panel_orientation, > and bus_formats. > > Actually I'm not sure where bus_formats & co. fit in all this. For some > drivers those seem to be static, even though they might fill them out > from .get_modes(). For other drivers this stuff even gets frobbed at > runtime, making it more some kind of a bastard encoder/connector state. > I'll just stick it into the static side so that the behaviour doesn't > change when I start clear out the entire dynamic state with memset(). If we go with my suggestion for the next patch to not reset display info for panels, then this problem disappears. Because all the stuff you identified as static is relevant for panels, and for panels _everything_ is static. I think with the next patch changed per my suggestion you could drop this one here outright, and still retain all the benefits of your cleanup. -Daniel > > Cc: Keith Packard > Cc: Daniel Vetter > Cc: Hans de Goede > Cc: Shashank Sharma > Cc: Stefan Agner > Cc: Thierry Reding > Cc: Boris Brezillon > Cc: Philipp Zabel > Cc: Laurent Pinchart > Cc: Manfred Schlaegl > Cc: Marek Vasut > Cc: Archit Taneja > Cc: Andrzej Hajda > Cc: Alison Wang > Cc: Eric Anholt > Cc: Linus Walleij > Cc: linux-renesas-...@vger.kernel.org > Cc: Maxime Ripard > Signed-off-by: Ville Syrjälä > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 2 +- > drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 2 +- > drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 2 +- > drivers/gpu/drm/bridge/sii902x.c | 2 +- > drivers/gpu/drm/bridge/tc358767.c | 2 +- > drivers/gpu/drm/drm_connector.c| 12 +- > drivers/gpu/drm/drm_fb_helper.c| 2 +- > drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 2 +- > drivers/gpu/drm/gma500/cdv_intel_hdmi.c| 2 +- > drivers/gpu/drm/gma500/cdv_intel_lvds.c| 2 +- > drivers/gpu/drm/gma500/mdfld_dsi_output.c | 2 +- > drivers/gpu/drm/gma500/oaktrail_hdmi.c | 2 +- > drivers/gpu/drm/gma500/oaktrail_lvds.c | 2 +- > drivers/gpu/drm/gma500/psb_intel_lvds.c| 2 +- > drivers/gpu/drm/gma500/psb_intel_sdvo.c| 2 +- > drivers/gpu/drm/i915/i915_debugfs.c| 2 +- > drivers/gpu/drm/i915/intel_dsi.c | 4 +- > drivers/gpu/drm/i915/intel_dvo.c | 2 +- > drivers/gpu/drm/i915/intel_lvds.c | 2 +- > drivers/gpu/drm/i915/intel_sdvo.c | 2 +- > drivers/gpu/drm/imx/imx-ldb.c | 4 +- > drivers/gpu/drm/imx/parallel-display.c | 2 +- > drivers/gpu/drm/mxsfb/mxsfb_crtc.c | 6 +- > drivers/gpu/drm/panel/panel-arm-versatile.c| 2 +- > drivers/gpu/drm/panel/panel-ilitek-ili9322.c | 8 +- > drivers/gpu/drm/panel/panel-lvds.c | 4 +- > .../gpu/drm/panel/panel-raspberrypi-touchscreen.c | 2 +- > drivers/gpu/drm/panel/panel-seiko-43wvf1g.c| 4 +- > drivers/gpu/drm/panel/panel-simple.c | 4 +- > drivers/gpu/drm/pl111/pl111_display.c | 4 +- > drivers/gpu/drm/radeon/radeon_connectors.c | 4 +- > drivers/gpu/drm/rcar-du/rcar_du_encoder.c | 2 +- > drivers/gpu/drm/sun4i/sun4i_tcon.c | 4 +- > drivers/gpu/drm/tve200/tve200_display.c| 2 +- > drivers/gpu/drm/vc4/vc4_dpi.c | 4 +- > include/drm/drm_connector.h| 123 > - > 36 files changed, 125 insertions(+), 106 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c > index 74d2efaec52f..1ba72dc2a85b 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c > @@ -1927,7 +1927,7 @@ amdgpu_connector_add(struct amdgpu_device *adev, > } else > connector->polled = DRM_CONNECTOR_POLL_HPD; > > - connector->display_info.subpixel_order = subpixel_order; > + connector->static_display_info.subpixel_order = subpixel_order; > drm_connector_register(connector); > > if (has_aux) > diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c > b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c > index 120dd3b26fc2..7e9f7f1ab1b1 100644 > --- a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c > +++ b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c > @@ -639,7 +639,7 @@ static int dce_virtual_connector_encoder_init(s