acquire ctx for everyone!
Subsystems (37)
cover acquire ctx for everyone!
Hi all,
This is the final bits of my cleanup work to get rid of the implicit acquire context for atomic drivers. This handles the property stuff by essentially just ripping it all out, after 20+ drivers I don't see any need for a driver to overwrite anything here. Except omapdrm, and that is handled within the existing framework already.
Besides removing a pile of code another upshot of this work is that a set_property call for atomic driver now only takes the locks it needs, the same way like the atomic ioctl.
Leftover bits (I should probably put them into a todo.rst entry):
- Convert vmwgfx over to the fbdev helpers since their current hand-rolled ones get this all wrong.
- Add an explicit acquire_ctx to drm_modeset_(un)lock_all and nuke the GFP_ATOMIC allocation.
- Also clean up the get_property paths a bit more, would be nice if we wouldn't need to have to take all the locks for atomic drivers.
But already with this we're guaranteed that all core and helper paths pass around the acquire_ctx correctly, which means drivers can now start to use their own internal drm_modeset_locks for private data structures.
Cheers, Daniel
Daniel Vetter (8):
drm/omap: Simplify the rotation-on-crtc hack
drm: Don't update property values for atomic drivers
drm: Handle properties in the core for atomic drivers
drm: Nuke drm_atomic_helper_crtc_set_property
drm: Nuke drm_atomic_helper_plane_set_property
drm: Nuke drm_atomic_helper_connector_set_property
drm: Nuke drm_atomic_helper_connector_dpms
drm: Nuke drm_atomic_legacy_backoff
drivers/gpu/drm/arm/malidp_planes.c | 1 - drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 1 - drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 1 - drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 1 - drivers/gpu/drm/bridge/analogix-anx78xx.c | 1 - drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 1 - drivers/gpu/drm/bridge/dumb-vga-dac.c | 1 - .../drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c | 1 - drivers/gpu/drm/bridge/nxp-ptn3460.c | 1 - drivers/gpu/drm/bridge/panel.c | 1 - drivers/gpu/drm/bridge/parade-ps8622.c | 1 - drivers/gpu/drm/bridge/sii902x.c | 1 - drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 1 - drivers/gpu/drm/bridge/tc358767.c | 1 - drivers/gpu/drm/bridge/ti-tfp410.c | 1 - drivers/gpu/drm/drm_atomic.c | 98 ++++---- drivers/gpu/drm/drm_atomic_helper.c | 248 --------------------- drivers/gpu/drm/drm_connector.c | 9 +- drivers/gpu/drm/drm_crtc.c | 2 +- drivers/gpu/drm/drm_crtc_helper.c | 3 +- drivers/gpu/drm/drm_crtc_internal.h | 7 + drivers/gpu/drm/drm_mode_object.c | 159 +++++++++---- drivers/gpu/drm/drm_plane.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_dpi.c | 1 - drivers/gpu/drm/exynos/exynos_drm_dsi.c | 1 - drivers/gpu/drm/exynos/exynos_drm_plane.c | 1 - drivers/gpu/drm/exynos/exynos_drm_vidi.c | 1 - drivers/gpu/drm/exynos/exynos_hdmi.c | 1 - drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c | 1 - drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 1 - drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 1 - drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 2 - drivers/gpu/drm/i2c/tda998x_drv.c | 10 +- drivers/gpu/drm/i915/intel_crt.c | 2 - drivers/gpu/drm/i915/intel_display.c | 3 - drivers/gpu/drm/i915/intel_dp.c | 2 - drivers/gpu/drm/i915/intel_dp_mst.c | 2 - drivers/gpu/drm/i915/intel_dsi.c | 2 - drivers/gpu/drm/i915/intel_dvo.c | 2 - drivers/gpu/drm/i915/intel_hdmi.c | 2 - drivers/gpu/drm/i915/intel_lvds.c | 2 - drivers/gpu/drm/i915/intel_sdvo.c | 2 - drivers/gpu/drm/i915/intel_tv.c | 2 - drivers/gpu/drm/imx/imx-ldb.c | 1 - drivers/gpu/drm/imx/imx-tve.c | 1 - drivers/gpu/drm/imx/parallel-display.c | 1 - drivers/gpu/drm/mediatek/mtk_dsi.c | 1 - drivers/gpu/drm/mediatek/mtk_hdmi.c | 1 - drivers/gpu/drm/meson/meson_venc_cvbs.c | 1 - drivers/gpu/drm/msm/dsi/dsi_manager.c | 1 - drivers/gpu/drm/msm/edp/edp_connector.c | 1 - drivers/gpu/drm/msm/hdmi/hdmi_connector.c | 1 - drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c | 1 - drivers/gpu/drm/msm/mdp/mdp4/mdp4_lvds_connector.c | 1 - drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 2 - drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 2 - drivers/gpu/drm/mxsfb/mxsfb_out.c | 1 - drivers/gpu/drm/nouveau/nouveau_connector.c | 15 +- drivers/gpu/drm/nouveau/nv50_display.c | 4 - drivers/gpu/drm/omapdrm/omap_connector.c | 1 - drivers/gpu/drm/omapdrm/omap_crtc.c | 65 +++--- drivers/gpu/drm/omapdrm/omap_plane.c | 1 - drivers/gpu/drm/pl111/pl111_connector.c | 1 - drivers/gpu/drm/rcar-du/rcar_du_lvdscon.c | 1 - drivers/gpu/drm/rcar-du/rcar_du_plane.c | 1 - drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 1 - drivers/gpu/drm/rockchip/cdn-dp-core.c | 1 - drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 1 - drivers/gpu/drm/rockchip/inno_hdmi.c | 1 - drivers/gpu/drm/sti/sti_cursor.c | 1 - drivers/gpu/drm/sti/sti_dvo.c | 1 - drivers/gpu/drm/sti/sti_gdp.c | 1 - drivers/gpu/drm/sti/sti_hda.c | 1 - drivers/gpu/drm/sti/sti_hdmi.c | 2 - drivers/gpu/drm/sti/sti_hqvdp.c | 1 - drivers/gpu/drm/stm/ltdc.c | 1 - drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 1 - drivers/gpu/drm/sun4i/sun4i_rgb.c | 1 - drivers/gpu/drm/sun4i/sun4i_tv.c | 1 - drivers/gpu/drm/tegra/dsi.c | 1 - drivers/gpu/drm/tegra/hdmi.c | 1 - drivers/gpu/drm/tegra/rgb.c | 1 - drivers/gpu/drm/tegra/sor.c | 1 - drivers/gpu/drm/tilcdc/tilcdc_panel.c | 1 - drivers/gpu/drm/tilcdc/tilcdc_plane.c | 1 - drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 1 - drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c | 1 - drivers/gpu/drm/vc4/vc4_hdmi.c | 1 - drivers/gpu/drm/vc4/vc4_vec.c | 2 - drivers/gpu/drm/virtio/virtgpu_display.c | 1 - drivers/gpu/drm/zte/zx_hdmi.c | 1 - drivers/gpu/drm/zte/zx_tvenc.c | 1 - drivers/gpu/drm/zte/zx_vga.c | 1 - include/drm/drm_atomic.h | 8 - include/drm/drm_atomic_helper.h | 11 - include/drm/drm_connector.h | 10 +- include/drm/drm_crtc.h | 6 +- include/drm/drm_plane.h | 6 +- 98 files changed, 224 insertions(+), 536 deletions(-)
Signature · 6 lines
2.13.3 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 1/8 drm/omap: Simplify the rotation-on-crtc hack
I want/need to rework the core property handling, and this hack is getting in the way. But since it's a non-standard propety only used by legacy userspace we know that this will only every be called from ioctl code. And never on some other free-standing state struct, where this old hack wouldn't work either.
v2: don't forget zorder and get_property!
--- drivers/gpu/drm/omapdrm/omap_crtc.c | 64 ++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 36 deletions(-)
drivers/gpu/drm/omapdrm/omap_crtc.c +28 -36
@@ -498,39 +498,30 @@ static void omap_crtc_atomic_flush(struct drm_crtc *crtc,spin_unlock_irq (&crtc->dev->event_lock); } -static bool omap_crtc_is_plane_prop (struct drm_crtc *crtc, -struct drm_property *property) -{ -struct drm_device *dev = crtc->dev; -struct omap_drm_private *priv = dev->dev_private; - -return property == priv->zorder_prop || - property == crtc->primary->rotation_property; -} -static int omap_crtc_atomic_set_property (struct drm_crtc *crtc,struct drm_crtc_state *state,struct drm_property *property,uint64_t val) { -if (omap_crtc_is_plane_prop (crtc, property)) { -struct drm_plane_state *plane_state; -struct drm_plane *plane = crtc->primary; - -/* -* Delegate property set to the primary plane. Get the plane -* state and set the property directly. -*/ - - plane_state =drm_atomic_get_plane_state (state->state, plane); -if (IS_ERR (plane_state)) -return PTR_ERR (plane_state); +struct omap_drm_private *priv = crtc->dev->dev_private; +struct drm_plane_state *plane_state; -return drm_atomic_plane_set_property (plane, plane_state, - property, val); - } +/* +* Delegate property set to the primary plane. Get the plane +* state and set the property directly. +*/ + plane_state =drm_atomic_get_plane_state (state->state, crtc->primary); +if (IS_ERR (plane_state)) +return PTR_ERR (plane_state); + +if (property == crtc->primary->rotation_property) + plane_state->rotation = val; +else if (property == priv->zorder_prop) + plane_state->zpos = val; +else +return -EINVAL ; -return -EINVAL ; +return 0 ; } static int omap_crtc_atomic_get_property(struct drm_crtc *crtc,
@@ -538,16 +529,17 @@ static int omap_crtc_atomic_get_property(struct drm_crtc *crtc,struct drm_property *property, uint64_t *val) { - if (omap_crtc_is_plane_prop(crtc, property)) { -/* -* Delegate property get to the primary plane. The -* drm_atomic_plane_get_property() function isn't exported, but -* can be called through drm_object_property_get_value() as that -* will call drm_atomic_get_property() for atomic drivers. -*/ -return drm_object_property_get_value (&crtc->primary->base, - property, val); - } + struct omap_drm_private *priv = crtc->dev->dev_private; + +/* +* Remap to the plane rotation/zorder property. We can peek at the plane +* state directly since holding the crtc locks gives you a read-lock on +* the plane state. +*/ +if (property == crtc->primary->rotation_property) +return crtc->primary->state->rotation; +else if (property == priv->zorder_prop) +return crtc->primary->state->zpos;return -EINVAL ; }
Signature · 6 lines
2.13.3 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Maarten Lankhorst
maintainerRe: [PATCH 1/8] drm/omap: Simplify the rotation-on-crtc hack
Op 25-07-17 om 10:01 schreef Daniel Vetter:
Quoted 94 lines
I want/need to rework the core property handling, and this hack is getting in the way. But since it's a non-standard propety only used by legacy userspace we know that this will only every be called from ioctl code. And never on some other free-standing state struct, where this old hack wouldn't work either.
v2: don't forget zorder and
get_property!Cc Tomi Valkeinen <[email protected]Cc Laurent Pinchart <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- drivers/gpu/drm/omapdrm/omap_crtc.c | 64 ++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 36 deletions(-)drivers/gpu/drm/omapdrm/omap_crtc.c +21
-36@@ -498,39 +498,30 @@ static void omap_crtc_atomic_flush(struct drm_crtc *crtc,spin_unlock_irq (&crtc->dev->event_lock); } -static bool omap_crtc_is_plane_prop (struct drm_crtc *crtc, -struct drm_property *property) -{ -struct drm_device *dev = crtc->dev; -struct omap_drm_private *priv = dev->dev_private; - -return property == priv->zorder_prop || - property == crtc->primary->rotation_property; -} -static int omap_crtc_atomic_set_property (struct drm_crtc *crtc,struct drm_crtc_state *state,struct drm_property *property,uint64_t val) { -if (omap_crtc_is_plane_prop (crtc, property)) { -struct drm_plane_state *plane_state; -struct drm_plane *plane = crtc->primary; - -/* -* Delegate property set to the primary plane. Get the plane -* state and set the property directly. -*/ - - plane_state =drm_atomic_get_plane_state (state->state, plane); -if (IS_ERR (plane_state)) -return PTR_ERR (plane_state); +struct omap_drm_private *priv = crtc->dev->dev_private; +struct drm_plane_state *plane_state; -return drm_atomic_plane_set_property (plane, plane_state, - property, val); - } +/* +* Delegate property set to the primary plane. Get the plane +* state and set the property directly. +*/ + plane_state =drm_atomic_get_plane_state (state->state, crtc->primary); +if (IS_ERR (plane_state)) +return PTR_ERR (plane_state); + +if (property == crtc->primary->rotation_property) + plane_state->rotation = val; +else if (property == priv->zorder_prop) + plane_state->zpos = val; +else +return -EINVAL ; -return -EINVAL ; +return 0 ; } static int omap_crtc_atomic_get_property(struct drm_crtc *crtc,@@ -538,16 +529,17 @@ static int omap_crtc_atomic_get_property(struct drm_crtc *crtc,struct drm_property *property, uint64_t *val) { - if (omap_crtc_is_plane_prop(crtc, property)) { -/* -* Delegate property get to the primary plane. The -* drm_atomic_plane_get_property() function isn't exported, but -* can be called through drm_object_property_get_value() as that -* will call drm_atomic_get_property() for atomic drivers. -*/ -return drm_object_property_get_value (&crtc->primary->base, - property, val); - } + struct omap_drm_private *priv = crtc->dev->dev_private; + +/* +* Remap to the plane rotation/zorder property. We can peek at the plane
drivers/gpu/drm/omapdrm/omap_crtc.c static int omap_crtc_atomic_get_property(struct drm_crtc *crtc, · line 545
Quoted 10 lines
drivers/gpu/drm/omapdrm/omap_crtc.c +7
-0+* state directly since holding the crtc locks gives you a read-lock on +* the plane state. +*/ +if (property == crtc->primary->rotation_property) +return crtc->primary->state->rotation; +else if (property == priv->zorder_prop) +return crtc->primary->state->zpos;return -EINVAL ; }
acquire_ctx for crtc's getprop too then?
The comment about read lock is only valid when the plane is bound to the crtc. In general this is not always the case. You can only peak at plane->state when crtc->state->plane_mask & BIT(drm_plane_index(plane)) is true.
I think we might need -EDEADLK handling for getprop then, even though it's not optimal. :(
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 1/8] drm/omap: Simplify the rotation-on-crtc hack
Quoted 108 lines · Maarten Lankhorst
Op 25-07-17 om 10:01 schreef Daniel Vetter:
Quoted 94 lines
I want/need to rework the core property handling, and this hack is getting in the way. But since it's a non-standard propety only used by legacy userspace we know that this will only every be called from ioctl code. And never on some other free-standing state struct, where this old hack wouldn't work either.
v2: don't forget zorder and
get_property!Cc Tomi Valkeinen <[email protected]Cc Laurent Pinchart <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- drivers/gpu/drm/omapdrm/omap_crtc.c | 64 ++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 36 deletions(-)drivers/gpu/drm/omapdrm/omap_crtc.c +21
-36@@ -498,39 +498,30 @@ static void omap_crtc_atomic_flush(struct drm_crtc *crtc,spin_unlock_irq (&crtc->dev->event_lock); } -static bool omap_crtc_is_plane_prop (struct drm_crtc *crtc, -struct drm_property *property) -{ -struct drm_device *dev = crtc->dev; -struct omap_drm_private *priv = dev->dev_private; - -return property == priv->zorder_prop || - property == crtc->primary->rotation_property; -} -static int omap_crtc_atomic_set_property (struct drm_crtc *crtc,struct drm_crtc_state *state,struct drm_property *property,uint64_t val) { -if (omap_crtc_is_plane_prop (crtc, property)) { -struct drm_plane_state *plane_state; -struct drm_plane *plane = crtc->primary; - -/* -* Delegate property set to the primary plane. Get the plane -* state and set the property directly. -*/ - - plane_state =drm_atomic_get_plane_state (state->state, plane); -if (IS_ERR (plane_state)) -return PTR_ERR (plane_state); +struct omap_drm_private *priv = crtc->dev->dev_private; +struct drm_plane_state *plane_state; -return drm_atomic_plane_set_property (plane, plane_state, - property, val); - } +/* +* Delegate property set to the primary plane. Get the plane +* state and set the property directly. +*/ + plane_state =drm_atomic_get_plane_state (state->state, crtc->primary); +if (IS_ERR (plane_state)) +return PTR_ERR (plane_state); + +if (property == crtc->primary->rotation_property) + plane_state->rotation = val; +else if (property == priv->zorder_prop) + plane_state->zpos = val; +else +return -EINVAL ; -return -EINVAL ; +return 0 ; } static int omap_crtc_atomic_get_property(struct drm_crtc *crtc,@@ -538,16 +529,17 @@ static int omap_crtc_atomic_get_property(struct drm_crtc *crtc,struct drm_property *property, uint64_t *val) { - if (omap_crtc_is_plane_prop(crtc, property)) { -/* -* Delegate property get to the primary plane. The -* drm_atomic_plane_get_property() function isn't exported, but -* can be called through drm_object_property_get_value() as that -* will call drm_atomic_get_property() for atomic drivers. -*/ -return drm_object_property_get_value (&crtc->primary->base, - property, val); - } + struct omap_drm_private *priv = crtc->dev->dev_private; + +/* +* Remap to the plane rotation/zorder property. We can peek at the plane drivers/gpu/drm/omapdrm/omap_crtc.c static int omap_crtc_atomic_get_property(struct drm_crtc *crtc, · line 545
Quoted 10 lines
drivers/gpu/drm/omapdrm/omap_crtc.c +7
-0+* state directly since holding the crtc locks gives you a read-lock on +* the plane state. +*/ +if (property == crtc->primary->rotation_property) +return crtc->primary->state->rotation; +else if (property == priv->zorder_prop) +return crtc->primary->state->zpos;return -EINVAL ; }
acquire_ctxfor crtc's getprop too then?
Quoted 4 lines
The comment about read lock is only valid when the plane is bound to the crtc. In general this is not always the case. You can only peak at
plane->statewhencrtc->state->plane_mask& BIT(drm_plane_index(plane)) is true.I think we might need
-EDEADLKhandling for getprop then, even though it's not optimal. :(
Well both the old an new way only worked because we grab all the locks unconditionally. And I'd really want to avoid get_prop being anything but a simple lookup. Unfortuantely that breaks omapdrm, so no idea what exactly to do here.
In a way adding properties without standardizing them across drivers first was a really bad idea, because then we have disjoint sets of uapi expectations, and there's just no way to make that work.
I guess one radical approach might be to make this the "standard", and just redirect rotation from the CRTC to the primary plane.
Or omapdrm needs to duplicate the property properly, and update one if the other is set. I think that's probably the most workable approach. -Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Laurent Pinchart
reviewerRe: [Intel-gfx] [PATCH 1/8] drm/omap: Simplify the rotation-on-crtc hack
Hi Daniel,
Quoted 17 lines · On Tuesday 25 Jul 2017 11:24:28 Daniel Vetter wrote:
Quoted 16 lines · Maarten Lankhorst
Op 25-07-17 om 10:01 schreef Daniel Vetter:
Quoted 15 lines
I want/need to rework the core property handling, and this hack is getting in the way. But since it's a non-standard propety only used by legacy userspace we know that this will only every be called from ioctl code. And never on some other free-standing state struct, where this old hack wouldn't work either.
v2: don't forget zorder and
get_property!Cc Tomi Valkeinen <[email protected]Cc Laurent Pinchart <[email protected]>Signed-off-by Daniel Vetter <[email protected]>---
drivers/gpu/drm/omapdrm/omap_crtc.c | 64 ++++++++++--------------------- 1 file changed, 28 insertions(+), 36 deletions(-)
[snip]
Quoted 17 lines
Quoted 7 lines
The comment about read lock is only valid when the plane is bound to the crtc. In general this is not always the case. You can only peak at
plane->statewhencrtc->state->plane_mask& BIT(drm_plane_index(plane)) is true.I think we might need
-EDEADLKhandling for getprop then, even though it's not optimal. :(Well both the old an new way only worked because we grab all the locks unconditionally. And I'd really want to avoid
get_propbeing anything but a simple lookup. Unfortuantely that breaks omapdrm, so no idea what exactly to do here.In a way adding properties without standardizing them across drivers first was a really bad idea, because then we have disjoint sets of uapi expectations, and there's just no way to make that work.
Quoted 5 lines
I guess one radical approach might be to make this the "standard", and just redirect rotation from the CRTC to the primary plane.
Or omapdrm needs to duplicate the property properly, and update one if the other is set. I think that's probably the most workable approach.
Maybe the first question we should answer is whether this hack is still needed in the omapdrm driver. Tomi, do you know whether userspace still needs this ?
Signature · 8 lines
Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [Intel-gfx] [PATCH 1/8] drm/omap: Simplify the rotation-on-crtc hack
Quoted 17 lines · Laurent Pinchart
Quoted 17 lines
Quoted 7 lines
The comment about read lock is only valid when the plane is bound to the crtc. In general this is not always the case. You can only peak at
plane->statewhencrtc->state->plane_mask& BIT(drm_plane_index(plane)) is true.I think we might need
-EDEADLKhandling for getprop then, even though it's not optimal. :(Well both the old an new way only worked because we grab all the locks unconditionally. And I'd really want to avoid
get_propbeing anything but a simple lookup. Unfortuantely that breaks omapdrm, so no idea what exactly to do here.In a way adding properties without standardizing them across drivers first was a really bad idea, because then we have disjoint sets of uapi expectations, and there's just no way to make that work.
Quoted 8 lines
Quoted 5 lines
I guess one radical approach might be to make this the "standard", and just redirect rotation from the CRTC to the primary plane.
Or omapdrm needs to duplicate the property properly, and update one if the other is set. I think that's probably the most workable approach.
Maybe the first question we should answer is whether this hack is still needed in the omapdrm driver. Tomi, do you know whether userspace still needs this ?
The omap X driver uses legacy modesetting and the rotation property for the crtc.
Tomi
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 1/1 drm/omap: Rework the rotation-on-crtc hack
In reply to Daniel VetterI want/need to rework the core property handling, and this hack is getting in the way. But since it's a non-standard propety only used by legacy userspace we know that this will only every be called from ioctl code. And never on some other free-standing state struct, where this old hack wouldn't work either.
v2: don't forget zorder and get_property!
v3: Shadow the legacy state to avoid locking issues in get_property (Maarten).
--- drivers/gpu/drm/omapdrm/omap_crtc.c | 84 +++++++++++++++++++++---------------- drivers/gpu/drm/omapdrm/omap_drv.h | 9 ++++ 2 files changed, 57 insertions(+), 36 deletions(-)
drivers/gpu/drm/omapdrm/omap_crtc.c +48 -36
@@ -498,39 +498,34 @@ static void omap_crtc_atomic_flush(struct drm_crtc *crtc,spin_unlock_irq (&crtc->dev->event_lock); } -static bool omap_crtc_is_plane_prop (struct drm_crtc *crtc, -struct drm_property *property) -{ -struct drm_device *dev = crtc->dev; -struct omap_drm_private *priv = dev->dev_private; - -return property == priv->zorder_prop || - property == crtc->primary->rotation_property; -} -static int omap_crtc_atomic_set_property (struct drm_crtc *crtc,struct drm_crtc_state *state,struct drm_property *property,uint64_t val) { -if (omap_crtc_is_plane_prop (crtc, property)) { -struct drm_plane_state *plane_state; -struct drm_plane *plane = crtc->primary; - -/* -* Delegate property set to the primary plane. Get the plane -* state and set the property directly. -*/ - - plane_state =drm_atomic_get_plane_state (state->state, plane); -if (IS_ERR (plane_state)) -return PTR_ERR (plane_state); +struct omap_drm_private *priv = crtc->dev->dev_private; +struct omap_crtc_state *omap_state =to_omap_crtc_state (state); +struct drm_plane_state *plane_state; -return drm_atomic_plane_set_property (plane, plane_state, - property, val); +/* +* Delegate property set to the primary plane. Get the plane +* state and set the property directly. +*/ + plane_state =drm_atomic_get_plane_state (state->state, crtc->primary); +if (IS_ERR (plane_state)) +return PTR_ERR (plane_state); + +if (property == crtc->primary->rotation_property) { + plane_state->rotation = val; + omap_state->rotation = val; + }else if (property == priv->zorder_prop) { + plane_state->zpos = val; + omap_state->zpos = val; + }else { +return -EINVAL ; } -return -EINVAL ; +return 0 ; } static int omap_crtc_atomic_get_property(struct drm_crtc *crtc,
@@ -538,20 +533,37 @@ static int omap_crtc_atomic_get_property(struct drm_crtc *crtc,struct drm_property *property, uint64_t *val) { - if (omap_crtc_is_plane_prop(crtc, property)) { -/* -* Delegate property get to the primary plane. The -* drm_atomic_plane_get_property() function isn't exported, but -* can be called through drm_object_property_get_value() as that -* will call drm_atomic_get_property() for atomic drivers. -*/ -return drm_object_property_get_value (&crtc->primary->base, - property, val); - } + struct omap_drm_private *priv = crtc->dev->dev_private; +struct omap_crtc_state *omap_state =to_omap_crtc_state (state); + +/* +* Remap to the plane rotation/zorder property. We can peek at the plane +* state directly since holding the crtc locks gives you a read-lock on +* the plane state. +*/ +if (property == crtc->primary->rotation_property) +return omap_state->rotation; +else if (property == priv->zorder_prop) +return omap_state->zpos;return -EINVAL ; } +static struct drm_crtc_state * +omap_crtc_duplicate_state (struct drm_crtc *crtc) +{ +struct omap_crtc_state *state; + +if (WARN_ON (!crtc->state)) +return NULL ; + + state =kmalloc (sizeof (*state),GFP_KERNEL ); +if (state) +__drm_atomic_helper_crtc_duplicate_state (crtc, &state->base); + +return &state->base; +} +static const struct drm_crtc_funcs omap_crtc_funcs = { .reset = drm_atomic_helper_crtc_reset, .set_config = drm_atomic_helper_set_config,
@@ -559,7 +571,7 @@ static const struct drm_crtc_funcs omap_crtc_funcs = { .page_flip = drm_atomic_helper_page_flip, .gamma_set = drm_atomic_helper_legacy_gamma_set, .set_property = drm_atomic_helper_crtc_set_property, - .atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state, + .atomic_duplicate_state = omap_crtc_duplicate_state, .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state, .atomic_set_property = omap_crtc_atomic_set_property, .atomic_get_property = omap_crtc_atomic_get_property,
drivers/gpu/drm/omapdrm/omap_drv.h +9 -0
@@ -115,6 +115,15 @@ static inline void omap_fbdev_free(struct drm_device *dev) }#endif +struct omap_crtc_state { +/* must be first */ +struct drm_crtc_state base; +/* shadow values for legacy userspace support */ +unsigned int rotation; +unsigned int zpos; +}; +#define to_omap_crtc_state (x) container_of(x, struct omap_crtc_state, base) +struct videomode *omap_crtc_timings (struct drm_crtc *crtc);enum omap_channel omap_crtc_channel (struct drm_crtc *crtc);void omap_crtc_pre_init (void );
Signature · 6 lines
2.9.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Laurent Pinchart
reviewerRe: [PATCH] drm/omap: Rework the rotation-on-crtc hack
Hi Daniel,
Thank you for the patch.
Quoted 2 lines · On Monday 31 Jul 2017 12:54:19 Daniel Vetter wrote:
I want/need to rework the core property handling, and this hack is getting in the way. But since it's a non-standard propety only used by
s/propety/property/
Quoted 53 lines
legacy userspace we know that this will only every be called from ioctl code. And never on some other free-standing state struct, where this old hack wouldn't work either.
v2: don't forget zorder and
get_property!v3: Shadow the legacy state to avoid locking issues in
get_property(Maarten).Cc Maarten Lankhorst <[email protected]>Cc Tomi Valkeinen <[email protected]Cc Laurent Pinchart <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- drivers/gpu/drm/omapdrm/omap_crtc.c | 84 ++++++++++++++++++---------------- drivers/gpu/drm/omapdrm/omap_drv.h | 9 ++++ 2 files changed, 57 insertions(+), 36 deletions(-)(quoted diff) +0
-0
b/drivers/gpu/drm/omapdrm/omap_crtc.cindex14e8a7738b06..fc8b25748f10100644drivers/gpu/drm/omapdrm/omap_crtc.c +0
-21@@ -498,39 +498,34 @@ static void omap_crtc_atomic_flush(struct drm_crtc *crtc,spin_unlock_irq (&crtc->dev->event_lock); } -static bool omap_crtc_is_plane_prop (struct drm_crtc *crtc, -struct drm_property *property) -{ -struct drm_device *dev = crtc->dev; -struct omap_drm_private *priv = dev->dev_private; - -return property == priv->zorder_prop || - property == crtc->primary->rotation_property; -} -static int omap_crtc_atomic_set_property (struct drm_crtc *crtc,struct drm_crtc_state *state,struct drm_property *property,uint64_t val) { -if (omap_crtc_is_plane_prop (crtc, property)) { -struct drm_plane_state *plane_state; -struct drm_plane *plane = crtc->primary; - -/* -* Delegate property set to the primary plane. Get the plane -* state and set the property directly. -*/ - - plane_state =drm_atomic_get_plane_state (state->state, plane); -if (IS_ERR (plane_state))
drivers/gpu/drm/omapdrm/omap_crtc.c static void omap_crtc_atomic_flush(struct drm_crtc · line 512
Quoted 10 lines
drivers/gpu/drm/omapdrm/omap_crtc.c +6
-3-return PTR_ERR (plane_state); +struct omap_drm_private *priv = crtc->dev->dev_private; +struct omap_crtc_state *omap_state =to_omap_crtc_state (state); +struct drm_plane_state *plane_state; -return drm_atomic_plane_set_property (plane, plane_state, - property, val); +/* +* Delegate property set to the primary plane. Get the plane +* state and set the property directly.
Nitpicking, you can reformat the comment to go towards the 80 columns limit.
Quoted 21 lines
drivers/gpu/drm/omapdrm/omap_crtc.c +14
-1+*/ + plane_state =drm_atomic_get_plane_state (state->state, crtc->primary); +if (IS_ERR (plane_state)) +return PTR_ERR (plane_state); + +if (property == crtc->primary->rotation_property) { + plane_state->rotation = val; + omap_state->rotation = val; + }else if (property == priv->zorder_prop) { + plane_state->zpos = val; + omap_state->zpos = val; + }else { +return -EINVAL ; } -return -EINVAL ; +return 0 ; } static int omap_crtc_atomic_get_property(struct drm_crtc *crtc,
drivers/gpu/drm/omapdrm/omap_crtc.c static int omap_crtc_atomic_get_property(struct · line 544
Quoted 7 lines
drivers/gpu/drm/omapdrm/omap_crtc.c +0
-4@@ -538,20 +533,37 @@ static int omap_crtc_atomic_get_property(struct drm_crtc *crtc, struct drm_property *property, uint64_t *val) { - if (omap_crtc_is_plane_prop(crtc, property)) { -/* -* Delegate property get to the primary plane. The -* drm_atomic_plane_get_property() function isn't exported,
but
drivers/gpu/drm/omapdrm/omap_crtc.c static int omap_crtc_atomic_get_property(struct · line 545
Quoted 1 line
drivers/gpu/drm/omapdrm/omap_crtc.c +0
-1-* can be called through drm_object_property_get_value() as
that
drivers/gpu/drm/omapdrm/omap_crtc.c static int omap_crtc_atomic_get_property(struct drm_crtc *crtc,
Quoted 10 lines
drivers/gpu/drm/omapdrm/omap_crtc.c +5
-5-* will call drm_atomic_get_property() for atomic drivers. -*/ -return drm_object_property_get_value (&crtc->primary->base, - property, val); - } +struct omap_drm_private *priv = crtc->dev->dev_private; +struct omap_crtc_state *omap_state =to_omap_crtc_state (state); + +/* +* Remap to the plane rotation/zorder property. We can peek at the
plane
drivers/gpu/drm/omapdrm/omap_crtc.c static int omap_crtc_atomic_get_property(struct · line 541
Quoted 1 line
drivers/gpu/drm/omapdrm/omap_crtc.c +1
-0+* state directly since holding the crtc locks gives you a read-lock
on
drivers/gpu/drm/omapdrm/omap_crtc.c static int omap_crtc_atomic_get_property(struct drm_crtc *crtc, · line 542
Quoted 1 line
drivers/gpu/drm/omapdrm/omap_crtc.c +1
-0+* the plane state.
Isn't this comment outdated ?
Quoted 10 lines
drivers/gpu/drm/omapdrm/omap_crtc.c +6
-0+*/ +if (property == crtc->primary->rotation_property) +return omap_state->rotation; +else if (property == priv->zorder_prop) +return omap_state->zpos;return -EINVAL ; } +static struct drm_crtc_state *
drivers/gpu/drm/omapdrm/omap_crtc.c static int omap_crtc_atomic_get_property(struct drm_crtc *crtc, · line 562
Quoted 10 lines
drivers/gpu/drm/omapdrm/omap_crtc.c +10
-0+omap_crtc_duplicate_state(struct drm_crtc *crtc) +{ +struct omap_crtc_state *state; + +if (WARN_ON (!crtc->state)) +return NULL ; + + state =kmalloc (sizeof (*state),GFP_KERNEL ); +if (state) +__drm_atomic_helper_crtc_duplicate_state (crtc, &state->base);
No need to copy the zpos and rotation fields ?
Quoted 21 lines
drivers/gpu/drm/omapdrm/omap_crtc.c +4
-1+return &state->base; +} +static const struct drm_crtc_funcs omap_crtc_funcs = { .reset = drm_atomic_helper_crtc_reset, .set_config = drm_atomic_helper_set_config,@@ -559,7 +571,7 @@ static const struct drm_crtc_funcs omap_crtc_funcs = { .page_flip = drm_atomic_helper_page_flip, .gamma_set = drm_atomic_helper_legacy_gamma_set, .set_property = drm_atomic_helper_crtc_set_property, - .atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state, + .atomic_duplicate_state = omap_crtc_duplicate_state, .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state, .atomic_set_property = omap_crtc_atomic_set_property, .atomic_get_property = omap_crtc_atomic_get_property,(quoted diff) +0
-0
b/drivers/gpu/drm/omapdrm/omap_drv.hindex4bd1e9070b31..11703c174cd8100644
drivers/gpu/drm/omapdrm/omap_drv.h static inline void omap_fbdev_free(struct drm_device · line 119
Quoted 5 lines
drivers/gpu/drm/omapdrm/omap_drv.h +2
-0@@ -115,6 +115,15 @@ static inline void omap_fbdev_free(struct drm_device *dev) }#endif +struct omap_crtc_state { +/* must be first */
Capitalizing comments would be appreciated :-)
drivers/gpu/drm/omapdrm/omap_drv.h static inline void omap_fbdev_free(struct drm_device *dev) · line 125
Quoted 6 lines
drivers/gpu/drm/omapdrm/omap_drv.h +6
-0+struct drm_crtc_state base; +/* shadow values for legacy userspace support */ +unsigned int rotation; +unsigned int zpos; +}; +#define to_omap_crtc_state (x) container_of(x, struct omap_crtc_state, base)
Could you please define this structure in omap_crtc.c, as it's internal to the CRTC handling code ?
Quoted 3 lines
drivers/gpu/drm/omapdrm/omap_drv.h +0
-0struct videomode *omap_crtc_timings (struct drm_crtc *crtc);enum omap_channel omap_crtc_channel (struct drm_crtc *crtc);void omap_crtc_pre_init (void );
Signature · 8 lines
Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 1/1 drm/omap: Rework the rotation-on-crtc hack
In reply to Daniel VetterI want/need to rework the core property handling, and this hack is getting in the way. But since it's a non-standard propety only used by legacy userspace we know that this will only every be called from ioctl code. And never on some other free-standing state struct, where this old hack wouldn't work either.
v2: don't forget zorder and get_property!
v3: Shadow the legacy state to avoid locking issues in get_property (Maarten).
v4: Review from Laurent
- Move struct omap_crtc_state into omap_crtc.c
- Clean up comments.
- Don't forget to copy the shadowed state over on duplicate.
--- drivers/gpu/drm/omapdrm/omap_crtc.c | 95 +++++++++++++++++++++++-------------- 1 file changed, 59 insertions(+), 36 deletions(-)
drivers/gpu/drm/omapdrm/omap_crtc.c +59 -36
@@ -26,6 +26,16 @@#include "omap_drv.h" +#define to_omap_crtc_state (x) container_of(x, struct omap_crtc_state, base) + +struct omap_crtc_state { +/* Must be first. */ +struct drm_crtc_state base; +/* Shadow values for legacy userspace support. */ +unsigned int rotation; +unsigned int zpos; +}; +#define to_omap_crtc (x) container_of(x, struct omap_crtc, base)struct omap_crtc {
@@ -498,39 +508,35 @@ static void omap_crtc_atomic_flush(struct drm_crtc *crtc,spin_unlock_irq (&crtc->dev->event_lock); } -static bool omap_crtc_is_plane_prop (struct drm_crtc *crtc, -struct drm_property *property) -{ -struct drm_device *dev = crtc->dev; -struct omap_drm_private *priv = dev->dev_private; - -return property == priv->zorder_prop || - property == crtc->primary->rotation_property; -} -static int omap_crtc_atomic_set_property (struct drm_crtc *crtc,struct drm_crtc_state *state,struct drm_property *property,uint64_t val) { -if (omap_crtc_is_plane_prop (crtc, property)) { -struct drm_plane_state *plane_state; -struct drm_plane *plane = crtc->primary; - -/* -* Delegate property set to the primary plane. Get the plane -* state and set the property directly. -*/ - - plane_state =drm_atomic_get_plane_state (state->state, plane); -if (IS_ERR (plane_state)) -return PTR_ERR (plane_state); +struct omap_drm_private *priv = crtc->dev->dev_private; +struct omap_crtc_state *omap_state =to_omap_crtc_state (state); +struct drm_plane_state *plane_state; -return drm_atomic_plane_set_property (plane, plane_state, - property, val); +/* +* Delegate property set to the primary plane. Get the plane state and +* set the property directly, but keep a shadow copy for the +* atomic_get_property callback. +*/ + plane_state =drm_atomic_get_plane_state (state->state, crtc->primary); +if (IS_ERR (plane_state)) +return PTR_ERR (plane_state); + +if (property == crtc->primary->rotation_property) { + plane_state->rotation = val; + omap_state->rotation = val; + }else if (property == priv->zorder_prop) { + plane_state->zpos = val; + omap_state->zpos = val; + }else { +return -EINVAL ; } -return -EINVAL ; +return 0 ; } static int omap_crtc_atomic_get_property(struct drm_crtc *crtc,
@@ -538,20 +544,37 @@ static int omap_crtc_atomic_get_property(struct drm_crtc *crtc,struct drm_property *property, uint64_t *val) { - if (omap_crtc_is_plane_prop(crtc, property)) { -/* -* Delegate property get to the primary plane. The -* drm_atomic_plane_get_property() function isn't exported, but -* can be called through drm_object_property_get_value() as that -* will call drm_atomic_get_property() for atomic drivers. -*/ -return drm_object_property_get_value (&crtc->primary->base, - property, val); - } + struct omap_drm_private *priv = crtc->dev->dev_private; +struct omap_crtc_state *omap_state =to_omap_crtc_state (state); + +if (property == crtc->primary->rotation_property) +return omap_state->rotation; +else if (property == priv->zorder_prop) +return omap_state->zpos;return -EINVAL ; } +static struct drm_crtc_state * +omap_crtc_duplicate_state (struct drm_crtc *crtc) +{ +struct omap_crtc_state *state, *current_state; + +if (WARN_ON (!crtc->state)) +return NULL ; + + current_state =to_omap_crtc_state (crtc->state); + + state =kmalloc (sizeof (*state),GFP_KERNEL ); +if (state) +__drm_atomic_helper_crtc_duplicate_state (crtc, &state->base); + + state->zpos = current_state->zpos; + state->rotation = current_state->rotation; + +return &state->base; +} +static const struct drm_crtc_funcs omap_crtc_funcs = { .reset = drm_atomic_helper_crtc_reset, .set_config = drm_atomic_helper_set_config,
@@ -559,7 +582,7 @@ static const struct drm_crtc_funcs omap_crtc_funcs = { .page_flip = drm_atomic_helper_page_flip, .gamma_set = drm_atomic_helper_legacy_gamma_set, .set_property = drm_atomic_helper_crtc_set_property, - .atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state, + .atomic_duplicate_state = omap_crtc_duplicate_state, .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state, .atomic_set_property = omap_crtc_atomic_set_property, .atomic_get_property = omap_crtc_atomic_get_property,
Signature · 6 lines
2.9.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] drm/omap: Rework the rotation-on-crtc hack
Hi Daniel,
Thank you for the patch.
Quoted 16 lines · On Monday 31 Jul 2017 14:45:16 Daniel Vetter wrote:
I want/need to rework the core property handling, and this hack is getting in the way. But since it's a non-standard propety only used by legacy userspace we know that this will only every be called from ioctl code. And never on some other free-standing state struct, where this old hack wouldn't work either.
v2: don't forget zorder and
get_property!v3: Shadow the legacy state to avoid locking issues in
get_property(Maarten).v4: Review from Laurent
- Move structomap_crtc_stateintoomap_crtc.c
- Clean up comments.
- Don't forget to copy the shadowed state over on duplicate.
Quoted 4 lines
Cc Maarten Lankhorst <[email protected]>Cc Tomi Valkeinen <[email protected]Cc Laurent Pinchart <[email protected]>Signed-off-by Daniel Vetter <[email protected]>
I wish we could do better, but I think that's the best we can achieve without removing the hack.
Quoted 88 lines
--- drivers/gpu/drm/omapdrm/omap_crtc.c | 95 ++++++++++++++++++++-------------- 1 file changed, 59 insertions(+), 36 deletions(-)(quoted diff) +0
-0
b/drivers/gpu/drm/omapdrm/omap_crtc.cindex14e8a7738b06..16d8b291921b100644drivers/gpu/drm/omapdrm/omap_crtc.c +31
-25@@ -26,6 +26,16 @@#include "omap_drv.h" +#define to_omap_crtc_state (x) container_of(x, struct omap_crtc_state, base) + +struct omap_crtc_state { +/* Must be first. */ +struct drm_crtc_state base; +/* Shadow values for legacy userspace support. */ +unsigned int rotation; +unsigned int zpos; +}; +#define to_omap_crtc (x) container_of(x, struct omap_crtc, base)struct omap_crtc {@@ -498,39 +508,35 @@ static void omap_crtc_atomic_flush(struct drm_crtc *crtc,spin_unlock_irq (&crtc->dev->event_lock); } -static bool omap_crtc_is_plane_prop (struct drm_crtc *crtc, -struct drm_property *property) -{ -struct drm_device *dev = crtc->dev; -struct omap_drm_private *priv = dev->dev_private; - -return property == priv->zorder_prop || - property == crtc->primary->rotation_property; -} -static int omap_crtc_atomic_set_property (struct drm_crtc *crtc,struct drm_crtc_state *state,struct drm_property *property,uint64_t val) { -if (omap_crtc_is_plane_prop (crtc, property)) { -struct drm_plane_state *plane_state; -struct drm_plane *plane = crtc->primary; - -/* -* Delegate property set to the primary plane. Get the plane -* state and set the property directly. -*/ - - plane_state =drm_atomic_get_plane_state (state->state, plane); -if (IS_ERR (plane_state)) -return PTR_ERR (plane_state); +struct omap_drm_private *priv = crtc->dev->dev_private; +struct omap_crtc_state *omap_state =to_omap_crtc_state (state); +struct drm_plane_state *plane_state; -return drm_atomic_plane_set_property (plane, plane_state, - property, val); +/* +* Delegate property set to the primary plane. Get the plane state and +* set the property directly, but keep a shadow copy for the +* atomic_get_property callback. +*/ + plane_state =drm_atomic_get_plane_state (state->state, crtc->primary); +if (IS_ERR (plane_state)) +return PTR_ERR (plane_state); + +if (property == crtc->primary->rotation_property) { + plane_state->rotation = val; + omap_state->rotation = val; + }else if (property == priv->zorder_prop) { + plane_state->zpos = val; + omap_state->zpos = val; + }else { +return -EINVAL ; } -return -EINVAL ; +return 0 ; } static int omap_crtc_atomic_get_property(struct drm_crtc *crtc,
drivers/gpu/drm/omapdrm/omap_crtc.c static int omap_crtc_atomic_get_property(struct · line 544
Quoted 7 lines
drivers/gpu/drm/omapdrm/omap_crtc.c +0
-4@@ -538,20 +544,37 @@ static int omap_crtc_atomic_get_property(struct drm_crtc *crtc, struct drm_property *property, uint64_t *val) { - if (omap_crtc_is_plane_prop(crtc, property)) { -/* -* Delegate property get to the primary plane. The -* drm_atomic_plane_get_property() function isn't exported,
but
drivers/gpu/drm/omapdrm/omap_crtc.c static int omap_crtc_atomic_get_property(struct · line 545
Quoted 1 line
drivers/gpu/drm/omapdrm/omap_crtc.c +0
-1-* can be called through drm_object_property_get_value() as
that
Quoted 48 lines
drivers/gpu/drm/omapdrm/omap_crtc.c +28
-6-* will call drm_atomic_get_property() for atomic drivers. -*/ -return drm_object_property_get_value (&crtc->primary->base, - property, val); - } +struct omap_drm_private *priv = crtc->dev->dev_private; +struct omap_crtc_state *omap_state =to_omap_crtc_state (state); + +if (property == crtc->primary->rotation_property) +return omap_state->rotation; +else if (property == priv->zorder_prop) +return omap_state->zpos;return -EINVAL ; } +static struct drm_crtc_state * +omap_crtc_duplicate_state (struct drm_crtc *crtc) +{ +struct omap_crtc_state *state, *current_state; + +if (WARN_ON (!crtc->state)) +return NULL ; + + current_state =to_omap_crtc_state (crtc->state); + + state =kmalloc (sizeof (*state),GFP_KERNEL ); +if (state) +__drm_atomic_helper_crtc_duplicate_state (crtc, &state->base); + + state->zpos = current_state->zpos; + state->rotation = current_state->rotation; + +return &state->base; +} +static const struct drm_crtc_funcs omap_crtc_funcs = { .reset = drm_atomic_helper_crtc_reset, .set_config = drm_atomic_helper_set_config,@@ -559,7 +582,7 @@ static const struct drm_crtc_funcs omap_crtc_funcs = { .page_flip = drm_atomic_helper_page_flip, .gamma_set = drm_atomic_helper_legacy_gamma_set, .set_property = drm_atomic_helper_crtc_set_property, - .atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state, + .atomic_duplicate_state = omap_crtc_duplicate_state, .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state, .atomic_set_property = omap_crtc_atomic_set_property, .atomic_get_property = omap_crtc_atomic_get_property,
Signature · 8 lines
Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 1/1 drm/omap: Rework the rotation-on-crtc hack
In reply to Daniel VetterI want/need to rework the core property handling, and this hack is getting in the way. But since it's a non-standard propety only used by legacy userspace we know that this will only every be called from ioctl code. And never on some other free-standing state struct, where this old hack wouldn't work either.
v2: don't forget zorder and get_property!
v3: Shadow the legacy state to avoid locking issues in get_property (Maarten).
v4: Review from Laurent
- Move struct omap_crtc_state into omap_crtc.c
- Clean up comments.
- Don't forget to copy the shadowed state over on duplicate.
v5: Don't forget to update the reset handler (Maarten).
--- drivers/gpu/drm/omapdrm/omap_crtc.c | 109 ++++++++++++++++++++++++------------ 1 file changed, 72 insertions(+), 37 deletions(-)
drivers/gpu/drm/omapdrm/omap_crtc.c +72 -37
@@ -26,6 +26,16 @@#include "omap_drv.h" +#define to_omap_crtc_state (x) container_of(x, struct omap_crtc_state, base) + +struct omap_crtc_state { +/* Must be first. */ +struct drm_crtc_state base; +/* Shadow values for legacy userspace support. */ +unsigned int rotation; +unsigned int zpos; +}; +#define to_omap_crtc (x) container_of(x, struct omap_crtc, base)struct omap_crtc {
@@ -498,39 +508,35 @@ static void omap_crtc_atomic_flush(struct drm_crtc *crtc,spin_unlock_irq (&crtc->dev->event_lock); } -static bool omap_crtc_is_plane_prop (struct drm_crtc *crtc, -struct drm_property *property) -{ -struct drm_device *dev = crtc->dev; -struct omap_drm_private *priv = dev->dev_private; - -return property == priv->zorder_prop || - property == crtc->primary->rotation_property; -} -static int omap_crtc_atomic_set_property (struct drm_crtc *crtc,struct drm_crtc_state *state,struct drm_property *property,uint64_t val) { -if (omap_crtc_is_plane_prop (crtc, property)) { -struct drm_plane_state *plane_state; -struct drm_plane *plane = crtc->primary; - -/* -* Delegate property set to the primary plane. Get the plane -* state and set the property directly. -*/ - - plane_state =drm_atomic_get_plane_state (state->state, plane); -if (IS_ERR (plane_state)) -return PTR_ERR (plane_state); +struct omap_drm_private *priv = crtc->dev->dev_private; +struct omap_crtc_state *omap_state =to_omap_crtc_state (state); +struct drm_plane_state *plane_state; -return drm_atomic_plane_set_property (plane, plane_state, - property, val); +/* +* Delegate property set to the primary plane. Get the plane state and +* set the property directly, but keep a shadow copy for the +* atomic_get_property callback. +*/ + plane_state =drm_atomic_get_plane_state (state->state, crtc->primary); +if (IS_ERR (plane_state)) +return PTR_ERR (plane_state); + +if (property == crtc->primary->rotation_property) { + plane_state->rotation = val; + omap_state->rotation = val; + }else if (property == priv->zorder_prop) { + plane_state->zpos = val; + omap_state->zpos = val; + }else { +return -EINVAL ; } -return -EINVAL ; +return 0 ; } static int omap_crtc_atomic_get_property(struct drm_crtc *crtc,
@@ -538,28 +544,57 @@ static int omap_crtc_atomic_get_property(struct drm_crtc *crtc,struct drm_property *property, uint64_t *val) { - if (omap_crtc_is_plane_prop(crtc, property)) { -/* -* Delegate property get to the primary plane. The -* drm_atomic_plane_get_property() function isn't exported, but -* can be called through drm_object_property_get_value() as that -* will call drm_atomic_get_property() for atomic drivers. -*/ -return drm_object_property_get_value (&crtc->primary->base, - property, val); - } + struct omap_drm_private *priv = crtc->dev->dev_private; +struct omap_crtc_state *omap_state =to_omap_crtc_state (state); + +if (property == crtc->primary->rotation_property) +return omap_state->rotation; +else if (property == priv->zorder_prop) +return omap_state->zpos;return -EINVAL ; } +static void omap_crtc_reset (struct drm_crtc *crtc) +{ +if (crtc->state) +__drm_atomic_helper_crtc_destroy_state (crtc->state); + +kfree (crtc->state); + crtc->state =kzalloc (sizeof (struct omap_crtc_state ),GFP_KERNEL ); + +if (crtc->state) + crtc->state->crtc = crtc; +} + +static struct drm_crtc_state * +omap_crtc_duplicate_state (struct drm_crtc *crtc) +{ +struct omap_crtc_state *state, *current_state; + +if (WARN_ON (!crtc->state)) +return NULL ; + + current_state =to_omap_crtc_state (crtc->state); + + state =kmalloc (sizeof (*state),GFP_KERNEL ); +if (state) +__drm_atomic_helper_crtc_duplicate_state (crtc, &state->base); + + state->zpos = current_state->zpos; + state->rotation = current_state->rotation; + +return &state->base; +} +static const struct drm_crtc_funcs omap_crtc_funcs = { - .reset = drm_atomic_helper_crtc_reset, + .reset = omap_crtc_reset, .set_config = drm_atomic_helper_set_config, .destroy = omap_crtc_destroy, .page_flip = drm_atomic_helper_page_flip, .gamma_set = drm_atomic_helper_legacy_gamma_set, .set_property = drm_atomic_helper_crtc_set_property, - .atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state, + .atomic_duplicate_state = omap_crtc_duplicate_state, .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state, .atomic_set_property = omap_crtc_atomic_set_property, .atomic_get_property = omap_crtc_atomic_get_property,
Signature · 6 lines
2.9.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Maarten Lankhorst
maintainerRe: [PATCH] drm/omap: Rework the rotation-on-crtc hack
Op 31-07-17 om 17:42 schreef Daniel Vetter:
Quoted 90 lines
I want/need to rework the core property handling, and this hack is getting in the way. But since it's a non-standard propety only used by legacy userspace we know that this will only every be called from ioctl code. And never on some other free-standing state struct, where this old hack wouldn't work either.
v2: don't forget zorder and
get_property!v3: Shadow the legacy state to avoid locking issues in
get_property(Maarten).v4: Review from Laurent
- Move structomap_crtc_stateintoomap_crtc.c
- Clean up comments.
- Don't forget to copy the shadowed state over on duplicate.v5: Don't forget to update the reset handler (Maarten).
Reviewed-by Laurent Pinchart <[email protected]> (v4)Cc Maarten Lankhorst <[email protected]>Cc Tomi Valkeinen <[email protected]Cc Laurent Pinchart <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- drivers/gpu/drm/omapdrm/omap_crtc.c | 109 ++++++++++++++++++++++++------------ 1 file changed, 72 insertions(+), 37 deletions(-)drivers/gpu/drm/omapdrm/omap_crtc.c +18
-24@@ -26,6 +26,16 @@#include "omap_drv.h" +#define to_omap_crtc_state (x) container_of(x, struct omap_crtc_state, base) + +struct omap_crtc_state { +/* Must be first. */ +struct drm_crtc_state base; +/* Shadow values for legacy userspace support. */ +unsigned int rotation; +unsigned int zpos; +}; +#define to_omap_crtc (x) container_of(x, struct omap_crtc, base)struct omap_crtc {@@ -498,39 +508,35 @@ static void omap_crtc_atomic_flush(struct drm_crtc *crtc,spin_unlock_irq (&crtc->dev->event_lock); } -static bool omap_crtc_is_plane_prop (struct drm_crtc *crtc, -struct drm_property *property) -{ -struct drm_device *dev = crtc->dev; -struct omap_drm_private *priv = dev->dev_private; - -return property == priv->zorder_prop || - property == crtc->primary->rotation_property; -} -static int omap_crtc_atomic_set_property (struct drm_crtc *crtc,struct drm_crtc_state *state,struct drm_property *property,uint64_t val) { -if (omap_crtc_is_plane_prop (crtc, property)) { -struct drm_plane_state *plane_state; -struct drm_plane *plane = crtc->primary; - -/* -* Delegate property set to the primary plane. Get the plane -* state and set the property directly. -*/ - - plane_state =drm_atomic_get_plane_state (state->state, plane); -if (IS_ERR (plane_state)) -return PTR_ERR (plane_state); +struct omap_drm_private *priv = crtc->dev->dev_private; +struct omap_crtc_state *omap_state =to_omap_crtc_state (state); +struct drm_plane_state *plane_state; -return drm_atomic_plane_set_property (plane, plane_state, - property, val); +/* +* Delegate property set to the primary plane. Get the plane state and +* set the property directly, but keep a shadow copy for the +* atomic_get_property callback. +*/
drivers/gpu/drm/omapdrm/omap_crtc.c static void omap_crtc_atomic_flush(struct drm_crtc *crtc, · line 534
Quoted 10 lines
drivers/gpu/drm/omapdrm/omap_crtc.c +10
-0+ plane_state =drm_atomic_get_plane_state (state->state, crtc->primary); +if (IS_ERR (plane_state)) +return PTR_ERR (plane_state); + +if (property == crtc->primary->rotation_property) { + plane_state->rotation = val; + omap_state->rotation = val; + }else if (property == priv->zorder_prop) { + plane_state->zpos = val; + omap_state->zpos = val;
With atomic we should try to always make the getprop values accurate, or compositors might have troubles restoring.
I would update the shadow values in omap_crtc_atomic_check through omap_crtc_atomic_check instead, with something like this:
+ pri_state = drm_atomic_get_new_plane_state(crtc->primary, state->state);
+ if (pri_state) {
+ struct omap_crtc_state *omap_crtc_state =
+ to_omap_crtc_state(state);
+
+ omap_crtc_state->zpos = pri_state->zpos;
+ omap_crtc_state->rotation = pri_state->rotation;
+ }
That way even when updating the property through the primary plane, it gets reflected correctly. For example when vt switching with fbdev.
Quoted 34 lines
drivers/gpu/drm/omapdrm/omap_crtc.c +10
-11+ }else { +return -EINVAL ; } -return -EINVAL ; +return 0 ; } static int omap_crtc_atomic_get_property(struct drm_crtc *crtc,@@ -538,28 +544,57 @@ static int omap_crtc_atomic_get_property(struct drm_crtc *crtc,struct drm_property *property, uint64_t *val) { - if (omap_crtc_is_plane_prop(crtc, property)) { -/* -* Delegate property get to the primary plane. The -* drm_atomic_plane_get_property() function isn't exported, but -* can be called through drm_object_property_get_value() as that -* will call drm_atomic_get_property() for atomic drivers. -*/ -return drm_object_property_get_value (&crtc->primary->base, - property, val); - } + struct omap_drm_private *priv = crtc->dev->dev_private; +struct omap_crtc_state *omap_state =to_omap_crtc_state (state); + +if (property == crtc->primary->rotation_property) +return omap_state->rotation; +else if (property == priv->zorder_prop) +return omap_state->zpos;return -EINVAL ; }
drivers/gpu/drm/omapdrm/omap_crtc.c static int omap_crtc_atomic_get_property(struct drm_crtc *crtc, · line 567
Quoted 10 lines
drivers/gpu/drm/omapdrm/omap_crtc.c +10
-0+static void omap_crtc_reset (struct drm_crtc *crtc) +{ +if (crtc->state) +__drm_atomic_helper_crtc_destroy_state (crtc->state); + +kfree (crtc->state); + crtc->state =kzalloc (sizeof (struct omap_crtc_state ),GFP_KERNEL ); + +if (crtc->state) + crtc->state->crtc = crtc;
Hm, perhaps add a __drm_atomic_helper_crtc_reset, and (perhaps) for planes too?
Similar to __drm_atomic_helper_connector_reset, in case we want to add something in the future that might need to be initialised. :)
Quoted 25 lines
drivers/gpu/drm/omapdrm/omap_crtc.c +23
-1+} + +static struct drm_crtc_state * +omap_crtc_duplicate_state (struct drm_crtc *crtc) +{ +struct omap_crtc_state *state, *current_state; + +if (WARN_ON (!crtc->state)) +return NULL ; + + current_state =to_omap_crtc_state (crtc->state); + + state =kmalloc (sizeof (*state),GFP_KERNEL ); +if (state) +__drm_atomic_helper_crtc_duplicate_state (crtc, &state->base); + + state->zpos = current_state->zpos; + state->rotation = current_state->rotation; + +return &state->base; +} +static const struct drm_crtc_funcs omap_crtc_funcs = { - .reset = drm_atomic_helper_crtc_reset, + .reset = omap_crtc_reset,
drivers/gpu/drm/omapdrm/omap_crtc.c static int omap_crtc_atomic_get_property(struct drm_crtc *crtc, · line 600
Quoted 10 lines
drivers/gpu/drm/omapdrm/omap_crtc.c +1
-1.set_config = drm_atomic_helper_set_config, .destroy = omap_crtc_destroy, .page_flip = drm_atomic_helper_page_flip, .gamma_set = drm_atomic_helper_legacy_gamma_set, .set_property = drm_atomic_helper_crtc_set_property, - .atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state, + .atomic_duplicate_state = omap_crtc_duplicate_state, .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state, .atomic_set_property = omap_crtc_atomic_set_property, .atomic_get_property = omap_crtc_atomic_get_property,
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Laurent Pinchart
reviewerRe: [PATCH] drm/omap: Rework the rotation-on-crtc hack
Hi Maarten,
Quoted 34 lines · On Tuesday 01 Aug 2017 07:59:13 Maarten Lankhorst wrote:
Op 31-07-17 om 17:42 schreef Daniel Vetter:
Quoted 33 lines
I want/need to rework the core property handling, and this hack is getting in the way. But since it's a non-standard propety only used by legacy userspace we know that this will only every be called from ioctl code. And never on some other free-standing state struct, where this old hack wouldn't work either.
v2: don't forget zorder and
get_property!v3: Shadow the legacy state to avoid locking issues in
get_property(Maarten).v4: Review from Laurent
- Move structomap_crtc_stateintoomap_crtc.c
- Clean up comments.
- Don't forget to copy the shadowed state over on duplicate.v5: Don't forget to update the reset handler (Maarten).
Reviewed-by Laurent Pinchart <[email protected]> (v4)Cc Maarten Lankhorst <[email protected]>Cc Tomi Valkeinen <[email protected]Cc Laurent Pinchart <[email protected]>Signed-off-by Daniel Vetter <[email protected]>---
drivers/gpu/drm/omapdrm/omap_crtc.c | 109 ++++++++++++++++++++----------- 1 file changed, 72 insertions(+), 37 deletions(-)(quoted diff) +0
-0
b/drivers/gpu/drm/omapdrm/omap_crtc.cindex14e8a7738b06..9014085c33df100644drivers/gpu/drm/omapdrm/omap_crtc.c +0
-0
[snip]
Quoted 55 lines
Quoted 28 lines
static int omap_crtc_atomic_set_property(struct
drm_crtc*crtc,drivers/gpu/drm/omapdrm/omap_crtc.c +8
-14struct drm_crtc_state *state, struct drm_property *property, uint64_t val) { - if (omap_crtc_is_plane_prop(crtc, property)) { - struct drm_plane_state *plane_state; -struct drm_plane *plane = crtc->primary; - -/* -* Delegate property set to the primary plane. Get the plane -* state and set the property directly. -*/ - - plane_state =drm_atomic_get_plane_state (state->state, plane); -if (IS_ERR (plane_state)) -return PTR_ERR (plane_state); + struct omap_drm_private *priv = crtc->dev->dev_private; +struct omap_crtc_state *omap_state =to_omap_crtc_state (state); +struct drm_plane_state *plane_state; -return drm_atomic_plane_set_property (plane, plane_state, - property, val); +/* +* Delegate property set to the primary plane. Get the plane state and +* set the property directly, but keep a shadow copy for the +* atomic_get_property callback. +*/ drivers/gpu/drm/omapdrm/omap_crtc.c static void omap_crtc_atomic_flush(struct drm_crtc *crtc, · line 534
Quoted 10 lines
drivers/gpu/drm/omapdrm/omap_crtc.c +10
-0+ plane_state =drm_atomic_get_plane_state (state->state, crtc->primary); +if (IS_ERR (plane_state)) +return PTR_ERR (plane_state); + +if (property == crtc->primary->rotation_property) { + plane_state->rotation = val; + omap_state->rotation = val; + }else if (property == priv->zorder_prop) { + plane_state->zpos = val; + omap_state->zpos = val;With atomic we should try to always make the getprop values accurate, or compositors might have troubles restoring.
I would update the shadow values in
omap_crtc_atomic_checkthroughomap_crtc_atomic_checkinstead, with something like this:+
pri_state= drm_atomic_get_new_plane_state(crtc->primary,state->state);(quoted diff) +7
-0+ if (pri_state) { + struct omap_crtc_state *omap_crtc_state = + to_omap_crtc_state(state); + + omap_crtc_state->zpos = pri_state->zpos; + omap_crtc_state->rotation = pri_state->rotation; + }
Quoted 2 lines
That way even when updating the property through the primary plane, it gets reflected correctly. For example when vt switching with fbdev.
Let's not make it over-complicated. This hack is only needed fo the legacy X OMAP modesetting driver. The CRTC zpos and rotation properties should not be used through the atomic API.
Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/omapdrm/omap_crtc.c +3
-1+ }else { +return -EINVAL ; } -return -EINVAL ; +return 0 ; }
Signature · 8 lines
Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] drm/omap: Rework the rotation-on-crtc hack
Quoted 11 lines · Laurent Pinchart
Quoted 10 lines · On Tuesday 01 Aug 2017 07:59:13 Maarten Lankhorst wrote:
+
pri_state= drm_atomic_get_new_plane_state(crtc->primary,state->state);(quoted diff) +7
-0+ if (pri_state) { + struct omap_crtc_state *omap_crtc_state = + to_omap_crtc_state(state); + + omap_crtc_state->zpos = pri_state->zpos; + omap_crtc_state->rotation = pri_state->rotation; + }
Quoted 6 lines
Quoted 2 lines
That way even when updating the property through the primary plane, it gets reflected correctly. For example when vt switching with fbdev.
Let's not make it over-complicated. This hack is only needed fo the legacy X OMAP modesetting driver. The CRTC zpos and rotation properties should not be used through the atomic API.
Marten is right, the atomic properties are all such that you can unconditionally restore them (e.g. fences report a no-op value), to make compositor switching easier. Not sure anyone implements that, but I think it's a useful idea to keep. I'll respin (or maybe Maarten simply submits his patch with a proper sob ...).
-Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Maarten Lankhorst
maintainerPATCH 1/1 drm/omap: Rework the rotation-on-crtc hack
Op 02-08-17 om 10:02 schreef Daniel Vetter:
Quoted 18 lines
Quoted 11 lines · Laurent Pinchart
Quoted 10 lines · On Tuesday 01 Aug 2017 07:59:13 Maarten Lankhorst wrote:
+
pri_state= drm_atomic_get_new_plane_state(crtc->primary,state->state);(quoted diff) +7
-0+ if (pri_state) { + struct omap_crtc_state *omap_crtc_state = + to_omap_crtc_state(state); + + omap_crtc_state->zpos = pri_state->zpos; + omap_crtc_state->rotation = pri_state->rotation; + }Quoted 5 lines
Quoted 2 lines
That way even when updating the property through the primary plane, it gets reflected correctly. For example when vt switching with fbdev.
Let's not make it over-complicated. This hack is only needed fo the legacy X OMAP modesetting driver. The CRTC zpos and rotation properties should not be used through the atomic API.
Quoted 6 lines
Marten is right, the atomic properties are all such that you can unconditionally restore them (e.g. fences report a no-op value), to make compositor switching easier. Not sure anyone implements that, but I think it's a useful idea to keep. I'll respin (or maybe Maarten simply submits his patch with a proper sob ...).
-Daniel
Here you go, compile tested version. :)
----8<----
I want/need to rework the core property handling, and this hack is getting in the way. But since it's a non-standard propety only used by legacy userspace we know that this will only every be called from ioctl code. And never on some other free-standing state struct, where this old hack wouldn't work either.
v2: don't forget zorder and get_property!
v3: Shadow the legacy state to avoid locking issues in get_property (Maarten).
v4: Review from Laurent
- Move struct omap_crtc_state into omap_crtc.c
- Clean up comments.
- Don't forget to copy the shadowed state over on duplicate.
v5: Don't forget to update the reset handler (Maarten).
v6: Update omap_crtc_state shadow values in omap_crtc_atomic_check (Maarten).
--- drivers/gpu/drm/omapdrm/omap_crtc.c | 118 +++++++++++++++++++++++++----------- 1 file changed, 81 insertions(+), 37 deletions(-)
drivers/gpu/drm/omapdrm/omap_crtc.c +81 -37
@@ -26,6 +26,16 @@#include "omap_drv.h" +#define to_omap_crtc_state (x) container_of(x, struct omap_crtc_state, base) + +struct omap_crtc_state { +/* Must be first. */ +struct drm_crtc_state base; +/* Shadow values for legacy userspace support. */ +unsigned int rotation; +unsigned int zpos; +}; +#define to_omap_crtc (x) container_of(x, struct omap_crtc, base)struct omap_crtc {
@@ -445,6 +455,8 @@ static void omap_crtc_mode_set_nofb(struct drm_crtc *crtc)static int omap_crtc_atomic_check (struct drm_crtc *crtc,struct drm_crtc_state *state) { +struct drm_plane_state *pri_state; +if (state->color_mgmt_changed && state->gamma_lut) {uint length = state->gamma_lut->length /sizeof (struct drm_color_lut );
@@ -453,6 +465,16 @@ static int omap_crtc_atomic_check(struct drm_crtc *crtc,return -EINVAL ; } + pri_state =drm_atomic_get_new_plane_state (state->state, crtc->primary); +if (pri_state) { +struct omap_crtc_state *omap_crtc_state = +to_omap_crtc_state (state); + +/* Mirror new values for zpos and rotation in omap_crtc_state */ + omap_crtc_state->zpos = pri_state->zpos; + omap_crtc_state->rotation = pri_state->rotation; + } +return 0 ; }
@@ -498,39 +520,32 @@ static void omap_crtc_atomic_flush(struct drm_crtc *crtc,spin_unlock_irq (&crtc->dev->event_lock); } -static bool omap_crtc_is_plane_prop (struct drm_crtc *crtc, -struct drm_property *property) -{ -struct drm_device *dev = crtc->dev; -struct omap_drm_private *priv = dev->dev_private; - -return property == priv->zorder_prop || - property == crtc->primary->rotation_property; -} -static int omap_crtc_atomic_set_property (struct drm_crtc *crtc,struct drm_crtc_state *state,struct drm_property *property,uint64_t val) { -if (omap_crtc_is_plane_prop (crtc, property)) { -struct drm_plane_state *plane_state; -struct drm_plane *plane = crtc->primary; - -/* -* Delegate property set to the primary plane. Get the plane -* state and set the property directly. -*/ - - plane_state =drm_atomic_get_plane_state (state->state, plane); -if (IS_ERR (plane_state)) -return PTR_ERR (plane_state); +struct omap_drm_private *priv = crtc->dev->dev_private; +struct drm_plane_state *plane_state; -return drm_atomic_plane_set_property (plane, plane_state, - property, val); +/* +* Delegate property set to the primary plane. Get the plane state and +* set the property directly, but keep a shadow copy for the +* atomic_get_property callback. +*/ + plane_state =drm_atomic_get_plane_state (state->state, crtc->primary); +if (IS_ERR (plane_state)) +return PTR_ERR (plane_state); + +if (property == crtc->primary->rotation_property) { + plane_state->rotation = val; + }else if (property == priv->zorder_prop) { + plane_state->zpos = val; + }else { +return -EINVAL ; } -return -EINVAL ; +return 0 ; } static int omap_crtc_atomic_get_property(struct drm_crtc *crtc,
@@ -538,28 +553,57 @@ static int omap_crtc_atomic_get_property(struct drm_crtc *crtc,struct drm_property *property, uint64_t *val) { - if (omap_crtc_is_plane_prop(crtc, property)) { -/* -* Delegate property get to the primary plane. The -* drm_atomic_plane_get_property() function isn't exported, but -* can be called through drm_object_property_get_value() as that -* will call drm_atomic_get_property() for atomic drivers. -*/ -return drm_object_property_get_value (&crtc->primary->base, - property, val); - } + struct omap_drm_private *priv = crtc->dev->dev_private; +struct omap_crtc_state *omap_state =to_omap_crtc_state (state); + +if (property == crtc->primary->rotation_property) +return omap_state->rotation; +else if (property == priv->zorder_prop) +return omap_state->zpos;return -EINVAL ; } +static void omap_crtc_reset (struct drm_crtc *crtc) +{ +if (crtc->state) +__drm_atomic_helper_crtc_destroy_state (crtc->state); + +kfree (crtc->state); + crtc->state =kzalloc (sizeof (struct omap_crtc_state ),GFP_KERNEL ); + +if (crtc->state) + crtc->state->crtc = crtc; +} + +static struct drm_crtc_state * +omap_crtc_duplicate_state (struct drm_crtc *crtc) +{ +struct omap_crtc_state *state, *current_state; + +if (WARN_ON (!crtc->state)) +return NULL ; + + current_state =to_omap_crtc_state (crtc->state); + + state =kmalloc (sizeof (*state),GFP_KERNEL ); +if (state) +__drm_atomic_helper_crtc_duplicate_state (crtc, &state->base); + + state->zpos = current_state->zpos; + state->rotation = current_state->rotation; + +return &state->base; +} +static const struct drm_crtc_funcs omap_crtc_funcs = { - .reset = drm_atomic_helper_crtc_reset, + .reset = omap_crtc_reset, .set_config = drm_atomic_helper_set_config, .destroy = omap_crtc_destroy, .page_flip = drm_atomic_helper_page_flip, .gamma_set = drm_atomic_helper_legacy_gamma_set, .set_property = drm_atomic_helper_crtc_set_property, - .atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state, + .atomic_duplicate_state = omap_crtc_duplicate_state, .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state, .atomic_set_property = omap_crtc_atomic_set_property, .atomic_get_property = omap_crtc_atomic_get_property,
Signature · 7 lines
2.11.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] drm/omap: Rework the rotation-on-crtc hack
Hi,
Quoted 27 lines
Here you go, compile tested version. :)
----8<----
I want/need to rework the core property handling, and this hack is getting in the way. But since it's a non-standard propety only used by legacy userspace we know that this will only every be called from ioctl code. And never on some other free-standing state struct, where this old hack wouldn't work either.v2: don't forget zorder and
get_property!v3: Shadow the legacy state to avoid locking issues in
get_property(Maarten).v4: Review from Laurent
- Move structomap_crtc_stateintoomap_crtc.c
- Clean up comments.
- Don't forget to copy the shadowed state over on duplicate.v5: Don't forget to update the reset handler (Maarten).
v6: Updateomap_crtc_stateshadow values inomap_crtc_atomic_check(Maarten).Reviewed-by Laurent Pinchart <[email protected]> (v4)Cc Maarten Lankhorst <[email protected]>Cc Tomi Valkeinen <[email protected]Cc Laurent Pinchart <[email protected]>Signed-off-by Daniel Vetter <[email protected]>Signed-off-by Maarten Lankhorst <[email protected]>
Quoted 3 lines
--- drivers/gpu/drm/omapdrm/omap_crtc.c | 118 +++++++++++++++++++++++++----------- 1 file changed, 81 insertions(+), 37 deletions(-)
This makes all the CRTC properties disappear...
This doesn't depend on anything in drm-next, does it? I'm currently on v4.13-rc3. I'll look a bit more on what's going on later today.
Tomi
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] drm/omap: Rework the rotation-on-crtc hack
Quoted 31 lines · Tomi Valkeinen
Quoted 27 lines
Here you go, compile tested version. :)
----8<----
I want/need to rework the core property handling, and this hack is getting in the way. But since it's a non-standard propety only used by legacy userspace we know that this will only every be called from ioctl code. And never on some other free-standing state struct, where this old hack wouldn't work either.v2: don't forget zorder and
get_property!v3: Shadow the legacy state to avoid locking issues in
get_property(Maarten).v4: Review from Laurent
- Move structomap_crtc_stateintoomap_crtc.c
- Clean up comments.
- Don't forget to copy the shadowed state over on duplicate.v5: Don't forget to update the reset handler (Maarten).
v6: Updateomap_crtc_stateshadow values inomap_crtc_atomic_check(Maarten).Reviewed-by Laurent Pinchart <[email protected]> (v4)Cc Maarten Lankhorst <[email protected]>Cc Tomi Valkeinen <[email protected]Cc Laurent Pinchart <[email protected]>Signed-off-by Daniel Vetter <[email protected]>Signed-off-by Maarten Lankhorst <[email protected]>Quoted 3 lines
--- drivers/gpu/drm/omapdrm/omap_crtc.c | 118 +++++++++++++++++++++++++----------- 1 file changed, 81 insertions(+), 37 deletions(-)
Quoted 1 line
This makes all the CRTC properties disappear...
Strange, we should still register them, that's really surprising.
Quoted 2 lines
This doesn't depend on anything in drm-next, does it? I'm currently on v4.13-rc3. I'll look a bit more on what's going on later today.
Not that I know of. Later patches will, but this one should be stand-alone. -Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Maarten Lankhorst
maintainerRe: [PATCH] drm/omap: Rework the rotation-on-crtc hack
Op 04-08-17 om 12:02 schreef Daniel Vetter:
Quoted 31 lines · Tomi Valkeinen
Quoted 30 lines
Quoted 30 lines
Here you go, compile tested version. :)
----8<----
I want/need to rework the core property handling, and this hack is getting in the way. But since it's a non-standard propety only used by legacy userspace we know that this will only every be called from ioctl code. And never on some other free-standing state struct, where this old hack wouldn't work either.v2: don't forget zorder and
get_property!v3: Shadow the legacy state to avoid locking issues in
get_property(Maarten).v4: Review from Laurent
- Move structomap_crtc_stateintoomap_crtc.c
- Clean up comments.
- Don't forget to copy the shadowed state over on duplicate.v5: Don't forget to update the reset handler (Maarten).
v6: Updateomap_crtc_stateshadow values inomap_crtc_atomic_check(Maarten).Reviewed-by Laurent Pinchart <[email protected]> (v4)Cc Maarten Lankhorst <[email protected]>Cc Tomi Valkeinen <[email protected]Cc Laurent Pinchart <[email protected]>Signed-off-by Daniel Vetter <[email protected]>Signed-off-by Maarten Lankhorst <[email protected]>--- drivers/gpu/drm/omapdrm/omap_crtc.c | 118 +++++++++++++++++++++++++----------- 1 file changed, 81 insertions(+), 37 deletions(-)
Quoted 7 lines
Quoted 1 line
This makes all the CRTC properties disappear...
Strange, we should still register them, that's really surprising.
Quoted 2 lines
This doesn't depend on anything in drm-next, does it? I'm currently on v4.13-rc3. I'll look a bit more on what's going on later today.
Not that I know of. Later patches will, but this one should be stand-alone. -Daniel
The properties should not disappear, does kms_properties pass?
~Maarten
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Maarten Lankhorst
maintainerRe: [PATCH] drm/omap: Rework the rotation-on-crtc hack
In reply to Daniel VetterOp 04-08-17 om 12:02 schreef Daniel Vetter:
Quoted 31 lines · Tomi Valkeinen
Quoted 30 lines
Quoted 30 lines
Here you go, compile tested version. :)
----8<----
I want/need to rework the core property handling, and this hack is getting in the way. But since it's a non-standard propety only used by legacy userspace we know that this will only every be called from ioctl code. And never on some other free-standing state struct, where this old hack wouldn't work either.v2: don't forget zorder and
get_property!v3: Shadow the legacy state to avoid locking issues in
get_property(Maarten).v4: Review from Laurent
- Move structomap_crtc_stateintoomap_crtc.c
- Clean up comments.
- Don't forget to copy the shadowed state over on duplicate.v5: Don't forget to update the reset handler (Maarten).
v6: Updateomap_crtc_stateshadow values inomap_crtc_atomic_check(Maarten).Reviewed-by Laurent Pinchart <[email protected]> (v4)Cc Maarten Lankhorst <[email protected]>Cc Tomi Valkeinen <[email protected]Cc Laurent Pinchart <[email protected]>Signed-off-by Daniel Vetter <[email protected]>Signed-off-by Maarten Lankhorst <[email protected]>--- drivers/gpu/drm/omapdrm/omap_crtc.c | 118 +++++++++++++++++++++++++----------- 1 file changed, 81 insertions(+), 37 deletions(-)
Quoted 7 lines
Quoted 1 line
This makes all the CRTC properties disappear...
Strange, we should still register them, that's really surprising.
Quoted 2 lines
This doesn't depend on anything in drm-next, does it? I'm currently on v4.13-rc3. I'll look a bit more on what's going on later today.
Not that I know of. Later patches will, but this one should be stand-alone. -Daniel
Oh derp, I also see what's going wrong..
omap_crtc_atomic_get_property returns the value, instead of setting *val and returning 0.
Next version coming up!
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Maarten Lankhorst
maintainerPATCH v7 1/1 drm/omap: Rework the rotation-on-crtc hack
In reply to Daniel VetterOp 04-08-17 om 12:02 schreef Daniel Vetter:
Quoted 31 lines · Tomi Valkeinen
Quoted 30 lines
Quoted 30 lines
Here you go, compile tested version. :)
----8<----
I want/need to rework the core property handling, and this hack is getting in the way. But since it's a non-standard propety only used by legacy userspace we know that this will only every be called from ioctl code. And never on some other free-standing state struct, where this old hack wouldn't work either.v2: don't forget zorder and
get_property!v3: Shadow the legacy state to avoid locking issues in
get_property(Maarten).v4: Review from Laurent
- Move structomap_crtc_stateintoomap_crtc.c
- Clean up comments.
- Don't forget to copy the shadowed state over on duplicate.v5: Don't forget to update the reset handler (Maarten).
v6: Updateomap_crtc_stateshadow values inomap_crtc_atomic_check(Maarten).Reviewed-by Laurent Pinchart <[email protected]> (v4)Cc Maarten Lankhorst <[email protected]>Cc Tomi Valkeinen <[email protected]Cc Laurent Pinchart <[email protected]>Signed-off-by Daniel Vetter <[email protected]>Signed-off-by Maarten Lankhorst <[email protected]>--- drivers/gpu/drm/omapdrm/omap_crtc.c | 118 +++++++++++++++++++++++++----------- 1 file changed, 81 insertions(+), 37 deletions(-)
Quoted 7 lines
Quoted 1 line
This makes all the CRTC properties disappear...
Strange, we should still register them, that's really surprising.
Quoted 2 lines
This doesn't depend on anything in drm-next, does it? I'm currently on v4.13-rc3. I'll look a bit more on what's going on later today.
Not that I know of. Later patches will, but this one should be stand-alone. -Daniel
----->8--------
I want/need to rework the core property handling, and this hack is getting in the way. But since it's a non-standard propety only used by legacy userspace we know that this will only every be called from ioctl code. And never on some other free-standing state struct, where this old hack wouldn't work either.
v2: don't forget zorder and get_property!
v3: Shadow the legacy state to avoid locking issues in get_property (Maarten).
v4: Review from Laurent
- Move struct omap_crtc_state into omap_crtc.c
- Clean up comments.
- Don't forget to copy the shadowed state over on duplicate.
v5: Don't forget to update the reset handler (Maarten).
v6: Update omap_crtc_state shadow values in omap_crtc_atomic_check (Maarten). v7:
- Fix get_property to return 0 and set value in *val (Maarten).
- Update comment in set_property for changes in v6 (Maarten).
--- drivers/gpu/drm/omapdrm/omap_crtc.c | 124 ++++++++++++++++++++++++------------ 1 file changed, 85 insertions(+), 39 deletions(-)
drivers/gpu/drm/omapdrm/omap_crtc.c +85 -39
@@ -26,6 +26,16 @@#include "omap_drv.h" +#define to_omap_crtc_state (x) container_of(x, struct omap_crtc_state, base) + +struct omap_crtc_state { +/* Must be first. */ +struct drm_crtc_state base; +/* Shadow values for legacy userspace support. */ +unsigned int rotation; +unsigned int zpos; +}; +#define to_omap_crtc (x) container_of(x, struct omap_crtc, base)struct omap_crtc {
@@ -445,6 +455,8 @@ static void omap_crtc_mode_set_nofb(struct drm_crtc *crtc)static int omap_crtc_atomic_check (struct drm_crtc *crtc,struct drm_crtc_state *state) { +struct drm_plane_state *pri_state; +if (state->color_mgmt_changed && state->gamma_lut) {uint length = state->gamma_lut->length /sizeof (struct drm_color_lut );
@@ -453,6 +465,16 @@ static int omap_crtc_atomic_check(struct drm_crtc *crtc,return -EINVAL ; } + pri_state =drm_atomic_get_new_plane_state (state->state, crtc->primary); +if (pri_state) { +struct omap_crtc_state *omap_crtc_state = +to_omap_crtc_state (state); + +/* Mirror new values for zpos and rotation in omap_crtc_state */ + omap_crtc_state->zpos = pri_state->zpos; + omap_crtc_state->rotation = pri_state->rotation; + } +return 0 ; }
@@ -498,39 +520,32 @@ static void omap_crtc_atomic_flush(struct drm_crtc *crtc,spin_unlock_irq (&crtc->dev->event_lock); } -static bool omap_crtc_is_plane_prop (struct drm_crtc *crtc, -struct drm_property *property) -{ -struct drm_device *dev = crtc->dev; -struct omap_drm_private *priv = dev->dev_private; - -return property == priv->zorder_prop || - property == crtc->primary->rotation_property; -} -static int omap_crtc_atomic_set_property (struct drm_crtc *crtc,struct drm_crtc_state *state,struct drm_property *property,uint64_t val) { -if (omap_crtc_is_plane_prop (crtc, property)) { -struct drm_plane_state *plane_state; -struct drm_plane *plane = crtc->primary; - -/* -* Delegate property set to the primary plane. Get the plane -* state and set the property directly. -*/ - - plane_state =drm_atomic_get_plane_state (state->state, plane); -if (IS_ERR (plane_state)) -return PTR_ERR (plane_state); +struct omap_drm_private *priv = crtc->dev->dev_private; +struct drm_plane_state *plane_state; -return drm_atomic_plane_set_property (plane, plane_state, - property, val); - } +/* +* Delegate property set to the primary plane. Get the plane state and +* set the property directly, the shadow copy will be assigned in the +* omap_crtc_atomic_check callback. This way updates to plane state will +* always be mirrored in the crtc state correctly. +*/ + plane_state =drm_atomic_get_plane_state (state->state, crtc->primary); +if (IS_ERR (plane_state)) +return PTR_ERR (plane_state); + +if (property == crtc->primary->rotation_property) + plane_state->rotation = val; +else if (property == priv->zorder_prop) + plane_state->zpos = val; +else +return -EINVAL ; -return -EINVAL ; +return 0 ; } static int omap_crtc_atomic_get_property(struct drm_crtc *crtc,
@@ -538,28 +553,59 @@ static int omap_crtc_atomic_get_property(struct drm_crtc *crtc,struct drm_property *property, uint64_t *val) { - if (omap_crtc_is_plane_prop(crtc, property)) { -/* -* Delegate property get to the primary plane. The -* drm_atomic_plane_get_property() function isn't exported, but -* can be called through drm_object_property_get_value() as that -* will call drm_atomic_get_property() for atomic drivers. -*/ -return drm_object_property_get_value (&crtc->primary->base, - property, val); - } + struct omap_drm_private *priv = crtc->dev->dev_private; +struct omap_crtc_state *omap_state =to_omap_crtc_state (state); + +if (property == crtc->primary->rotation_property) + *val = omap_state->rotation; +else if (property == priv->zorder_prop) + *val = omap_state->zpos; +else +return -EINVAL ; + +return 0 ; +} + +static void omap_crtc_reset (struct drm_crtc *crtc) +{ +if (crtc->state) +__drm_atomic_helper_crtc_destroy_state (crtc->state); + +kfree (crtc->state); + crtc->state =kzalloc (sizeof (struct omap_crtc_state ),GFP_KERNEL ); + +if (crtc->state) + crtc->state->crtc = crtc; +} + +static struct drm_crtc_state * +omap_crtc_duplicate_state (struct drm_crtc *crtc) +{ +struct omap_crtc_state *state, *current_state; + +if (WARN_ON (!crtc->state)) +return NULL ; + + current_state =to_omap_crtc_state (crtc->state); + + state =kmalloc (sizeof (*state),GFP_KERNEL ); +if (state) +__drm_atomic_helper_crtc_duplicate_state (crtc, &state->base); + + state->zpos = current_state->zpos; + state->rotation = current_state->rotation; -return -EINVAL ; +return &state->base; }static const struct drm_crtc_funcs omap_crtc_funcs = { - .reset = drm_atomic_helper_crtc_reset, + .reset = omap_crtc_reset, .set_config = drm_atomic_helper_set_config, .destroy = omap_crtc_destroy, .page_flip = drm_atomic_helper_page_flip, .gamma_set = drm_atomic_helper_legacy_gamma_set, .set_property = drm_atomic_helper_crtc_set_property, - .atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state, + .atomic_duplicate_state = omap_crtc_duplicate_state, .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state, .atomic_set_property = omap_crtc_atomic_set_property, .atomic_get_property = omap_crtc_atomic_get_property,
Signature · 7 lines
2.11.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v7] drm/omap: Rework the rotation-on-crtc hack
Quoted 28 lines · Maarten Lankhorst
I want/need to rework the core property handling, and this hack is getting in the way. But since it's a non-standard propety only used by legacy userspace we know that this will only every be called from ioctl code. And never on some other free-standing state struct, where this old hack wouldn't work either.
v2: don't forget zorder and
get_property!v3: Shadow the legacy state to avoid locking issues in
get_property(Maarten).v4: Review from Laurent
- Move structomap_crtc_stateintoomap_crtc.c
- Clean up comments.
- Don't forget to copy the shadowed state over on duplicate.v5: Don't forget to update the reset handler (Maarten).
v6: Updateomap_crtc_stateshadow values inomap_crtc_atomic_check(Maarten). v7:
- Fixget_propertyto return 0 and set value in *val (Maarten).
- Update comment inset_propertyfor changes in v6 (Maarten).Reviewed-by Laurent Pinchart <[email protected]> (v4)Cc Maarten Lankhorst <[email protected]>Cc Tomi Valkeinen <[email protected]Cc Laurent Pinchart <[email protected]>Signed-off-by Daniel Vetter <[email protected]>Signed-off-by Maarten Lankhorst <[email protected]>
Quoted 3 lines
--- drivers/gpu/drm/omapdrm/omap_crtc.c | 124 ++++++++++++++++++++++++------------ 1 file changed, 85 insertions(+), 39 deletions(-)
Thanks, works now.
Tomi
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 2/8 drm: Don't update property values for atomic drivers
In reply to Daniel VetterAtomic drivers only use the property value store for immutable (i.e. can't be set by userspace, but the kernel can still adjust it) properties. The only tricky part is the removal of the update in drm_atomic_helper_update_legacy_modeset_state().
This was added in
commit 8c10342cb48f3140d9abeadcfd2fa6625d447282 (tag: topic/drm-misc-2015-07-28)
Author: Maarten Lankhorst <[email protected]> Date: Mon Jul 27 13:24:29 2015 +0200
drm/atomic: Update legacy DPMS state during modesets, v3.
by copying it from the i915 code, where it was originally added in
commit 68d3472047a572936551f8ff0b6f4016c5a1fdef
Author: Daniel Vetter <[email protected]> Date: Thu Sep 6 22:08:35 2012 +0200
drm/i915: update dpms property in set_mode
for the legacy modeset code. The reason we needed this hack was that i915 didn't yet set DRIVER_ATOMIC, and we checked for that instead of the newer-ish drm_drv_uses_atomic_modeset(), which avoids such troubles. With the correct feature checks this isn't needed anymore at all.
Also make sure that drivers don't accidentally get this wrong by making the exported version of drm_object_property_get_value() only work for legacy drivers. Only gma500 uses it anyway.
--- drivers/gpu/drm/drm_atomic_helper.c | 4 --- drivers/gpu/drm/drm_connector.c | 3 +-- drivers/gpu/drm/drm_crtc.c | 2 +- drivers/gpu/drm/drm_mode_object.c | 49 +++++++++++++++++++++++-------------- drivers/gpu/drm/drm_plane.c | 2 +- 5 files changed, 33 insertions(+), 27 deletions(-)
drivers/gpu/drm/drm_atomic_helper.c +0 -4
@@ -921,16 +921,12 @@ drm_atomic_helper_update_legacy_modeset_state(struct drm_device *dev, crtc = new_conn_state->crtc;if ((!crtc && old_conn_state->crtc) || (crtc &&drm_atomic_crtc_needs_modeset (crtc->state))) { -struct drm_property *dpms_prop = - dev->mode_config.dpms_property;int mode =DRM_MODE_DPMS_OFF ;if (crtc && crtc->state->active) mode =DRM_MODE_DPMS_ON ; connector->dpms = mode; -drm_object_property_set_value (&connector->base, - dpms_prop, mode); } }
drivers/gpu/drm/drm_connector.c +1 -2
@@ -1225,8 +1225,7 @@ int drm_mode_connector_set_obj_prop(struct drm_mode_object *obj, }else if (connector->funcs->set_property) ret = connector->funcs->set_property (connector, property, value); -/* store the property value if successful */ -if (!ret) +if (!ret &&drm_drv_uses_atomic_modeset (property->dev))drm_object_property_set_value (&connector->base, property, value);return ret; }
drivers/gpu/drm/drm_crtc.c +1 -1
@@ -736,7 +736,7 @@ int drm_mode_crtc_set_obj_prop(struct drm_mode_object *obj,if (crtc->funcs->set_property) ret = crtc->funcs->set_property (crtc, property, value); -if (!ret) +if (!ret &&drm_drv_uses_atomic_modeset (property->dev))drm_object_property_set_value (obj, property, value);return ret;
drivers/gpu/drm/drm_mode_object.c +30 -19
73 lines not on this page · raw message
drivers/gpu/drm/drm_plane.c +1 -1
@@ -330,7 +330,7 @@ int drm_mode_plane_set_obj_prop(struct drm_plane *plane,if (plane->funcs->set_property) ret = plane->funcs->set_property (plane, property, value); -if (!ret) +if (!ret &&drm_drv_uses_atomic_modeset (property->dev))drm_object_property_set_value (obj, property, value);return ret;
Signature · 6 lines
2.13.3 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Maarten Lankhorst
maintainerRe: [PATCH 2/8] drm: Don't update property values for atomic drivers
Op 25-07-17 om 10:01 schreef Daniel Vetter:
Quoted 81 lines
Atomic drivers only use the property value store for immutable (i.e. can't be set by userspace, but the kernel can still adjust it) properties. The only tricky part is the removal of the update in
drm_atomic_helper_update_legacy_modeset_state().This was added in
commit
8c10342cb48f3140d9abeadcfd2fa6625d447282(tag: topic/drm-misc-2015-07-28)Author: Maarten Lankhorst <[email protected]> Date: Mon Jul 27 13:24:29 2015 +0200drm/atomic: Update legacy DPMS state during modesets, v3.
by copying it from the i915 code, where it was originally added in
commit
68d3472047a572936551f8ff0b6f4016c5a1fdefAuthor: Daniel Vetter <[email protected]> Date: Thu Sep 6 22:08:35 2012 +0200drm/i915: update dpms property in
set_modefor the legacy modeset code. The reason we needed this hack was that i915 didn't yet set
DRIVER_ATOMIC, and we checked for that instead of the newer-ishdrm_drv_uses_atomic_modeset(), which avoids such troubles. With the correct feature checks this isn't needed anymore at all.Also make sure that drivers don't accidentally get this wrong by making the exported version of
drm_object_property_get_value()only work for legacy drivers. Only gma500 uses it anyway.Cc Maarten Lankhorst <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- drivers/gpu/drm/drm_atomic_helper.c | 4 --- drivers/gpu/drm/drm_connector.c | 3 +-- drivers/gpu/drm/drm_crtc.c | 2 +- drivers/gpu/drm/drm_mode_object.c | 49 +++++++++++++++++++++++-------------- drivers/gpu/drm/drm_plane.c | 2 +- 5 files changed, 33 insertions(+), 27 deletions(-)drivers/gpu/drm/drm_atomic_helper.c +0
-4@@ -921,16 +921,12 @@ drm_atomic_helper_update_legacy_modeset_state(struct drm_device *dev, crtc = new_conn_state->crtc;if ((!crtc && old_conn_state->crtc) || (crtc &&drm_atomic_crtc_needs_modeset (crtc->state))) { -struct drm_property *dpms_prop = - dev->mode_config.dpms_property;int mode =DRM_MODE_DPMS_OFF ;if (crtc && crtc->state->active) mode =DRM_MODE_DPMS_ON ; connector->dpms = mode; -drm_object_property_set_value (&connector->base, - dpms_prop, mode); } }drivers/gpu/drm/drm_connector.c +1
-2@@ -1225,8 +1225,7 @@ int drm_mode_connector_set_obj_prop(struct drm_mode_object *obj, }else if (connector->funcs->set_property) ret = connector->funcs->set_property (connector, property, value); -/* store the property value if successful */ -if (!ret) +if (!ret &&drm_drv_uses_atomic_modeset (property->dev))drm_object_property_set_value (&connector->base, property, value);return ret; }drivers/gpu/drm/drm_crtc.c +0
-0
drivers/gpu/drm/drm_crtc.c int drm_mode_crtc_set_obj_prop(struct drm_mode_object *obj, · line 740
Quoted 6 lines
drivers/gpu/drm/drm_crtc.c +1
-1@@ -736,7 +736,7 @@ int drm_mode_crtc_set_obj_prop(struct drm_mode_object *obj,if (crtc->funcs->set_property) ret = crtc->funcs->set_property (crtc, property, value); -if (!ret) +if (!ret &&drm_drv_uses_atomic_modeset (property->dev))drm_object_property_set_value (obj, property, value);
You've inverted the checks here for connector and crtc. :)
Otherwise looks sane, fix this and you can add my r-b.
On second thought, as penance you should add kms_properties to the fast-feedback testlist. ;)
Quoted 87 lines
drivers/gpu/drm/drm_crtc.c +0
-0return ret;drivers/gpu/drm/drm_mode_object.c +30
-19@@ -233,6 +233,9 @@ int drm_object_property_set_value(struct drm_mode_object *obj, {int i; +WARN_ON (drm_drv_uses_atomic_modeset (property->dev) && + !(property->flags &DRM_MODE_PROP_IMMUTABLE )); +for (i =0 ; i < obj->properties->count; i++) {if (obj->properties->properties[i] == property) { obj->properties->values[i] = val;@@ -244,24 +247,7 @@ int drm_object_property_set_value(struct drm_mode_object *obj, }EXPORT_SYMBOL (drm_object_property_set_value); -/** -* drm_object_property_get_value - retrieve the value of a property -* @obj: drm mode object to get property value from -* @property: property to retrieve -* @val: storage for the property value -* -* This function retrieves the softare state of the given property for the given -* property. Since there is no driver callback to retrieve the current property -* value this might be out of sync with the hardware, depending upon the driver -* and property. -* -* Atomic drivers should never call this function directly, the core will read -* out property values through the various ->atomic_get_property callbacks. -* -* Returns: -* Zero on success, error code on failure. -*/ -int drm_object_property_get_value (struct drm_mode_object *obj, +int __drm_object_property_get_value (struct drm_mode_object *obj,struct drm_property *property,uint64_t *val) {int i;@@ -284,6 +270,31 @@ int drm_object_property_get_value(struct drm_mode_object *obj,return -EINVAL ; } + +/** +* drm_object_property_get_value - retrieve the value of a property +* @obj: drm mode object to get property value from +* @property: property to retrieve +* @val: storage for the property value +* +* This function retrieves the softare state of the given property for the given +* property. Since there is no driver callback to retrieve the current property +* value this might be out of sync with the hardware, depending upon the driver +* and property. +* +* Atomic drivers should never call this function directly, the core will read +* out property values through the various ->atomic_get_property callbacks. +* +* Returns: +* Zero on success, error code on failure. +*/ +int drm_object_property_get_value (struct drm_mode_object *obj, +struct drm_property *property,uint64_t *val) +{ +WARN_ON (drm_drv_uses_atomic_modeset (property->dev)); + +return __drm_object_property_get_value (obj, property, val); +}EXPORT_SYMBOL (drm_object_property_get_value);/* helper for getconnector and getproperties ioctls */ @@ -302,7 +313,7 @@ int drm_mode_object_get_properties(struct drm_mode_object *obj, bool atomic,continue ;if (*arg_count_props > count) { - ret =drm_object_property_get_value (obj, prop, &val); + ret =__drm_object_property_get_value (obj, prop, &val);if (ret)return ret;drivers/gpu/drm/drm_plane.c +0
-0
drivers/gpu/drm/drm_plane.c int drm_mode_plane_set_obj_prop(struct drm_plane *plane, · line 336
Quoted 8 lines
drivers/gpu/drm/drm_plane.c +1
-1@@ -330,7 +330,7 @@ int drm_mode_plane_set_obj_prop(struct drm_plane *plane,if (plane->funcs->set_property) ret = plane->funcs->set_property (plane, property, value); -if (!ret) +if (!ret &&drm_drv_uses_atomic_modeset (property->dev))drm_object_property_set_value (obj, property, value);return ret;
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 1/1 drm: Don't update property values for atomic drivers
In reply to Daniel VetterAtomic drivers only use the property value store for immutable (i.e. can't be set by userspace, but the kernel can still adjust it) properties. The only tricky part is the removal of the update in drm_atomic_helper_update_legacy_modeset_state().
This was added in
commit 8c10342cb48f3140d9abeadcfd2fa6625d447282 (tag: topic/drm-misc-2015-07-28)
Author: Maarten Lankhorst <[email protected]> Date: Mon Jul 27 13:24:29 2015 +0200
drm/atomic: Update legacy DPMS state during modesets, v3.
by copying it from the i915 code, where it was originally added in
commit 68d3472047a572936551f8ff0b6f4016c5a1fdef
Author: Daniel Vetter <[email protected]> Date: Thu Sep 6 22:08:35 2012 +0200
drm/i915: update dpms property in set_mode
for the legacy modeset code. The reason we needed this hack was that i915 didn't yet set DRIVER_ATOMIC, and we checked for that instead of the newer-ish drm_drv_uses_atomic_modeset(), which avoids such troubles. With the correct feature checks this isn't needed anymore at all.
Also make sure that drivers don't accidentally get this wrong by making the exported version of drm_object_property_get_value() only work for legacy drivers. Only gma500 uses it anyway.
v2: Fixup the uses_atomic_modeset() checks (Maarten)
--- drivers/gpu/drm/drm_atomic_helper.c | 4 --- drivers/gpu/drm/drm_connector.c | 3 +-- drivers/gpu/drm/drm_crtc.c | 2 +- drivers/gpu/drm/drm_mode_object.c | 49 +++++++++++++++++++++++-------------- drivers/gpu/drm/drm_plane.c | 2 +- 5 files changed, 33 insertions(+), 27 deletions(-)
drivers/gpu/drm/drm_atomic_helper.c +0 -4
@@ -921,16 +921,12 @@ drm_atomic_helper_update_legacy_modeset_state(struct drm_device *dev, crtc = new_conn_state->crtc;if ((!crtc && old_conn_state->crtc) || (crtc &&drm_atomic_crtc_needs_modeset (crtc->state))) { -struct drm_property *dpms_prop = - dev->mode_config.dpms_property;int mode =DRM_MODE_DPMS_OFF ;if (crtc && crtc->state->active) mode =DRM_MODE_DPMS_ON ; connector->dpms = mode; -drm_object_property_set_value (&connector->base, - dpms_prop, mode); } }
drivers/gpu/drm/drm_connector.c +1 -2
@@ -1225,8 +1225,7 @@ int drm_mode_connector_set_obj_prop(struct drm_mode_object *obj, }else if (connector->funcs->set_property) ret = connector->funcs->set_property (connector, property, value); -/* store the property value if successful */ -if (!ret) +if (!ret && !drm_drv_uses_atomic_modeset (property->dev))drm_object_property_set_value (&connector->base, property, value);return ret; }
drivers/gpu/drm/drm_crtc.c +1 -1
@@ -736,7 +736,7 @@ int drm_mode_crtc_set_obj_prop(struct drm_mode_object *obj,if (crtc->funcs->set_property) ret = crtc->funcs->set_property (crtc, property, value); -if (!ret) +if (!ret && !drm_drv_uses_atomic_modeset (property->dev))drm_object_property_set_value (obj, property, value);return ret;
drivers/gpu/drm/drm_mode_object.c +30 -19
73 lines not on this page · raw message
drivers/gpu/drm/drm_plane.c +1 -1
@@ -330,7 +330,7 @@ int drm_mode_plane_set_obj_prop(struct drm_plane *plane,if (plane->funcs->set_property) ret = plane->funcs->set_property (plane, property, value); -if (!ret) +if (!ret && !drm_drv_uses_atomic_modeset (property->dev))drm_object_property_set_value (obj, property, value);return ret;
Signature · 6 lines
2.13.3 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Laurent Pinchart
reviewerRe: [PATCH 2/8] drm: Don't update property values for atomic drivers
In reply to Daniel VetterHi Daniel,
Quoted 69 lines · On Tuesday 25 Jul 2017 10:01:16 Daniel Vetter wrote:
Atomic drivers only use the property value store for immutable (i.e. can't be set by userspace, but the kernel can still adjust it) properties. The only tricky part is the removal of the update in
drm_atomic_helper_update_legacy_modeset_state().This was added in
commit
8c10342cb48f3140d9abeadcfd2fa6625d447282(tag:
topic/drm-misc-2015-07-28) Author: Maarten Lankhorst <[email protected]>
Date: Mon Jul 27 13:24:29 2015 +0200drm/atomic: Update legacy DPMS state during modesets, v3.
by copying it from the i915 code, where it was originally added in
commit
68d3472047a572936551f8ff0b6f4016c5a1fdefAuthor: Daniel Vetter <[email protected]> Date: Thu Sep 6 22:08:35 2012 +0200drm/i915: update dpms property in
set_modefor the legacy modeset code. The reason we needed this hack was that i915 didn't yet set
DRIVER_ATOMIC, and we checked for that instead of the newer-ishdrm_drv_uses_atomic_modeset(), which avoids such troubles. With the correct feature checks this isn't needed anymore at all.Also make sure that drivers don't accidentally get this wrong by making the exported version of
drm_object_property_get_value()only work for legacy drivers. Only gma500 uses it anyway.Cc Maarten Lankhorst <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- drivers/gpu/drm/drm_atomic_helper.c | 4 --- drivers/gpu/drm/drm_connector.c | 3 +-- drivers/gpu/drm/drm_crtc.c | 2 +- drivers/gpu/drm/drm_mode_object.c | 49 ++++++++++++++++++++-------------- drivers/gpu/drm/drm_plane.c | 2 +- 5 files changed, 33 insertions(+), 27 deletions(-)(quoted diff) +0
-0
b/drivers/gpu/drm/drm_atomic_helper.cindex7582bbc5decc..4a960c741e35100644drivers/gpu/drm/drm_atomic_helper.c +0
-4@@ -921,16 +921,12 @@ drm_atomic_helper_update_legacy_modeset_state(structdrm_device *dev, crtc = new_conn_state->crtc;if ((!crtc && old_conn_state->crtc) || (crtc &&drm_atomic_crtc_needs_modeset (crtc->state))) { -struct drm_property *dpms_prop = - dev->mode_config.dpms_property;int mode =DRM_MODE_DPMS_OFF ;if (crtc && crtc->state->active) mode =DRM_MODE_DPMS_ON ; connector->dpms = mode; -drm_object_property_set_value (&connector->base, - dpms_prop, mode); } }(quoted diff) +0
-0
b/drivers/gpu/drm/drm_connector.cindex8072e6e4c62c..349104eadefe100644
drivers/gpu/drm/drm_connector.c int drm_mode_connector_set_obj_prop(struct · line 1226
Quoted 2 lines
drivers/gpu/drm/drm_connector.c +0
-0@@ -1225,8 +1225,7 @@ int drm_mode_connector_set_obj_prop(struct drm_mode_object *obj, } else if (connector->funcs->set_property) ret = connector->funcs->set_property(connector, property,
value);
drivers/gpu/drm/drm_connector.c int drm_mode_connector_set_obj_prop(struct drm_mode_object *obj,
Quoted 5 lines
drivers/gpu/drm/drm_connector.c +1
-2-/* store the property value if successful */ -if (!ret) +if (!ret &&drm_drv_uses_atomic_modeset (property->dev)) drm_object_property_set_value(&connector->base, property,
value);
Quoted 21 lines
drivers/gpu/drm/drm_connector.c +0
-0return ret; }drivers/gpu/drm/drm_crtc.c +1
-1@@ -736,7 +736,7 @@ int drm_mode_crtc_set_obj_prop(struct drm_mode_object *obj, if (crtc->funcs->set_property) ret = crtc->funcs->set_property(crtc, property, value); -if (!ret) +if (!ret &&drm_drv_uses_atomic_modeset (property->dev))drm_object_property_set_value (obj, property, value);drivers/gpu/drm/drm_crtc.c +0
-0return ret;(quoted diff) +0
-0
b/drivers/gpu/drm/drm_mode_object.cindexda9a9adbcc98..92743a796bf0100644
drivers/gpu/drm/drm_mode_object.c int drm_object_property_set_value(struct drm_mode_object · line 237
Quoted 5 lines
drivers/gpu/drm/drm_mode_object.c +2
-0@@ -233,6 +233,9 @@ int drm_object_property_set_value(struct drm_mode_object *obj, {int i; +WARN_ON (drm_drv_uses_atomic_modeset (property->dev) && + !(property->flags &DRM_MODE_PROP_IMMUTABLE ));
It would have been nice to remove the calls to drm_object_property_set_value() for the dpms property from drivers before adding this :-/ Three drivers (rcar- du, shmobile and fsl-dcu) initialize the connector's DPMS property to OFF using this call (the default being ON).
Following the DPMS code paths always give me a headache, so if you know by heart how I should replace the set property call, I'm all ears :-)
Quoted 24 lines
drivers/gpu/drm/drm_mode_object.c +0
-7for (i =0 ; i < obj->properties->count; i++) {if (obj->properties->properties[i] == property) { obj->properties->values[i] = val;@@ -244,24 +247,7 @@ int drm_object_property_set_value(struct drm_mode_object *obj, }EXPORT_SYMBOL (drm_object_property_set_value ); -/** -* drm_object_property_get_value - retrieve the value of a property -* @obj: drm mode object to get property value from -* @property: property to retrieve -* @val: storage for the property value -* -* This function retrieves the softare state of the given property for the given - * property. Since there is no driver callback to retrieve the current property - * value this might be out of sync with the hardware, depending upon the driver - * and property.
- *
- * Atomic drivers should never call this function directly, the core will read - * out property values through the various ->atomic_get_property callbacks. - *
- * Returns:
- * Zero on success, error code on failure.
- */
drivers/gpu/drm/drm_mode_object.c int drm_object_property_set_value(struct drm_mode_object *obj,
Quoted 3 lines
drivers/gpu/drm/drm_mode_object.c +1
-1-int drm_object_property_get_value (struct drm_mode_object *obj, +int __drm_object_property_get_value (struct drm_mode_object *obj, struct drm_property *property, uint64_t
*val)
Quoted 25 lines
{
drivers/gpu/drm/drm_mode_object.c +8
-0int i;@@ -284,6 +270,31 @@ int drm_object_property_get_value(struct drm_mode_object *obj, return -EINVAL ; } + +/** +* drm_object_property_get_value - retrieve the value of a property +* @obj: drm mode object to get property value from +* @property: property to retrieve +* @val: storage for the property value +* +* This function retrieves the softare state of the given property for the given + * property. Since there is no driver callback to retrieve the current property + * value this might be out of sync with the hardware, depending upon the driver + * and property.
+ *
+ * Atomic drivers should never call this function directly, the core will read + * out property values through the various ->atomic_get_property callbacks. + *
+ * Returns:
+ * Zero on success, error code on failure.
+ */
drivers/gpu/drm/drm_mode_object.c
Quoted 2 lines
drivers/gpu/drm/drm_mode_object.c +2
-0+int drm_object_property_get_value (struct drm_mode_object *obj, + struct drm_property *property, uint64_t
*val)
Quoted 9 lines
drivers/gpu/drm/drm_mode_object.c +5
-0+{ +WARN_ON (drm_drv_uses_atomic_modeset (property->dev)); + +return __drm_object_property_get_value (obj, property, val); +}EXPORT_SYMBOL (drm_object_property_get_value);/* helper for getconnector and getproperties ioctls */
drivers/gpu/drm/drm_mode_object.c int drm_mode_object_get_properties(struct · line 316
Quoted 5 lines
drivers/gpu/drm/drm_mode_object.c +1
-1@@ -302,7 +313,7 @@ int drm_mode_object_get_properties(struct drm_mode_object *obj, bool atomic, continue;if (*arg_count_props > count) { - ret =drm_object_property_get_value (obj, prop, &val); + ret = __drm_object_property_get_value(obj, prop,
&val);
Quoted 16 lines
drivers/gpu/drm/drm_mode_object.c +0
-0if (ret)return ret;drivers/gpu/drm/drm_plane.c +1
-1@@ -330,7 +330,7 @@ int drm_mode_plane_set_obj_prop(struct drm_plane *plane,if (plane->funcs->set_property) ret = plane->funcs->set_property (plane, property, value); -if (!ret) +if (!ret &&drm_drv_uses_atomic_modeset (property->dev))drm_object_property_set_value (obj, property, value);return ret;
Signature · 8 lines
Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 2/8] drm: Don't update property values for atomic drivers
Quoted 17 lines · Laurent Pinchart
drivers/gpu/drm/drm_mode_object.c int drm_object_property_set_value(struct drm_mode_object · line 237
Quoted 10 lines · On Tuesday 25 Jul 2017 10:01:16 Daniel Vetter wrote:
(quoted diff) +0
-0
b/drivers/gpu/drm/drm_mode_object.cindexda9a9adbcc98..92743a796bf0100644drivers/gpu/drm/drm_mode_object.c +2
-0@@ -233,6 +233,9 @@ int drm_object_property_set_value(struct drm_mode_object *obj, {int i; +WARN_ON (drm_drv_uses_atomic_modeset (property->dev) && + !(property->flags &DRM_MODE_PROP_IMMUTABLE ));It would have been nice to remove the calls to
drm_object_property_set_value()for the dpms property from drivers before adding this :-/ Three drivers (rcar- du, shmobile and fsl-dcu) initialize the connector's DPMS property to OFF using this call (the default being ON).
Quoted 2 lines
Following the DPMS code paths always give me a headache, so if you know by heart how I should replace the set property call, I'm all ears :-)
Remove, it doesn't do anything for kms drivers. The value these calls update was never consulted when reading the property, instead drm_atomic_connector_get_property() directly looks at drm_connector->dpms. These calls where only needed for legacy modeset. Also note that the default _ON is the right one, since DPMS state is in addition to modeset state. dpms should actually be set to _ON when you enable the display using a modeset call, atomic takes care of that in drm_atomic_helper_update_legacy_modeset_state().
Aka we found a using this WARN_ON!
And if you think the above explanation should be somewhere in kerneldoc, pls add :-)
-Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Laurent Pinchart
reviewerRe: [PATCH 2/8] drm: Don't update property values for atomic drivers
Quoted 23 lines · On Monday 14 Aug 2017 09:25:47 Daniel Vetter wrote:
On Sat, Aug 12, 2017 at 12:20 AM, Laurent Pinchart
Quoted 20 lines · <[email protected]> wrote:
drivers/gpu/drm/drm_mode_object.c int drm_object_property_set_value(struct · line 238
Quoted 12 lines · On Tuesday 25 Jul 2017 10:01:16 Daniel Vetter wrote:
(quoted diff) +0
-0
b/drivers/gpu/drm/drm_mode_object.cindexda9a9adbcc98..92743a796bf0100644drivers/gpu/drm/drm_mode_object.c +2
-0@@ -233,6 +233,9 @@ int drm_object_property_set_value(struct drm_mode_object *obj, { int i; +WARN_ON (drm_drv_uses_atomic_modeset (property->dev) && + !(property->flags &DRM_MODE_PROP_IMMUTABLE ));It would have been nice to remove the calls to
drm_object_property_set_value()for the dpms property from drivers before adding this :-/ Three drivers (rcar- du, shmobile and fsl-dcu) initialize the connector's DPMS property to OFF using this call (the default being ON).
Quoted 7 lines
Quoted 2 lines
Following the DPMS code paths always give me a headache, so if you know by heart how I should replace the set property call, I'm all ears :-)
Remove, it doesn't do anything for kms drivers. The value these calls update was never consulted when reading the property, instead
drm_atomic_connector_get_property()directly looks atdrm_connector->dpms.
But DRM_IOCTL_MODE_OBJ_GETPROPERTIES doesn't, it gets the property value directly, doesn't it ?
Quoted 5 lines
These calls where only needed for legacy modeset. Also note that the default
_ONis the right one, since DPMS state is in addition to modeset state. dpms should actually be set to_ONwhen you enable the display using a modeset call, atomic takes care of that indrm_atomic_helper_update_legacy_modeset_state().
Sure, but the connectors should start disabled, shouldn't they ?
Quoted 4 lines
Aka we found a using this
WARN_ON!And if you think the above explanation should be somewhere in kerneldoc, pls add :-)
Signature · 8 lines
Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 2/8] drm: Don't update property values for atomic drivers
Quoted 27 lines · Laurent Pinchart
Quoted 26 lines · On Monday 14 Aug 2017 09:25:47 Daniel Vetter wrote:
On Sat, Aug 12, 2017 at 12:20 AM, Laurent Pinchart
Quoted 22 lines · <[email protected]> wrote:
drivers/gpu/drm/drm_mode_object.c int drm_object_property_set_value(struct · line 238
Quoted 12 lines · On Tuesday 25 Jul 2017 10:01:16 Daniel Vetter wrote:
(quoted diff) +0
-0
b/drivers/gpu/drm/drm_mode_object.cindexda9a9adbcc98..92743a796bf0100644drivers/gpu/drm/drm_mode_object.c +2
-0@@ -233,6 +233,9 @@ int drm_object_property_set_value(struct drm_mode_object *obj, { int i; +WARN_ON (drm_drv_uses_atomic_modeset (property->dev) && + !(property->flags &DRM_MODE_PROP_IMMUTABLE ));It would have been nice to remove the calls to
drm_object_property_set_value()for the dpms property from drivers before adding this :-/ Three drivers (rcar- du, shmobile and fsl-dcu) initialize the connector's DPMS property to OFF using this call (the default being ON).Following the DPMS code paths always give me a headache, so if you know by heart how I should replace the set property call, I'm all ears :-)
Quoted 7 lines
Quoted 4 lines
Remove, it doesn't do anything for kms drivers. The value these calls update was never consulted when reading the property, instead
drm_atomic_connector_get_property()directly looks atdrm_connector->dpms.But
DRM_IOCTL_MODE_OBJ_GETPROPERTIESdoesn't, it gets the property value directly, doesn't it ?
It redirects to the atomic machinery, so should all work out.
Quoted 7 lines
Quoted 5 lines
These calls where only needed for legacy modeset. Also note that the default
_ONis the right one, since DPMS state is in addition to modeset state. dpms should actually be set to_ONwhen you enable the display using a modeset call, atomic takes care of that indrm_atomic_helper_update_legacy_modeset_state().Sure, but the connectors should start disabled, shouldn't they ?
Sure, and they are, because connector_state->crtc == NULL. DPMS only matters if your connector is connected, which at boot-up/reset state it isnt. Yes DPMS is one of those thing which with hindsight I'd like to never have happened, it's probably the most quirky uabi we have :-/
If you have userspace that gets confused by this we need to:
a) either fix your userspace
b) if we decide to fix the kernel, fix it for everyone (i.e. in drm_connector_init).
Given that the "standard kms driver" (aka i915.ko) doesn't do that, I don't think we need b).
-Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/8 drm: Handle properties in the core for atomic drivers
In reply to Daniel VetterThe reason behind the original indirection through the helper functions was to allow existing drivers to overwrite how they handle properties. For example when a vendor-specific userspace had expectations that didn't match atomic. That seemed likely, since atomic is standardizing a _lot_ more of the behaviour of a kms driver.
But 20 drivers later there's no such need at all. Worse, this forces all drivers to hook up the default behaviour, breaking userspace if they forget to do that. And it forces us to export a bunch of core function just for those helpers.
And finally, these helpers are the last places using drm_atomic_legacy_backoff() and the implicit acquire_ctx.
This patch here just implements the new behaviour and updates the docs. Follow-up patches will garbage-collect all the dead code.
v2: Fixup docs even better!
v3: Make it actually work ...
--- drivers/gpu/drm/drm_atomic.c | 60 ++++++++++++++++++-- drivers/gpu/drm/drm_connector.c | 6 +- drivers/gpu/drm/drm_crtc_helper.c | 3 +- drivers/gpu/drm/drm_crtc_internal.h | 7 +++ drivers/gpu/drm/drm_mode_object.c | 110 +++++++++++++++++++++++++++--------- include/drm/drm_connector.h | 10 ++-- include/drm/drm_crtc.h | 6 +- include/drm/drm_plane.h | 6 +- 8 files changed, 158 insertions(+), 50 deletions(-)
drivers/gpu/drm/drm_atomic.c +56 -4
@@ -1864,9 +1864,60 @@ static struct drm_pending_vblank_event *create_vblank_event(return e; } -static int atomic_set_prop (struct drm_atomic_state *state, -struct drm_mode_object *obj,struct drm_property *prop, -uint64_t prop_value) +int drm_atomic_connector_commit_dpms (struct drm_atomic_state *state, +struct drm_connector *connector, +int mode) +{ +struct drm_connector *tmp_connector; +struct drm_connector_state *new_conn_state; +struct drm_crtc *crtc; +struct drm_crtc_state *crtc_state; +int i, ret, old_mode = connector->dpms; +bool active = false; + + ret =drm_modeset_lock (&state->dev->mode_config.connection_mutex, + state->acquire_ctx); +if (ret) +return ret; + +if (mode !=DRM_MODE_DPMS_ON ) + mode =DRM_MODE_DPMS_OFF ; + connector->dpms = mode; + + crtc = connector->state->crtc; +if (!crtc) + goto out; + ret =drm_atomic_add_affected_connectors (state, crtc); +if (ret) + goto out; + + crtc_state =drm_atomic_get_crtc_state (state, crtc); +if (IS_ERR (crtc_state)) { + ret =PTR_ERR (crtc_state); + goto out; + } + +for_each_new_connector_in_state (state, tmp_connector, new_conn_state, i) { +if (new_conn_state->crtc != crtc) +continue ; +if (tmp_connector->dpms ==DRM_MODE_DPMS_ON ) { + active = true; +break ; + } + } + + crtc_state->active = active; + ret =drm_atomic_commit (state); +out: +if (ret !=0 ) + connector->dpms = old_mode; +return ret; +} + +int drm_atomic_set_property (struct drm_atomic_state *state, +struct drm_mode_object *obj, +struct drm_property *prop, +uint64_t prop_value) {struct drm_mode_object *ref;int ret;
@@ -2286,7 +2337,8 @@ int drm_mode_atomic_ioctl(struct drm_device *dev, goto out; } - ret =atomic_set_prop (state, obj, prop, prop_value); + ret =drm_atomic_set_property (state, obj, prop, + prop_value);if (ret) {drm_mode_object_put (obj); goto out;
drivers/gpu/drm/drm_connector.c +3 -3
@@ -717,9 +717,9 @@ DRM_ENUM_NAME_FN(drm_get_tv_subconnector_name,* drivers, it remaps to controlling the "ACTIVE" property on the CRTC the * connector is linked to. Drivers should never set this property directly, * it is handled by the DRM core by calling the &drm_connector_funcs.dpms -* callback. Atomic drivers should implement this hook using -* drm_atomic_helper_connector_dpms(). This is the only property standard -* connector property that userspace can change. +* callback. For atomic drivers the remapping to the "ACTIVE" property is +* implemented in the DRM core. This is the only standard connector +* property that userspace can change. * PATH: * Connector path property to identify how this sink is physically * connected. Used by DP MST. This should be set by calling
drivers/gpu/drm/drm_crtc_helper.c +1 -2
@@ -863,8 +863,7 @@ static int drm_helper_choose_crtc_dpms(struct drm_crtc *crtc)* provided by the driver. * * This function is deprecated. New drivers must implement atomic modeset -* support, for which this function is unsuitable. Instead drivers should use -* drm_atomic_helper_connector_dpms(). +* support, where DPMS is handled in the DRM core. * * Returns: * Always returns 0.
drivers/gpu/drm/drm_crtc_internal.h +7 -0
@@ -178,6 +178,13 @@ struct drm_minor;int drm_atomic_debugfs_init (struct drm_minor *minor);#endif +int drm_atomic_connector_commit_dpms (struct drm_atomic_state *state, +struct drm_connector *connector, +int mode); +int drm_atomic_set_property (struct drm_atomic_state *state, +struct drm_mode_object *obj, +struct drm_property *prop, +uint64_t prop_value);int drm_atomic_get_property (struct drm_mode_object *obj,struct drm_property *property,uint64_t *val); int drm_mode_atomic_ioctl(struct drm_device *dev,
drivers/gpu/drm/drm_mode_object.c +83 -27
135 lines not on this page · raw message
include/drm/drm_connector.h +4 -6
@@ -382,8 +382,8 @@ struct drm_connector_funcs {* implement the 4 level DPMS support on the connector any more, but * instead only have an on/off "ACTIVE" property on the CRTC object. * -* Drivers implementing atomic modeset should use -* drm_atomic_helper_connector_dpms() to implement this hook. +* This hook is not used by atomic drivers, remapping of the legacy DPMS +* property is entirely handled in the DRM core. * * RETURNS: *
@@ -480,11 +480,9 @@ struct drm_connector_funcs {* This is the legacy entry point to update a property attached to the * connector. * -* Drivers implementing atomic modeset should use -* drm_atomic_helper_connector_set_property() to implement this hook. -* * This callback is optional if the driver does not support any legacy -* driver-private properties. +* driver-private properties. For atomic drivers it is not used because +* property handling is done entirely in the DRM core. * * RETURNS: *
include/drm/drm_crtc.h +2 -4
@@ -481,11 +481,9 @@ struct drm_crtc_funcs {* This is the legacy entry point to update a property attached to the * CRTC. * -* Drivers implementing atomic modeset should use -* drm_atomic_helper_crtc_set_property() to implement this hook. -* * This callback is optional if the driver does not support any legacy -* driver-private properties. +* driver-private properties. For atomic drivers it is not used because +* property handling is done entirely in the DRM core. * * RETURNS: *
include/drm/drm_plane.h +2 -4
@@ -233,11 +233,9 @@ struct drm_plane_funcs {* This is the legacy entry point to update a property attached to the * plane. * -* Drivers implementing atomic modeset should use -* drm_atomic_helper_plane_set_property() to implement this hook. -* * This callback is optional if the driver does not support any legacy -* driver-private properties. +* driver-private properties. For atomic drivers it is not used because +* property handling is done entirely in the DRM core. * * RETURNS: *
Signature · 6 lines
2.13.3 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/8] drm: Handle properties in the core for atomic drivers
Quoted 14 lines · Daniel Vetter
The reason behind the original indirection through the helper functions was to allow existing drivers to overwrite how they handle properties. For example when a vendor-specific userspace had expectations that didn't match atomic. That seemed likely, since atomic is standardizing a _lot_ more of the behaviour of a kms driver.
But 20 drivers later there's no such need at all. Worse, this forces all drivers to hook up the default behaviour, breaking userspace if they forget to do that. And it forces us to export a bunch of core function just for those helpers.
And finally, these helpers are the last places using
drm_atomic_legacy_backoff()and the implicitacquire_ctx.
Quoted 6 lines
This patch here just implements the new behaviour and updates the docs. Follow-up patches will garbage-collect all the dead code.
v2: Fixup docs even better!
v3: Make it actually work ...
Quoted 348 lines
Signed-off-by Daniel Vetter <[email protected]>--- drivers/gpu/drm/drm_atomic.c | 60 ++++++++++++++++++-- drivers/gpu/drm/drm_connector.c | 6 +- drivers/gpu/drm/drm_crtc_helper.c | 3 +- drivers/gpu/drm/drm_crtc_internal.h | 7 +++ drivers/gpu/drm/drm_mode_object.c | 110 +++++++++++++++++++++++++++--------- include/drm/drm_connector.h | 10 ++-- include/drm/drm_crtc.h | 6 +- include/drm/drm_plane.h | 6 +- 8 files changed, 158 insertions(+), 50 deletions(-)drivers/gpu/drm/drm_atomic.c +56
-4@@ -1864,9 +1864,60 @@ static struct drm_pending_vblank_event *create_vblank_event(return e; } -static int atomic_set_prop (struct drm_atomic_state *state, -struct drm_mode_object *obj,struct drm_property *prop, -uint64_t prop_value) +int drm_atomic_connector_commit_dpms (struct drm_atomic_state *state, +struct drm_connector *connector, +int mode) +{ +struct drm_connector *tmp_connector; +struct drm_connector_state *new_conn_state; +struct drm_crtc *crtc; +struct drm_crtc_state *crtc_state; +int i, ret, old_mode = connector->dpms; +bool active = false; + + ret =drm_modeset_lock (&state->dev->mode_config.connection_mutex, + state->acquire_ctx); +if (ret) +return ret; + +if (mode !=DRM_MODE_DPMS_ON ) + mode =DRM_MODE_DPMS_OFF ; + connector->dpms = mode; + + crtc = connector->state->crtc; +if (!crtc) + goto out; + ret =drm_atomic_add_affected_connectors (state, crtc); +if (ret) + goto out; + + crtc_state =drm_atomic_get_crtc_state (state, crtc); +if (IS_ERR (crtc_state)) { + ret =PTR_ERR (crtc_state); + goto out; + } + +for_each_new_connector_in_state (state, tmp_connector, new_conn_state, i) { +if (new_conn_state->crtc != crtc) +continue ; +if (tmp_connector->dpms ==DRM_MODE_DPMS_ON ) { + active = true; +break ; + } + } + + crtc_state->active = active; + ret =drm_atomic_commit (state); +out: +if (ret !=0 ) + connector->dpms = old_mode; +return ret; +} + +int drm_atomic_set_property (struct drm_atomic_state *state, +struct drm_mode_object *obj, +struct drm_property *prop, +uint64_t prop_value) {struct drm_mode_object *ref;int ret;@@ -2286,7 +2337,8 @@ int drm_mode_atomic_ioctl(struct drm_device *dev, goto out; } - ret =atomic_set_prop (state, obj, prop, prop_value); + ret =drm_atomic_set_property (state, obj, prop, + prop_value);if (ret) {drm_mode_object_put (obj); goto out;drivers/gpu/drm/drm_connector.c +3
-3@@ -717,9 +717,9 @@ DRM_ENUM_NAME_FN(drm_get_tv_subconnector_name,* drivers, it remaps to controlling the "ACTIVE" property on the CRTC the * connector is linked to. Drivers should never set this property directly, * it is handled by the DRM core by calling the &drm_connector_funcs.dpms -* callback. Atomic drivers should implement this hook using -* drm_atomic_helper_connector_dpms(). This is the only property standard -* connector property that userspace can change. +* callback. For atomic drivers the remapping to the "ACTIVE" property is +* implemented in the DRM core. This is the only standard connector +* property that userspace can change. * PATH: * Connector path property to identify how this sink is physically * connected. Used by DP MST. This should be set by calling drivers/gpu/drm/drm_crtc_helper.c +1
-2@@ -863,8 +863,7 @@ static int drm_helper_choose_crtc_dpms(struct drm_crtc *crtc)* provided by the driver. * * This function is deprecated. New drivers must implement atomic modeset -* support, for which this function is unsuitable. Instead drivers should use -* drm_atomic_helper_connector_dpms(). +* support, where DPMS is handled in the DRM core. * * Returns: * Always returns 0. drivers/gpu/drm/drm_crtc_internal.h +7
-0@@ -178,6 +178,13 @@ struct drm_minor;int drm_atomic_debugfs_init (struct drm_minor *minor);#endif +int drm_atomic_connector_commit_dpms (struct drm_atomic_state *state, +struct drm_connector *connector, +int mode); +int drm_atomic_set_property (struct drm_atomic_state *state, +struct drm_mode_object *obj, +struct drm_property *prop, +uint64_t prop_value);int drm_atomic_get_property (struct drm_mode_object *obj,struct drm_property *property,uint64_t *val); int drm_mode_atomic_ioctl(struct drm_device *dev,drivers/gpu/drm/drm_mode_object.c +83
-27@@ -392,6 +392,83 @@ struct drm_property *drm_mode_obj_find_prop_id(struct drm_mode_object *obj,return NULL ; } +static int set_property_legacy (struct drm_mode_object *obj, +struct drm_property *prop, +uint64_t prop_value) +{ +struct drm_device *dev = prop->dev; +struct drm_mode_object *ref; +int ret = -EINVAL ; + +if (!drm_property_change_valid_get (prop, prop_value, &ref)) +return -EINVAL ; + +drm_modeset_lock_all (dev); +switch (obj->type) { +case DRM_MODE_OBJECT_CONNECTOR : + ret =drm_mode_connector_set_obj_prop (obj, prop, + prop_value); +break ; +case DRM_MODE_OBJECT_CRTC : + ret =drm_mode_crtc_set_obj_prop (obj, prop, prop_value); +break ; +case DRM_MODE_OBJECT_PLANE : + ret =drm_mode_plane_set_obj_prop (obj_to_plane (obj), + prop, prop_value); +break ; + } +drm_property_change_valid_put (prop, ref); +drm_modeset_unlock_all (dev); + +return ret; +} + +static int set_property_atomic (struct drm_mode_object *obj, +struct drm_property *prop, +uint64_t prop_value) +{ +struct drm_device *dev = prop->dev; +struct drm_atomic_state *state; +struct drm_modeset_acquire_ctx ctx; +int ret; + +drm_modeset_acquire_init (&ctx,0 ); + + state =drm_atomic_state_alloc (dev); +if (!state) +return -ENOMEM ; + state->acquire_ctx = &ctx; +retry: +if (prop == state->dev->mode_config.dpms_property) { +if (obj->type !=DRM_MODE_OBJECT_CONNECTOR ) { + ret = -EINVAL ; + goto out; + } + + ret =drm_atomic_connector_commit_dpms (state, +obj_to_connector (obj), + prop_value); + }else { + ret =drm_atomic_set_property (state, obj, prop, prop_value); +if (ret) + goto out; + ret =drm_atomic_commit (state); + } +out: +if (ret == -EDEADLK ) { +drm_atomic_state_clear (state); +drm_modeset_backoff (&ctx); + goto retry; + } + +drm_atomic_state_put (state); + +drm_modeset_drop_locks (&ctx); +drm_modeset_acquire_fini (&ctx); + +return ret; +} +int drm_mode_obj_set_property_ioctl (struct drm_device *dev,void *data,struct drm_file *file_priv) {@@ -399,18 +476,13 @@ int drm_mode_obj_set_property_ioctl(struct drm_device *dev, void *data,struct drm_mode_object *arg_obj;struct drm_property *property;int ret = -EINVAL ; -struct drm_mode_object *ref;if (!drm_core_check_feature (dev,DRIVER_MODESET ))return -EINVAL ; -drm_modeset_lock_all (dev); - arg_obj =drm_mode_object_find (dev, arg->obj_id, arg->obj_type); -if (!arg_obj) { - ret = -ENOENT ; - goto out; - } +if (!arg_obj) +return -ENOENT ;if (!arg_obj->properties) goto out_unref;@@ -419,28 +491,12 @@ int drm_mode_obj_set_property_ioctl(struct drm_device *dev, void *data,if (!property) goto out_unref; -if (!drm_property_change_valid_get (property, arg->value, &ref)) - goto out_unref; - -switch (arg_obj->type) { -case DRM_MODE_OBJECT_CONNECTOR : - ret =drm_mode_connector_set_obj_prop (arg_obj, property, - arg->value); -break ; -case DRM_MODE_OBJECT_CRTC : - ret =drm_mode_crtc_set_obj_prop (arg_obj, property, arg->value); -break ; -case DRM_MODE_OBJECT_PLANE : - ret =drm_mode_plane_set_obj_prop (obj_to_plane (arg_obj), - property, arg->value); -break ; - } - -drm_property_change_valid_put (property, ref); +if (drm_drv_uses_atomic_modeset (property->dev)) + ret =set_property_atomic (arg_obj, property, arg->value); +else + ret =set_property_legacy (arg_obj, property, arg->value); out_unref:drm_mode_object_put (arg_obj); -out: -drm_modeset_unlock_all (dev);return ret; }include/drm/drm_connector.h +4
-6@@ -382,8 +382,8 @@ struct drm_connector_funcs {* implement the 4 level DPMS support on the connector any more, but * instead only have an on/off "ACTIVE" property on the CRTC object. * -* Drivers implementing atomic modeset should use -* drm_atomic_helper_connector_dpms() to implement this hook. +* This hook is not used by atomic drivers, remapping of the legacy DPMS +* property is entirely handled in the DRM core. * * RETURNS: * @@ -480,11 +480,9 @@ struct drm_connector_funcs {* This is the legacy entry point to update a property attached to the * connector. * -* Drivers implementing atomic modeset should use -* drm_atomic_helper_connector_set_property() to implement this hook. -* * This callback is optional if the driver does not support any legacy -* driver-private properties. +* driver-private properties. For atomic drivers it is not used because +* property handling is done entirely in the DRM core. * * RETURNS: * include/drm/drm_crtc.h +2
-4@@ -481,11 +481,9 @@ struct drm_crtc_funcs {* This is the legacy entry point to update a property attached to the * CRTC. * -* Drivers implementing atomic modeset should use -* drm_atomic_helper_crtc_set_property() to implement this hook. -* * This callback is optional if the driver does not support any legacy -* driver-private properties. +* driver-private properties. For atomic drivers it is not used because +* property handling is done entirely in the DRM core. * * RETURNS: * include/drm/drm_plane.h +2
-4@@ -233,11 +233,9 @@ struct drm_plane_funcs {* This is the legacy entry point to update a property attached to the * plane. * -* Drivers implementing atomic modeset should use -* drm_atomic_helper_plane_set_property() to implement this hook. -* * This callback is optional if the driver does not support any legacy -* driver-private properties. +* driver-private properties. For atomic drivers it is not used because +* property handling is done entirely in the DRM core. * * RETURNS: *
Signature · 6 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 1/1 drm: Handle properties in the core for atomic drivers
In reply to Daniel VetterThe reason behind the original indirection through the helper functions was to allow existing drivers to overwrite how they handle properties. For example when a vendor-specific userspace had expectations that didn't match atomic. That seemed likely, since atomic is standardizing a _lot_ more of the behaviour of a kms driver.
But 20 drivers later there's no such need at all. Worse, this forces all drivers to hook up the default behaviour, breaking userspace if they forget to do that. And it forces us to export a bunch of core function just for those helpers.
And finally, these helpers are the last places using drm_atomic_legacy_backoff() and the implicit acquire_ctx.
This patch here just implements the new behaviour and updates the docs. Follow-up patches will garbage-collect all the dead code.
v2: Fixup docs even better!
v3: Make it actually work ...
v4: Drop the uses_atomic_modeset() checks from the previous patch again, since they're now moved up in the callchain.
--- drivers/gpu/drm/drm_atomic.c | 60 ++++++++++++++++++-- drivers/gpu/drm/drm_connector.c | 8 +-- drivers/gpu/drm/drm_crtc.c | 2 +- drivers/gpu/drm/drm_crtc_helper.c | 3 +- drivers/gpu/drm/drm_crtc_internal.h | 7 +++ drivers/gpu/drm/drm_mode_object.c | 110 +++++++++++++++++++++++++++--------- drivers/gpu/drm/drm_plane.c | 2 +- include/drm/drm_connector.h | 10 ++-- include/drm/drm_crtc.h | 6 +- include/drm/drm_plane.h | 6 +- 10 files changed, 161 insertions(+), 53 deletions(-)
drivers/gpu/drm/drm_atomic.c +56 -4
@@ -1864,9 +1864,60 @@ static struct drm_pending_vblank_event *create_vblank_event(return e; } -static int atomic_set_prop (struct drm_atomic_state *state, -struct drm_mode_object *obj,struct drm_property *prop, -uint64_t prop_value) +int drm_atomic_connector_commit_dpms (struct drm_atomic_state *state, +struct drm_connector *connector, +int mode) +{ +struct drm_connector *tmp_connector; +struct drm_connector_state *new_conn_state; +struct drm_crtc *crtc; +struct drm_crtc_state *crtc_state; +int i, ret, old_mode = connector->dpms; +bool active = false; + + ret =drm_modeset_lock (&state->dev->mode_config.connection_mutex, + state->acquire_ctx); +if (ret) +return ret; + +if (mode !=DRM_MODE_DPMS_ON ) + mode =DRM_MODE_DPMS_OFF ; + connector->dpms = mode; + + crtc = connector->state->crtc; +if (!crtc) + goto out; + ret =drm_atomic_add_affected_connectors (state, crtc); +if (ret) + goto out; + + crtc_state =drm_atomic_get_crtc_state (state, crtc); +if (IS_ERR (crtc_state)) { + ret =PTR_ERR (crtc_state); + goto out; + } + +for_each_new_connector_in_state (state, tmp_connector, new_conn_state, i) { +if (new_conn_state->crtc != crtc) +continue ; +if (tmp_connector->dpms ==DRM_MODE_DPMS_ON ) { + active = true; +break ; + } + } + + crtc_state->active = active; + ret =drm_atomic_commit (state); +out: +if (ret !=0 ) + connector->dpms = old_mode; +return ret; +} + +int drm_atomic_set_property (struct drm_atomic_state *state, +struct drm_mode_object *obj, +struct drm_property *prop, +uint64_t prop_value) {struct drm_mode_object *ref;int ret;
@@ -2286,7 +2337,8 @@ int drm_mode_atomic_ioctl(struct drm_device *dev, goto out; } - ret =atomic_set_prop (state, obj, prop, prop_value); + ret =drm_atomic_set_property (state, obj, prop, + prop_value);if (ret) {drm_mode_object_put (obj); goto out;
drivers/gpu/drm/drm_connector.c +4 -4
@@ -717,9 +717,9 @@ DRM_ENUM_NAME_FN(drm_get_tv_subconnector_name,* drivers, it remaps to controlling the "ACTIVE" property on the CRTC the * connector is linked to. Drivers should never set this property directly, * it is handled by the DRM core by calling the &drm_connector_funcs.dpms -* callback. Atomic drivers should implement this hook using -* drm_atomic_helper_connector_dpms(). This is the only property standard -* connector property that userspace can change. +* callback. For atomic drivers the remapping to the "ACTIVE" property is +* implemented in the DRM core. This is the only standard connector +* property that userspace can change. * PATH: * Connector path property to identify how this sink is physically * connected. Used by DP MST. This should be set by calling
@@ -1225,7 +1225,7 @@ int drm_mode_connector_set_obj_prop(struct drm_mode_object *obj, }else if (connector->funcs->set_property) ret = connector->funcs->set_property (connector, property, value); -if (!ret && !drm_drv_uses_atomic_modeset (property->dev)) +if (!ret)drm_object_property_set_value (&connector->base, property, value);return ret; }
drivers/gpu/drm/drm_crtc.c +1 -1
@@ -736,7 +736,7 @@ int drm_mode_crtc_set_obj_prop(struct drm_mode_object *obj,if (crtc->funcs->set_property) ret = crtc->funcs->set_property (crtc, property, value); -if (!ret && !drm_drv_uses_atomic_modeset (property->dev)) +if (!ret)drm_object_property_set_value (obj, property, value);return ret;
drivers/gpu/drm/drm_crtc_helper.c +1 -2
@@ -863,8 +863,7 @@ static int drm_helper_choose_crtc_dpms(struct drm_crtc *crtc)* provided by the driver. * * This function is deprecated. New drivers must implement atomic modeset -* support, for which this function is unsuitable. Instead drivers should use -* drm_atomic_helper_connector_dpms(). +* support, where DPMS is handled in the DRM core. * * Returns: * Always returns 0.
drivers/gpu/drm/drm_crtc_internal.h +7 -0
@@ -178,6 +178,13 @@ struct drm_minor;int drm_atomic_debugfs_init (struct drm_minor *minor);#endif +int drm_atomic_connector_commit_dpms (struct drm_atomic_state *state, +struct drm_connector *connector, +int mode); +int drm_atomic_set_property (struct drm_atomic_state *state, +struct drm_mode_object *obj, +struct drm_property *prop, +uint64_t prop_value);int drm_atomic_get_property (struct drm_mode_object *obj,struct drm_property *property,uint64_t *val); int drm_mode_atomic_ioctl(struct drm_device *dev,
drivers/gpu/drm/drm_mode_object.c +83 -27
135 lines not on this page · raw message
drivers/gpu/drm/drm_plane.c +1 -1
@@ -330,7 +330,7 @@ int drm_mode_plane_set_obj_prop(struct drm_plane *plane,if (plane->funcs->set_property) ret = plane->funcs->set_property (plane, property, value); -if (!ret && !drm_drv_uses_atomic_modeset (property->dev)) +if (!ret)drm_object_property_set_value (obj, property, value);return ret;
include/drm/drm_connector.h +4 -6
@@ -382,8 +382,8 @@ struct drm_connector_funcs {* implement the 4 level DPMS support on the connector any more, but * instead only have an on/off "ACTIVE" property on the CRTC object. * -* Drivers implementing atomic modeset should use -* drm_atomic_helper_connector_dpms() to implement this hook. +* This hook is not used by atomic drivers, remapping of the legacy DPMS +* property is entirely handled in the DRM core. * * RETURNS: *
@@ -480,11 +480,9 @@ struct drm_connector_funcs {* This is the legacy entry point to update a property attached to the * connector. * -* Drivers implementing atomic modeset should use -* drm_atomic_helper_connector_set_property() to implement this hook. -* * This callback is optional if the driver does not support any legacy -* driver-private properties. +* driver-private properties. For atomic drivers it is not used because +* property handling is done entirely in the DRM core. * * RETURNS: *
include/drm/drm_crtc.h +2 -4
@@ -481,11 +481,9 @@ struct drm_crtc_funcs {* This is the legacy entry point to update a property attached to the * CRTC. * -* Drivers implementing atomic modeset should use -* drm_atomic_helper_crtc_set_property() to implement this hook. -* * This callback is optional if the driver does not support any legacy -* driver-private properties. +* driver-private properties. For atomic drivers it is not used because +* property handling is done entirely in the DRM core. * * RETURNS: *
include/drm/drm_plane.h +2 -4
@@ -233,11 +233,9 @@ struct drm_plane_funcs {* This is the legacy entry point to update a property attached to the * plane. * -* Drivers implementing atomic modeset should use -* drm_atomic_helper_plane_set_property() to implement this hook. -* * This callback is optional if the driver does not support any legacy -* driver-private properties. +* driver-private properties. For atomic drivers it is not used because +* property handling is done entirely in the DRM core. * * RETURNS: *
Signature · 6 lines
2.13.3 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 4/8 drm: Nuke drm_atomic_helper_crtc_set_property
In reply to Daniel VetterIt's dead code because this is now handled in the core.
--- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 1 - drivers/gpu/drm/drm_atomic_helper.c | 55 ------------------------- drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 1 - drivers/gpu/drm/i915/intel_display.c | 1 - drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c | 1 - drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 2 - drivers/gpu/drm/nouveau/nv50_display.c | 1 - drivers/gpu/drm/omapdrm/omap_crtc.c | 1 - include/drm/drm_atomic_helper.h | 3 -- 9 files changed, 66 deletions(-)
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c +0 -1
@@ -431,7 +431,6 @@ static const struct drm_crtc_funcs atmel_hlcdc_crtc_funcs = { .atomic_destroy_state = atmel_hlcdc_crtc_destroy_state, .enable_vblank = atmel_hlcdc_crtc_enable_vblank, .disable_vblank = atmel_hlcdc_crtc_disable_vblank, - .set_property = drm_atomic_helper_crtc_set_property, .gamma_set = drm_atomic_helper_legacy_gamma_set, };
drivers/gpu/drm/drm_atomic_helper.c +0 -55
61 lines not on this page · raw message
drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c +0 -1
@@ -567,7 +567,6 @@ static const struct drm_crtc_funcs ade_crtc_funcs = { .set_config = drm_atomic_helper_set_config, .page_flip = drm_atomic_helper_page_flip, .reset = drm_atomic_helper_crtc_reset, - .set_property = drm_atomic_helper_crtc_set_property, .atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state, .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state, .enable_vblank = ade_crtc_enable_vblank,
drivers/gpu/drm/i915/intel_display.c +0 -1
@@ -12373,7 +12373,6 @@ static int intel_atomic_commit(struct drm_device *dev,static const struct drm_crtc_funcs intel_crtc_funcs = { .gamma_set = drm_atomic_helper_legacy_gamma_set, .set_config = drm_atomic_helper_set_config, - .set_property = drm_atomic_helper_crtc_set_property, .destroy = intel_crtc_destroy, .page_flip = drm_atomic_helper_page_flip, .atomic_duplicate_state = intel_crtc_duplicate_state,
drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c +0 -1
@@ -484,7 +484,6 @@ static const struct drm_crtc_funcs mdp4_crtc_funcs = { .set_config = drm_atomic_helper_set_config, .destroy = mdp4_crtc_destroy, .page_flip = drm_atomic_helper_page_flip, - .set_property = drm_atomic_helper_crtc_set_property, .cursor_set = mdp4_crtc_cursor_set, .cursor_move = mdp4_crtc_cursor_move, .reset = drm_atomic_helper_crtc_reset,
drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c +0 -2
@@ -919,7 +919,6 @@ static const struct drm_crtc_funcs mdp5_crtc_funcs = { .set_config = drm_atomic_helper_set_config, .destroy = mdp5_crtc_destroy, .page_flip = drm_atomic_helper_page_flip, - .set_property = drm_atomic_helper_crtc_set_property, .reset = mdp5_crtc_reset, .atomic_duplicate_state = mdp5_crtc_duplicate_state, .atomic_destroy_state = mdp5_crtc_destroy_state,
@@ -932,7 +931,6 @@ static const struct drm_crtc_funcs mdp5_crtc_no_lm_cursor_funcs = { .set_config = drm_atomic_helper_set_config, .destroy = mdp5_crtc_destroy, .page_flip = drm_atomic_helper_page_flip, - .set_property = drm_atomic_helper_crtc_set_property, .reset = mdp5_crtc_reset, .atomic_duplicate_state = mdp5_crtc_duplicate_state, .atomic_destroy_state = mdp5_crtc_destroy_state,
drivers/gpu/drm/nouveau/nv50_display.c +0 -1
@@ -2325,7 +2325,6 @@ nv50_head_func = { .destroy = nv50_head_destroy, .set_config = drm_atomic_helper_set_config, .page_flip = drm_atomic_helper_page_flip, - .set_property = drm_atomic_helper_crtc_set_property, .atomic_duplicate_state = nv50_head_atomic_duplicate_state, .atomic_destroy_state = nv50_head_atomic_destroy_state, };
drivers/gpu/drm/omapdrm/omap_crtc.c +0 -1
@@ -550,7 +550,6 @@ static const struct drm_crtc_funcs omap_crtc_funcs = { .destroy = omap_crtc_destroy, .page_flip = drm_atomic_helper_page_flip, .gamma_set = drm_atomic_helper_legacy_gamma_set, - .set_property = drm_atomic_helper_crtc_set_property, .atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state, .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state, .atomic_set_property = omap_crtc_atomic_set_property,
include/drm/drm_atomic_helper.h +0 -3
@@ -124,9 +124,6 @@ int drm_atomic_helper_commit_duplicated_state(struct drm_atomic_state *state,int drm_atomic_helper_resume (struct drm_device *dev,struct drm_atomic_state *state); -int drm_atomic_helper_crtc_set_property (struct drm_crtc *crtc, -struct drm_property *property, -uint64_t val);int drm_atomic_helper_plane_set_property (struct drm_plane *plane,struct drm_property *property,uint64_t val);
Signature · 6 lines
2.13.3 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 4/8] drm: Nuke drm_atomic_helper_crtc_set_property
Quoted 1 line · Daniel Vetter
It's dead code because this is now handled in the core.
Quoted 210 lines
Signed-off-by Daniel Vetter <[email protected]>Cc Boris Brezillon <[email protected]>Cc Daniel Vetter <[email protected]>Cc Jani Nikula <[email protected]>Cc Sean Paul <[email protected]>Cc David Airlie <[email protected]>Cc Ben Skeggs <[email protected]>Cc Tomi Valkeinen <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Alexey Brodkin <[email protected]>Cc Shawn Guo <[email protected]>Cc Eric Engestrom <[email protected]>Cc Chris Wilson <[email protected]>Cc "Ville Syrjälä" <[email protected]>Cc Rob Clark <[email protected]>Cc Philippe Cornu <[email protected]>Cc Masahiro Yamada <[email protected]>Cc Sushmita Susheelendra <[email protected]>Cc Archit Taneja <[email protected]>Cc Philipp Zabel <[email protected]>Cc Maxime Ripard <[email protected]>Cc Thomas Hellstrom <[email protected]>--- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 1 - drivers/gpu/drm/drm_atomic_helper.c | 55 ------------------------- drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 1 - drivers/gpu/drm/i915/intel_display.c | 1 - drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c | 1 - drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 2 - drivers/gpu/drm/nouveau/nv50_display.c | 1 - drivers/gpu/drm/omapdrm/omap_crtc.c | 1 - include/drm/drm_atomic_helper.h | 3 -- 9 files changed, 66 deletions(-)drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c +0
-1@@ -431,7 +431,6 @@ static const struct drm_crtc_funcs atmel_hlcdc_crtc_funcs = { .atomic_destroy_state = atmel_hlcdc_crtc_destroy_state, .enable_vblank = atmel_hlcdc_crtc_enable_vblank, .disable_vblank = atmel_hlcdc_crtc_disable_vblank, - .set_property = drm_atomic_helper_crtc_set_property, .gamma_set = drm_atomic_helper_legacy_gamma_set, };drivers/gpu/drm/drm_atomic_helper.c +0
-55@@ -2968,61 +2968,6 @@ int drm_atomic_helper_resume(struct drm_device *dev,EXPORT_SYMBOL (drm_atomic_helper_resume);/** -* drm_atomic_helper_crtc_set_property - helper for crtc properties -* @crtc: DRM crtc -* @property: DRM property -* @val: value of property -* -* Provides a default crtc set_property handler using the atomic driver -* interface. -* -* RETURNS: -* Zero on success, error code on failure -*/ -int -drm_atomic_helper_crtc_set_property (struct drm_crtc *crtc, -struct drm_property *property, -uint64_t val) -{ -struct drm_atomic_state *state; -struct drm_crtc_state *crtc_state; -int ret =0 ; - - state =drm_atomic_state_alloc (crtc->dev); -if (!state) -return -ENOMEM ; - -/* ->set_property is always called with all locks held. */ - state->acquire_ctx = crtc->dev->mode_config.acquire_ctx; -retry: - crtc_state =drm_atomic_get_crtc_state (state, crtc); -if (IS_ERR (crtc_state)) { - ret =PTR_ERR (crtc_state); - goto fail; - } - - ret =drm_atomic_crtc_set_property (crtc, crtc_state, - property, val); -if (ret) - goto fail; - - ret =drm_atomic_commit (state); -fail: -if (ret == -EDEADLK ) - goto backoff; - -drm_atomic_state_put (state); -return ret; - -backoff: -drm_atomic_state_clear (state); -drm_atomic_legacy_backoff (state); - - goto retry; -} -EXPORT_SYMBOL (drm_atomic_helper_crtc_set_property); - -/** * drm_atomic_helper_plane_set_property - helper for plane properties * @plane: DRM plane * @property: DRM property drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c +0
-1@@ -567,7 +567,6 @@ static const struct drm_crtc_funcs ade_crtc_funcs = { .set_config = drm_atomic_helper_set_config, .page_flip = drm_atomic_helper_page_flip, .reset = drm_atomic_helper_crtc_reset, - .set_property = drm_atomic_helper_crtc_set_property, .atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state, .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state, .enable_vblank = ade_crtc_enable_vblank,drivers/gpu/drm/i915/intel_display.c +0
-1@@ -12373,7 +12373,6 @@ static int intel_atomic_commit(struct drm_device *dev,static const struct drm_crtc_funcs intel_crtc_funcs = { .gamma_set = drm_atomic_helper_legacy_gamma_set, .set_config = drm_atomic_helper_set_config, - .set_property = drm_atomic_helper_crtc_set_property, .destroy = intel_crtc_destroy, .page_flip = drm_atomic_helper_page_flip, .atomic_duplicate_state = intel_crtc_duplicate_state,drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c +0
-1@@ -484,7 +484,6 @@ static const struct drm_crtc_funcs mdp4_crtc_funcs = { .set_config = drm_atomic_helper_set_config, .destroy = mdp4_crtc_destroy, .page_flip = drm_atomic_helper_page_flip, - .set_property = drm_atomic_helper_crtc_set_property, .cursor_set = mdp4_crtc_cursor_set, .cursor_move = mdp4_crtc_cursor_move, .reset = drm_atomic_helper_crtc_reset,drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c +0
-2@@ -919,7 +919,6 @@ static const struct drm_crtc_funcs mdp5_crtc_funcs = { .set_config = drm_atomic_helper_set_config, .destroy = mdp5_crtc_destroy, .page_flip = drm_atomic_helper_page_flip, - .set_property = drm_atomic_helper_crtc_set_property, .reset = mdp5_crtc_reset, .atomic_duplicate_state = mdp5_crtc_duplicate_state, .atomic_destroy_state = mdp5_crtc_destroy_state,@@ -932,7 +931,6 @@ static const struct drm_crtc_funcs mdp5_crtc_no_lm_cursor_funcs = { .set_config = drm_atomic_helper_set_config, .destroy = mdp5_crtc_destroy, .page_flip = drm_atomic_helper_page_flip, - .set_property = drm_atomic_helper_crtc_set_property, .reset = mdp5_crtc_reset, .atomic_duplicate_state = mdp5_crtc_duplicate_state, .atomic_destroy_state = mdp5_crtc_destroy_state,drivers/gpu/drm/nouveau/nv50_display.c +0
-1@@ -2325,7 +2325,6 @@ nv50_head_func = { .destroy = nv50_head_destroy, .set_config = drm_atomic_helper_set_config, .page_flip = drm_atomic_helper_page_flip, - .set_property = drm_atomic_helper_crtc_set_property, .atomic_duplicate_state = nv50_head_atomic_duplicate_state, .atomic_destroy_state = nv50_head_atomic_destroy_state, };drivers/gpu/drm/omapdrm/omap_crtc.c +0
-1@@ -550,7 +550,6 @@ static const struct drm_crtc_funcs omap_crtc_funcs = { .destroy = omap_crtc_destroy, .page_flip = drm_atomic_helper_page_flip, .gamma_set = drm_atomic_helper_legacy_gamma_set, - .set_property = drm_atomic_helper_crtc_set_property, .atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state, .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state, .atomic_set_property = omap_crtc_atomic_set_property,include/drm/drm_atomic_helper.h +0
-3@@ -124,9 +124,6 @@ int drm_atomic_helper_commit_duplicated_state(struct drm_atomic_state *state,int drm_atomic_helper_resume (struct drm_device *dev,struct drm_atomic_state *state); -int drm_atomic_helper_crtc_set_property (struct drm_crtc *crtc, -struct drm_property *property, -uint64_t val);int drm_atomic_helper_plane_set_property (struct drm_plane *plane,struct drm_property *property,uint64_t val);
Signature · 6 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 4/8] drm: Nuke drm_atomic_helper_crtc_set_property
In reply to Daniel VetterQuoted 18 lines · Daniel Vetter
It's dead code because this is now handled in the core.
Signed-off-by Daniel Vetter <[email protected]>Cc Boris Brezillon <[email protected]>Cc Daniel Vetter <[email protected]>Cc Jani Nikula <[email protected]>Cc Sean Paul <[email protected]>Cc David Airlie <[email protected]>Cc Ben Skeggs <[email protected]>Cc Tomi Valkeinen <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Alexey Brodkin <[email protected]>Cc Shawn Guo <[email protected]>Cc Eric Engestrom <[email protected]>Cc Chris Wilson <[email protected]>Cc "Ville Syrjälä" <[email protected]>Cc Rob Clark <[email protected]>Cc Philippe Cornu <[email protected]>
Many thanks
Philippe :-)
Quoted 184 lines
Cc Masahiro Yamada <[email protected]>Cc Sushmita Susheelendra <[email protected]>Cc Archit Taneja <[email protected]>Cc Philipp Zabel <[email protected]>Cc Maxime Ripard <[email protected]>Cc Thomas Hellstrom <[email protected]>--- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 1 - drivers/gpu/drm/drm_atomic_helper.c | 55 ------------------------- drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 1 - drivers/gpu/drm/i915/intel_display.c | 1 - drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c | 1 - drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 2 - drivers/gpu/drm/nouveau/nv50_display.c | 1 - drivers/gpu/drm/omapdrm/omap_crtc.c | 1 - include/drm/drm_atomic_helper.h | 3 -- 9 files changed, 66 deletions(-)drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c +0
-1@@ -431,7 +431,6 @@ static const struct drm_crtc_funcs atmel_hlcdc_crtc_funcs = { .atomic_destroy_state = atmel_hlcdc_crtc_destroy_state, .enable_vblank = atmel_hlcdc_crtc_enable_vblank, .disable_vblank = atmel_hlcdc_crtc_disable_vblank, - .set_property = drm_atomic_helper_crtc_set_property, .gamma_set = drm_atomic_helper_legacy_gamma_set, };drivers/gpu/drm/drm_atomic_helper.c +0
-55@@ -2968,61 +2968,6 @@ int drm_atomic_helper_resume(struct drm_device *dev,EXPORT_SYMBOL (drm_atomic_helper_resume);/** -* drm_atomic_helper_crtc_set_property - helper for crtc properties -* @crtc: DRM crtc -* @property: DRM property -* @val: value of property -* -* Provides a default crtc set_property handler using the atomic driver -* interface. -* -* RETURNS: -* Zero on success, error code on failure -*/ -int -drm_atomic_helper_crtc_set_property (struct drm_crtc *crtc, -struct drm_property *property, -uint64_t val) -{ -struct drm_atomic_state *state; -struct drm_crtc_state *crtc_state; -int ret =0 ; - - state =drm_atomic_state_alloc (crtc->dev); -if (!state) -return -ENOMEM ; - -/* ->set_property is always called with all locks held. */ - state->acquire_ctx = crtc->dev->mode_config.acquire_ctx; -retry: - crtc_state =drm_atomic_get_crtc_state (state, crtc); -if (IS_ERR (crtc_state)) { - ret =PTR_ERR (crtc_state); - goto fail; - } - - ret =drm_atomic_crtc_set_property (crtc, crtc_state, - property, val); -if (ret) - goto fail; - - ret =drm_atomic_commit (state); -fail: -if (ret == -EDEADLK ) - goto backoff; - -drm_atomic_state_put (state); -return ret; - -backoff: -drm_atomic_state_clear (state); -drm_atomic_legacy_backoff (state); - - goto retry; -} -EXPORT_SYMBOL (drm_atomic_helper_crtc_set_property); - -/** * drm_atomic_helper_plane_set_property - helper for plane properties * @plane: DRM plane * @property: DRM property drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c +0
-1@@ -567,7 +567,6 @@ static const struct drm_crtc_funcs ade_crtc_funcs = { .set_config = drm_atomic_helper_set_config, .page_flip = drm_atomic_helper_page_flip, .reset = drm_atomic_helper_crtc_reset, - .set_property = drm_atomic_helper_crtc_set_property, .atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state, .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state, .enable_vblank = ade_crtc_enable_vblank,drivers/gpu/drm/i915/intel_display.c +0
-1@@ -12373,7 +12373,6 @@ static int intel_atomic_commit(struct drm_device *dev,static const struct drm_crtc_funcs intel_crtc_funcs = { .gamma_set = drm_atomic_helper_legacy_gamma_set, .set_config = drm_atomic_helper_set_config, - .set_property = drm_atomic_helper_crtc_set_property, .destroy = intel_crtc_destroy, .page_flip = drm_atomic_helper_page_flip, .atomic_duplicate_state = intel_crtc_duplicate_state,drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c +0
-1@@ -484,7 +484,6 @@ static const struct drm_crtc_funcs mdp4_crtc_funcs = { .set_config = drm_atomic_helper_set_config, .destroy = mdp4_crtc_destroy, .page_flip = drm_atomic_helper_page_flip, - .set_property = drm_atomic_helper_crtc_set_property, .cursor_set = mdp4_crtc_cursor_set, .cursor_move = mdp4_crtc_cursor_move, .reset = drm_atomic_helper_crtc_reset,drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c +0
-2@@ -919,7 +919,6 @@ static const struct drm_crtc_funcs mdp5_crtc_funcs = { .set_config = drm_atomic_helper_set_config, .destroy = mdp5_crtc_destroy, .page_flip = drm_atomic_helper_page_flip, - .set_property = drm_atomic_helper_crtc_set_property, .reset = mdp5_crtc_reset, .atomic_duplicate_state = mdp5_crtc_duplicate_state, .atomic_destroy_state = mdp5_crtc_destroy_state,@@ -932,7 +931,6 @@ static const struct drm_crtc_funcs mdp5_crtc_no_lm_cursor_funcs = { .set_config = drm_atomic_helper_set_config, .destroy = mdp5_crtc_destroy, .page_flip = drm_atomic_helper_page_flip, - .set_property = drm_atomic_helper_crtc_set_property, .reset = mdp5_crtc_reset, .atomic_duplicate_state = mdp5_crtc_duplicate_state, .atomic_destroy_state = mdp5_crtc_destroy_state,drivers/gpu/drm/nouveau/nv50_display.c +0
-1@@ -2325,7 +2325,6 @@ nv50_head_func = { .destroy = nv50_head_destroy, .set_config = drm_atomic_helper_set_config, .page_flip = drm_atomic_helper_page_flip, - .set_property = drm_atomic_helper_crtc_set_property, .atomic_duplicate_state = nv50_head_atomic_duplicate_state, .atomic_destroy_state = nv50_head_atomic_destroy_state, };drivers/gpu/drm/omapdrm/omap_crtc.c +0
-1@@ -550,7 +550,6 @@ static const struct drm_crtc_funcs omap_crtc_funcs = { .destroy = omap_crtc_destroy, .page_flip = drm_atomic_helper_page_flip, .gamma_set = drm_atomic_helper_legacy_gamma_set, - .set_property = drm_atomic_helper_crtc_set_property, .atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state, .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state, .atomic_set_property = omap_crtc_atomic_set_property,include/drm/drm_atomic_helper.h +0
-0
include/drm/drm_atomic_helper.h int drm_atomic_helper_commit_duplicated_state(struct drm_atomic_state *state, · line 129
Quoted 9 lines
include/drm/drm_atomic_helper.h +0
-3@@ -124,9 +124,6 @@ int drm_atomic_helper_commit_duplicated_state(struct drm_atomic_state *state,int drm_atomic_helper_resume (struct drm_device *dev,struct drm_atomic_state *state); -int drm_atomic_helper_crtc_set_property (struct drm_crtc *crtc, -struct drm_property *property, -uint64_t val);int drm_atomic_helper_plane_set_property (struct drm_plane *plane,struct drm_property *property,uint64_t val);
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 4/8] drm: Nuke drm_atomic_helper_crtc_set_property
In reply to Daniel VetterQuoted 201 lines · Daniel Vetter
It's dead code because this is now handled in the core.
Signed-off-by Daniel Vetter <[email protected]>Cc Boris Brezillon <[email protected]>Cc Daniel Vetter <[email protected]>Cc Jani Nikula <[email protected]>Cc Sean Paul <[email protected]>Cc David Airlie <[email protected]>Cc Ben Skeggs <[email protected]>Cc Tomi Valkeinen <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Alexey Brodkin <[email protected]>Cc Shawn Guo <[email protected]>Cc Eric Engestrom <[email protected]>Cc Chris Wilson <[email protected]>Cc "Ville Syrjälä" <[email protected]>Cc Rob Clark <[email protected]>Cc Philippe Cornu <[email protected]>Cc Masahiro Yamada <[email protected]>Cc Sushmita Susheelendra <[email protected]>Cc Archit Taneja <[email protected]>Cc Philipp Zabel <[email protected]>Cc Maxime Ripard <[email protected]>Cc Thomas Hellstrom <[email protected]>--- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 1 - drivers/gpu/drm/drm_atomic_helper.c | 55 ------------------------- drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 1 - drivers/gpu/drm/i915/intel_display.c | 1 - drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c | 1 - drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 2 - drivers/gpu/drm/nouveau/nv50_display.c | 1 - drivers/gpu/drm/omapdrm/omap_crtc.c | 1 - include/drm/drm_atomic_helper.h | 3 -- 9 files changed, 66 deletions(-)drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c +0
-1@@ -431,7 +431,6 @@ static const struct drm_crtc_funcs atmel_hlcdc_crtc_funcs = { .atomic_destroy_state = atmel_hlcdc_crtc_destroy_state, .enable_vblank = atmel_hlcdc_crtc_enable_vblank, .disable_vblank = atmel_hlcdc_crtc_disable_vblank, - .set_property = drm_atomic_helper_crtc_set_property, .gamma_set = drm_atomic_helper_legacy_gamma_set, };drivers/gpu/drm/drm_atomic_helper.c +0
-55@@ -2968,61 +2968,6 @@ int drm_atomic_helper_resume(struct drm_device *dev,EXPORT_SYMBOL (drm_atomic_helper_resume);/** -* drm_atomic_helper_crtc_set_property - helper for crtc properties -* @crtc: DRM crtc -* @property: DRM property -* @val: value of property -* -* Provides a default crtc set_property handler using the atomic driver -* interface. -* -* RETURNS: -* Zero on success, error code on failure -*/ -int -drm_atomic_helper_crtc_set_property (struct drm_crtc *crtc, -struct drm_property *property, -uint64_t val) -{ -struct drm_atomic_state *state; -struct drm_crtc_state *crtc_state; -int ret =0 ; - - state =drm_atomic_state_alloc (crtc->dev); -if (!state) -return -ENOMEM ; - -/* ->set_property is always called with all locks held. */ - state->acquire_ctx = crtc->dev->mode_config.acquire_ctx; -retry: - crtc_state =drm_atomic_get_crtc_state (state, crtc); -if (IS_ERR (crtc_state)) { - ret =PTR_ERR (crtc_state); - goto fail; - } - - ret =drm_atomic_crtc_set_property (crtc, crtc_state, - property, val); -if (ret) - goto fail; - - ret =drm_atomic_commit (state); -fail: -if (ret == -EDEADLK ) - goto backoff; - -drm_atomic_state_put (state); -return ret; - -backoff: -drm_atomic_state_clear (state); -drm_atomic_legacy_backoff (state); - - goto retry; -} -EXPORT_SYMBOL (drm_atomic_helper_crtc_set_property); - -/** * drm_atomic_helper_plane_set_property - helper for plane properties * @plane: DRM plane * @property: DRM property drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c +0
-1@@ -567,7 +567,6 @@ static const struct drm_crtc_funcs ade_crtc_funcs = { .set_config = drm_atomic_helper_set_config, .page_flip = drm_atomic_helper_page_flip, .reset = drm_atomic_helper_crtc_reset, - .set_property = drm_atomic_helper_crtc_set_property, .atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state, .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state, .enable_vblank = ade_crtc_enable_vblank,drivers/gpu/drm/i915/intel_display.c +0
-1@@ -12373,7 +12373,6 @@ static int intel_atomic_commit(struct drm_device *dev,static const struct drm_crtc_funcs intel_crtc_funcs = { .gamma_set = drm_atomic_helper_legacy_gamma_set, .set_config = drm_atomic_helper_set_config, - .set_property = drm_atomic_helper_crtc_set_property, .destroy = intel_crtc_destroy, .page_flip = drm_atomic_helper_page_flip, .atomic_duplicate_state = intel_crtc_duplicate_state,drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c +0
-1@@ -484,7 +484,6 @@ static const struct drm_crtc_funcs mdp4_crtc_funcs = { .set_config = drm_atomic_helper_set_config, .destroy = mdp4_crtc_destroy, .page_flip = drm_atomic_helper_page_flip, - .set_property = drm_atomic_helper_crtc_set_property, .cursor_set = mdp4_crtc_cursor_set, .cursor_move = mdp4_crtc_cursor_move, .reset = drm_atomic_helper_crtc_reset,drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c +0
-2@@ -919,7 +919,6 @@ static const struct drm_crtc_funcs mdp5_crtc_funcs = { .set_config = drm_atomic_helper_set_config, .destroy = mdp5_crtc_destroy, .page_flip = drm_atomic_helper_page_flip, - .set_property = drm_atomic_helper_crtc_set_property, .reset = mdp5_crtc_reset, .atomic_duplicate_state = mdp5_crtc_duplicate_state, .atomic_destroy_state = mdp5_crtc_destroy_state,@@ -932,7 +931,6 @@ static const struct drm_crtc_funcs mdp5_crtc_no_lm_cursor_funcs = { .set_config = drm_atomic_helper_set_config, .destroy = mdp5_crtc_destroy, .page_flip = drm_atomic_helper_page_flip, - .set_property = drm_atomic_helper_crtc_set_property, .reset = mdp5_crtc_reset, .atomic_duplicate_state = mdp5_crtc_duplicate_state, .atomic_destroy_state = mdp5_crtc_destroy_state,drivers/gpu/drm/nouveau/nv50_display.c +0
-1@@ -2325,7 +2325,6 @@ nv50_head_func = { .destroy = nv50_head_destroy, .set_config = drm_atomic_helper_set_config, .page_flip = drm_atomic_helper_page_flip, - .set_property = drm_atomic_helper_crtc_set_property, .atomic_duplicate_state = nv50_head_atomic_duplicate_state, .atomic_destroy_state = nv50_head_atomic_destroy_state, };drivers/gpu/drm/omapdrm/omap_crtc.c +0
-1@@ -550,7 +550,6 @@ static const struct drm_crtc_funcs omap_crtc_funcs = { .destroy = omap_crtc_destroy, .page_flip = drm_atomic_helper_page_flip, .gamma_set = drm_atomic_helper_legacy_gamma_set, - .set_property = drm_atomic_helper_crtc_set_property, .atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state, .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state, .atomic_set_property = omap_crtc_atomic_set_property,include/drm/drm_atomic_helper.h +0
-0
include/drm/drm_atomic_helper.h int drm_atomic_helper_commit_duplicated_state(struct drm_atomic_state *state, · line 129
Quoted 9 lines
include/drm/drm_atomic_helper.h +0
-3@@ -124,9 +124,6 @@ int drm_atomic_helper_commit_duplicated_state(struct drm_atomic_state *state,int drm_atomic_helper_resume (struct drm_device *dev,struct drm_atomic_state *state); -int drm_atomic_helper_crtc_set_property (struct drm_crtc *crtc, -struct drm_property *property, -uint64_t val);int drm_atomic_helper_plane_set_property (struct drm_plane *plane,struct drm_property *property,uint64_t val);
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 5/8 drm: Nuke drm_atomic_helper_plane_set_property
In reply to Daniel VetterIt's dead code, the core handles all this directly now. This also allows us to unexport drm_atomic_helper_plane_set_property.
--- drivers/gpu/drm/arm/malidp_planes.c | 1 - drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 1 - drivers/gpu/drm/drm_atomic.c | 3 +- drivers/gpu/drm/drm_atomic_helper.c | 55 ------------------------- drivers/gpu/drm/exynos/exynos_drm_plane.c | 1 - drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 1 - drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 1 - drivers/gpu/drm/i915/intel_display.c | 2 - drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 2 - drivers/gpu/drm/nouveau/nv50_display.c | 1 - drivers/gpu/drm/omapdrm/omap_plane.c | 1 - drivers/gpu/drm/rcar-du/rcar_du_plane.c | 1 - drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 1 - drivers/gpu/drm/sti/sti_cursor.c | 1 - drivers/gpu/drm/sti/sti_gdp.c | 1 - drivers/gpu/drm/sti/sti_hqvdp.c | 1 - drivers/gpu/drm/stm/ltdc.c | 1 - drivers/gpu/drm/tilcdc/tilcdc_plane.c | 1 - include/drm/drm_atomic.h | 3 -- include/drm/drm_atomic_helper.h | 3 -- 20 files changed, 1 insertion(+), 81 deletions(-)
drivers/gpu/drm/arm/malidp_planes.c +0 -1
@@ -128,7 +128,6 @@ static void malidp_plane_atomic_print_state(struct drm_printer *p,static const struct drm_plane_funcs malidp_de_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, - .set_property = drm_atomic_helper_plane_set_property, .destroy = malidp_de_plane_destroy, .reset = malidp_plane_reset, .atomic_duplicate_state = malidp_duplicate_plane_state,
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c +0 -1
@@ -1052,7 +1052,6 @@ static void atmel_hlcdc_plane_atomic_destroy_state(struct drm_plane *p,static struct drm_plane_funcs layer_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, - .set_property = drm_atomic_helper_plane_set_property, .destroy = atmel_hlcdc_plane_destroy, .reset = atmel_hlcdc_plane_reset, .atomic_duplicate_state = atmel_hlcdc_plane_atomic_duplicate_state,
drivers/gpu/drm/drm_atomic.c +1 -2
@@ -713,7 +713,7 @@ EXPORT_SYMBOL(drm_atomic_get_plane_state);* RETURNS: * Zero on success, error code on failure */ -int drm_atomic_plane_set_property (struct drm_plane *plane, +static int drm_atomic_plane_set_property (struct drm_plane *plane,struct drm_plane_state *state,struct drm_property *property,uint64_t val) {
@@ -770,7 +770,6 @@ int drm_atomic_plane_set_property(struct drm_plane *plane,return 0 ; } -EXPORT_SYMBOL (drm_atomic_plane_set_property);/** * drm_atomic_plane_get_property - get property value from plane state
drivers/gpu/drm/drm_atomic_helper.c +0 -55
61 lines not on this page · raw message
drivers/gpu/drm/exynos/exynos_drm_plane.c +0 -1
@@ -173,7 +173,6 @@ static struct drm_plane_funcs exynos_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .destroy = drm_plane_cleanup, - .set_property = drm_atomic_helper_plane_set_property, .reset = exynos_drm_plane_reset, .atomic_duplicate_state = exynos_drm_plane_duplicate_state, .atomic_destroy_state = exynos_drm_plane_destroy_state,
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c +0 -1
@@ -150,7 +150,6 @@ static const u32 channel_formats1[] = {static struct drm_plane_funcs hibmc_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, - .set_property = drm_atomic_helper_plane_set_property, .destroy = drm_plane_cleanup, .reset = drm_atomic_helper_plane_reset, .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,
drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c +0 -1
@@ -889,7 +889,6 @@ static const struct drm_plane_helper_funcs ade_plane_helper_funcs = {static struct drm_plane_funcs ade_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, - .set_property = drm_atomic_helper_plane_set_property, .destroy = drm_plane_cleanup, .reset = drm_atomic_helper_plane_reset, .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,
drivers/gpu/drm/i915/intel_display.c +0 -2
@@ -12649,7 +12649,6 @@ const struct drm_plane_funcs intel_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .destroy = intel_plane_destroy, - .set_property = drm_atomic_helper_plane_set_property, .atomic_get_property = intel_plane_atomic_get_property, .atomic_set_property = intel_plane_atomic_set_property, .atomic_duplicate_state = intel_plane_duplicate_state,
@@ -12784,7 +12783,6 @@ static const struct drm_plane_funcs intel_cursor_plane_funcs = { .update_plane = intel_legacy_cursor_update, .disable_plane = drm_atomic_helper_disable_plane, .destroy = intel_plane_destroy, - .set_property = drm_atomic_helper_plane_set_property, .atomic_get_property = intel_plane_atomic_get_property, .atomic_set_property = intel_plane_atomic_set_property, .atomic_duplicate_state = intel_plane_duplicate_state,
drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c +0 -2
@@ -246,7 +246,6 @@ static const struct drm_plane_funcs mdp5_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .destroy = mdp5_plane_destroy, - .set_property = drm_atomic_helper_plane_set_property, .atomic_set_property = mdp5_plane_atomic_set_property, .atomic_get_property = mdp5_plane_atomic_get_property, .reset = mdp5_plane_reset,
@@ -259,7 +258,6 @@ static const struct drm_plane_funcs mdp5_cursor_plane_funcs = { .update_plane = mdp5_update_cursor_plane_legacy, .disable_plane = drm_atomic_helper_disable_plane, .destroy = mdp5_plane_destroy, - .set_property = drm_atomic_helper_plane_set_property, .atomic_set_property = mdp5_plane_atomic_set_property, .atomic_get_property = mdp5_plane_atomic_get_property, .reset = mdp5_plane_reset,
drivers/gpu/drm/nouveau/nv50_display.c +0 -1
@@ -1055,7 +1055,6 @@ nv50_wndw = { .disable_plane = drm_atomic_helper_disable_plane, .destroy = nv50_wndw_destroy, .reset = nv50_wndw_reset, - .set_property = drm_atomic_helper_plane_set_property, .atomic_duplicate_state = nv50_wndw_atomic_duplicate_state, .atomic_destroy_state = nv50_wndw_atomic_destroy_state, };
drivers/gpu/drm/omapdrm/omap_plane.c +0 -1
@@ -235,7 +235,6 @@ static const struct drm_plane_funcs omap_plane_funcs = { .disable_plane = drm_atomic_helper_disable_plane, .reset = omap_plane_reset, .destroy = omap_plane_destroy, - .set_property = drm_atomic_helper_plane_set_property, .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state, .atomic_destroy_state = drm_atomic_helper_plane_destroy_state, .atomic_set_property = omap_plane_atomic_set_property,
drivers/gpu/drm/rcar-du/rcar_du_plane.c +0 -1
@@ -698,7 +698,6 @@ static const struct drm_plane_funcs rcar_du_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .reset = rcar_du_plane_reset, - .set_property = drm_atomic_helper_plane_set_property, .destroy = drm_plane_cleanup, .atomic_duplicate_state = rcar_du_plane_atomic_duplicate_state, .atomic_destroy_state = rcar_du_plane_atomic_destroy_state,
drivers/gpu/drm/rcar-du/rcar_du_vsp.c +0 -1
@@ -383,7 +383,6 @@ static const struct drm_plane_funcs rcar_du_vsp_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .reset = rcar_du_vsp_plane_reset, - .set_property = drm_atomic_helper_plane_set_property, .destroy = drm_plane_cleanup, .atomic_duplicate_state = rcar_du_vsp_plane_atomic_duplicate_state, .atomic_destroy_state = rcar_du_vsp_plane_atomic_destroy_state,
drivers/gpu/drm/sti/sti_cursor.c +0 -1
@@ -348,7 +348,6 @@ static const struct drm_plane_funcs sti_cursor_plane_helpers_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .destroy = sti_cursor_destroy, - .set_property = drm_atomic_helper_plane_set_property, .reset = sti_plane_reset, .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state, .atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
drivers/gpu/drm/sti/sti_gdp.c +0 -1
@@ -895,7 +895,6 @@ static const struct drm_plane_funcs sti_gdp_plane_helpers_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .destroy = sti_gdp_destroy, - .set_property = drm_atomic_helper_plane_set_property, .reset = sti_plane_reset, .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state, .atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
drivers/gpu/drm/sti/sti_hqvdp.c +0 -1
@@ -1276,7 +1276,6 @@ static const struct drm_plane_funcs sti_hqvdp_plane_helpers_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .destroy = sti_hqvdp_destroy, - .set_property = drm_atomic_helper_plane_set_property, .reset = sti_plane_reset, .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state, .atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
drivers/gpu/drm/stm/ltdc.c +0 -1
@@ -697,7 +697,6 @@ static const struct drm_plane_funcs ltdc_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .destroy = drm_plane_cleanup, - .set_property = drm_atomic_helper_plane_set_property, .reset = drm_atomic_helper_plane_reset, .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state, .atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
drivers/gpu/drm/tilcdc/tilcdc_plane.c +0 -1
@@ -28,7 +28,6 @@ static struct drm_plane_funcs tilcdc_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .destroy = drm_plane_cleanup, - .set_property = drm_atomic_helper_plane_set_property, .reset = drm_atomic_helper_plane_reset, .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state, .atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
include/drm/drm_atomic.h +0 -3
@@ -315,9 +315,6 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc,struct drm_plane_state *__must_check drm_atomic_get_plane_state (struct drm_atomic_state *state,struct drm_plane *plane); -int drm_atomic_plane_set_property (struct drm_plane *plane, -struct drm_plane_state *state,struct drm_property *property, -uint64_t val);struct drm_connector_state *__must_check drm_atomic_get_connector_state (struct drm_atomic_state *state,struct drm_connector *connector);
include/drm/drm_atomic_helper.h +0 -3
@@ -124,9 +124,6 @@ int drm_atomic_helper_commit_duplicated_state(struct drm_atomic_state *state,int drm_atomic_helper_resume (struct drm_device *dev,struct drm_atomic_state *state); -int drm_atomic_helper_plane_set_property (struct drm_plane *plane, -struct drm_property *property, -uint64_t val);int drm_atomic_helper_connector_set_property (struct drm_connector *connector,struct drm_property *property,uint64_t val);
Signature · 1 line
2.13.3
Re: [PATCH 5/8] drm: Nuke drm_atomic_helper_plane_set_property
Quoted 3 lines · Daniel Vetter
It's dead code, the core handles all this directly now. This also allows us to unexport
drm_atomic_helper_plane_set_property.
Quoted 385 lines
Signed-off-by Daniel Vetter <[email protected]>Cc Liviu Dudau <[email protected]>Cc Brian Starkey <[email protected]>Cc Mali DP Maintainers <[email protected]>Cc Boris Brezillon <[email protected]>Cc Daniel Vetter <[email protected]>Cc Jani Nikula <[email protected]>Cc Sean Paul <[email protected]>Cc David Airlie <[email protected]>Cc Inki Dae <[email protected]>Cc Joonyoung Shim <[email protected]>Cc Seung-Woo Kim <[email protected]>Cc Kyungmin Park <[email protected]>Cc Kukjin Kim <[email protected]>Cc Krzysztof Kozlowski <[email protected]>Cc Ben Skeggs <[email protected]>Cc Tomi Valkeinen <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Benjamin Gaignard <[email protected]>Cc Vincent Abriou <[email protected]>Cc Yannick Fertre <[email protected]>Cc Philippe Cornu <[email protected]>Cc Jyri Sarha <[email protected]>Cc "Ville Syrjälä" <[email protected]>Cc Rongrong Zou <[email protected]>Cc Shawn Guo <[email protected]>Cc Alexey Brodkin <[email protected]>Cc Eric Engestrom <[email protected]>Cc Chris Wilson <[email protected]>Cc Rob Clark <[email protected]>Cc Archit Taneja <[email protected]>Cc Thomas Hellstrom <[email protected]>Cc Maxime Ripard <[email protected]>--- drivers/gpu/drm/arm/malidp_planes.c | 1 - drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 1 - drivers/gpu/drm/drm_atomic.c | 3 +- drivers/gpu/drm/drm_atomic_helper.c | 55 ------------------------- drivers/gpu/drm/exynos/exynos_drm_plane.c | 1 - drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 1 - drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 1 - drivers/gpu/drm/i915/intel_display.c | 2 - drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 2 - drivers/gpu/drm/nouveau/nv50_display.c | 1 - drivers/gpu/drm/omapdrm/omap_plane.c | 1 - drivers/gpu/drm/rcar-du/rcar_du_plane.c | 1 - drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 1 - drivers/gpu/drm/sti/sti_cursor.c | 1 - drivers/gpu/drm/sti/sti_gdp.c | 1 - drivers/gpu/drm/sti/sti_hqvdp.c | 1 - drivers/gpu/drm/stm/ltdc.c | 1 - drivers/gpu/drm/tilcdc/tilcdc_plane.c | 1 - include/drm/drm_atomic.h | 3 -- include/drm/drm_atomic_helper.h | 3 -- 20 files changed, 1 insertion(+), 81 deletions(-)drivers/gpu/drm/arm/malidp_planes.c +0
-1@@ -128,7 +128,6 @@ static void malidp_plane_atomic_print_state(struct drm_printer *p,static const struct drm_plane_funcs malidp_de_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, - .set_property = drm_atomic_helper_plane_set_property, .destroy = malidp_de_plane_destroy, .reset = malidp_plane_reset, .atomic_duplicate_state = malidp_duplicate_plane_state,drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c +0
-1@@ -1052,7 +1052,6 @@ static void atmel_hlcdc_plane_atomic_destroy_state(struct drm_plane *p,static struct drm_plane_funcs layer_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, - .set_property = drm_atomic_helper_plane_set_property, .destroy = atmel_hlcdc_plane_destroy, .reset = atmel_hlcdc_plane_reset, .atomic_duplicate_state = atmel_hlcdc_plane_atomic_duplicate_state,drivers/gpu/drm/drm_atomic.c +1
-2@@ -713,7 +713,7 @@ EXPORT_SYMBOL(drm_atomic_get_plane_state);* RETURNS: * Zero on success, error code on failure */ -int drm_atomic_plane_set_property (struct drm_plane *plane, +static int drm_atomic_plane_set_property (struct drm_plane *plane,struct drm_plane_state *state,struct drm_property *property,uint64_t val) {@@ -770,7 +770,6 @@ int drm_atomic_plane_set_property(struct drm_plane *plane,return 0 ; } -EXPORT_SYMBOL (drm_atomic_plane_set_property);/** * drm_atomic_plane_get_property - get property value from plane state drivers/gpu/drm/drm_atomic_helper.c +0
-55@@ -2968,61 +2968,6 @@ int drm_atomic_helper_resume(struct drm_device *dev,EXPORT_SYMBOL (drm_atomic_helper_resume);/** -* drm_atomic_helper_plane_set_property - helper for plane properties -* @plane: DRM plane -* @property: DRM property -* @val: value of property -* -* Provides a default plane set_property handler using the atomic driver -* interface. -* -* RETURNS: -* Zero on success, error code on failure -*/ -int -drm_atomic_helper_plane_set_property (struct drm_plane *plane, -struct drm_property *property, -uint64_t val) -{ -struct drm_atomic_state *state; -struct drm_plane_state *plane_state; -int ret =0 ; - - state =drm_atomic_state_alloc (plane->dev); -if (!state) -return -ENOMEM ; - -/* ->set_property is always called with all locks held. */ - state->acquire_ctx = plane->dev->mode_config.acquire_ctx; -retry: - plane_state =drm_atomic_get_plane_state (state, plane); -if (IS_ERR (plane_state)) { - ret =PTR_ERR (plane_state); - goto fail; - } - - ret =drm_atomic_plane_set_property (plane, plane_state, - property, val); -if (ret) - goto fail; - - ret =drm_atomic_commit (state); -fail: -if (ret == -EDEADLK ) - goto backoff; - -drm_atomic_state_put (state); -return ret; - -backoff: -drm_atomic_state_clear (state); -drm_atomic_legacy_backoff (state); - - goto retry; -} -EXPORT_SYMBOL (drm_atomic_helper_plane_set_property); - -/** * drm_atomic_helper_connector_set_property - helper for connector properties * @connector: DRM connector * @property: DRM property drivers/gpu/drm/exynos/exynos_drm_plane.c +0
-1@@ -173,7 +173,6 @@ static struct drm_plane_funcs exynos_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .destroy = drm_plane_cleanup, - .set_property = drm_atomic_helper_plane_set_property, .reset = exynos_drm_plane_reset, .atomic_duplicate_state = exynos_drm_plane_duplicate_state, .atomic_destroy_state = exynos_drm_plane_destroy_state,drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c +0
-1@@ -150,7 +150,6 @@ static const u32 channel_formats1[] = {static struct drm_plane_funcs hibmc_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, - .set_property = drm_atomic_helper_plane_set_property, .destroy = drm_plane_cleanup, .reset = drm_atomic_helper_plane_reset, .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c +0
-1@@ -889,7 +889,6 @@ static const struct drm_plane_helper_funcs ade_plane_helper_funcs = {static struct drm_plane_funcs ade_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, - .set_property = drm_atomic_helper_plane_set_property, .destroy = drm_plane_cleanup, .reset = drm_atomic_helper_plane_reset, .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,drivers/gpu/drm/i915/intel_display.c +0
-2@@ -12649,7 +12649,6 @@ const struct drm_plane_funcs intel_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .destroy = intel_plane_destroy, - .set_property = drm_atomic_helper_plane_set_property, .atomic_get_property = intel_plane_atomic_get_property, .atomic_set_property = intel_plane_atomic_set_property, .atomic_duplicate_state = intel_plane_duplicate_state,@@ -12784,7 +12783,6 @@ static const struct drm_plane_funcs intel_cursor_plane_funcs = { .update_plane = intel_legacy_cursor_update, .disable_plane = drm_atomic_helper_disable_plane, .destroy = intel_plane_destroy, - .set_property = drm_atomic_helper_plane_set_property, .atomic_get_property = intel_plane_atomic_get_property, .atomic_set_property = intel_plane_atomic_set_property, .atomic_duplicate_state = intel_plane_duplicate_state,drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c +0
-2@@ -246,7 +246,6 @@ static const struct drm_plane_funcs mdp5_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .destroy = mdp5_plane_destroy, - .set_property = drm_atomic_helper_plane_set_property, .atomic_set_property = mdp5_plane_atomic_set_property, .atomic_get_property = mdp5_plane_atomic_get_property, .reset = mdp5_plane_reset,@@ -259,7 +258,6 @@ static const struct drm_plane_funcs mdp5_cursor_plane_funcs = { .update_plane = mdp5_update_cursor_plane_legacy, .disable_plane = drm_atomic_helper_disable_plane, .destroy = mdp5_plane_destroy, - .set_property = drm_atomic_helper_plane_set_property, .atomic_set_property = mdp5_plane_atomic_set_property, .atomic_get_property = mdp5_plane_atomic_get_property, .reset = mdp5_plane_reset,drivers/gpu/drm/nouveau/nv50_display.c +0
-1@@ -1055,7 +1055,6 @@ nv50_wndw = { .disable_plane = drm_atomic_helper_disable_plane, .destroy = nv50_wndw_destroy, .reset = nv50_wndw_reset, - .set_property = drm_atomic_helper_plane_set_property, .atomic_duplicate_state = nv50_wndw_atomic_duplicate_state, .atomic_destroy_state = nv50_wndw_atomic_destroy_state, };drivers/gpu/drm/omapdrm/omap_plane.c +0
-1@@ -235,7 +235,6 @@ static const struct drm_plane_funcs omap_plane_funcs = { .disable_plane = drm_atomic_helper_disable_plane, .reset = omap_plane_reset, .destroy = omap_plane_destroy, - .set_property = drm_atomic_helper_plane_set_property, .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state, .atomic_destroy_state = drm_atomic_helper_plane_destroy_state, .atomic_set_property = omap_plane_atomic_set_property,drivers/gpu/drm/rcar-du/rcar_du_plane.c +0
-1@@ -698,7 +698,6 @@ static const struct drm_plane_funcs rcar_du_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .reset = rcar_du_plane_reset, - .set_property = drm_atomic_helper_plane_set_property, .destroy = drm_plane_cleanup, .atomic_duplicate_state = rcar_du_plane_atomic_duplicate_state, .atomic_destroy_state = rcar_du_plane_atomic_destroy_state,drivers/gpu/drm/rcar-du/rcar_du_vsp.c +0
-1@@ -383,7 +383,6 @@ static const struct drm_plane_funcs rcar_du_vsp_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .reset = rcar_du_vsp_plane_reset, - .set_property = drm_atomic_helper_plane_set_property, .destroy = drm_plane_cleanup, .atomic_duplicate_state = rcar_du_vsp_plane_atomic_duplicate_state, .atomic_destroy_state = rcar_du_vsp_plane_atomic_destroy_state,drivers/gpu/drm/sti/sti_cursor.c +0
-1@@ -348,7 +348,6 @@ static const struct drm_plane_funcs sti_cursor_plane_helpers_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .destroy = sti_cursor_destroy, - .set_property = drm_atomic_helper_plane_set_property, .reset = sti_plane_reset, .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state, .atomic_destroy_state = drm_atomic_helper_plane_destroy_state,drivers/gpu/drm/sti/sti_gdp.c +0
-1@@ -895,7 +895,6 @@ static const struct drm_plane_funcs sti_gdp_plane_helpers_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .destroy = sti_gdp_destroy, - .set_property = drm_atomic_helper_plane_set_property, .reset = sti_plane_reset, .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state, .atomic_destroy_state = drm_atomic_helper_plane_destroy_state,drivers/gpu/drm/sti/sti_hqvdp.c +0
-1@@ -1276,7 +1276,6 @@ static const struct drm_plane_funcs sti_hqvdp_plane_helpers_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .destroy = sti_hqvdp_destroy, - .set_property = drm_atomic_helper_plane_set_property, .reset = sti_plane_reset, .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state, .atomic_destroy_state = drm_atomic_helper_plane_destroy_state,drivers/gpu/drm/stm/ltdc.c +0
-1@@ -697,7 +697,6 @@ static const struct drm_plane_funcs ltdc_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .destroy = drm_plane_cleanup, - .set_property = drm_atomic_helper_plane_set_property, .reset = drm_atomic_helper_plane_reset, .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state, .atomic_destroy_state = drm_atomic_helper_plane_destroy_state,drivers/gpu/drm/tilcdc/tilcdc_plane.c +0
-1@@ -28,7 +28,6 @@ static struct drm_plane_funcs tilcdc_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .destroy = drm_plane_cleanup, - .set_property = drm_atomic_helper_plane_set_property, .reset = drm_atomic_helper_plane_reset, .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state, .atomic_destroy_state = drm_atomic_helper_plane_destroy_state,include/drm/drm_atomic.h +0
-3@@ -315,9 +315,6 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc,struct drm_plane_state *__must_check drm_atomic_get_plane_state (struct drm_atomic_state *state,struct drm_plane *plane); -int drm_atomic_plane_set_property (struct drm_plane *plane, -struct drm_plane_state *state,struct drm_property *property, -uint64_t val);struct drm_connector_state *__must_check drm_atomic_get_connector_state (struct drm_atomic_state *state,struct drm_connector *connector);include/drm/drm_atomic_helper.h +0
-3@@ -124,9 +124,6 @@ int drm_atomic_helper_commit_duplicated_state(struct drm_atomic_state *state,int drm_atomic_helper_resume (struct drm_device *dev,struct drm_atomic_state *state); -int drm_atomic_helper_plane_set_property (struct drm_plane *plane, -struct drm_property *property, -uint64_t val);int drm_atomic_helper_connector_set_property (struct drm_connector *connector,struct drm_property *property,uint64_t val);
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
Re: [PATCH 5/8] drm: Nuke drm_atomic_helper_plane_set_property
In reply to Daniel VetterQuoted 17 lines · Daniel Vetter
It's dead code, the core handles all this directly now. This also allows us to unexport
drm_atomic_helper_plane_set_property.Signed-off-by Daniel Vetter <[email protected]>Cc Liviu Dudau <[email protected]>Cc Brian Starkey <[email protected]>Cc Mali DP Maintainers <[email protected]>Cc Boris Brezillon <[email protected]>Cc Daniel Vetter <[email protected]>Cc Jani Nikula <[email protected]>Cc Sean Paul <[email protected]>Cc David Airlie <[email protected]>Cc Inki Dae <[email protected]>Cc Joonyoung Shim <[email protected]>Cc Seung-Woo Kim <[email protected]>Cc Kyungmin Park <[email protected]>Cc Kukjin Kim <[email protected]>
Quoted 8 lines
Cc Krzysztof Kozlowski <[email protected]>Cc Ben Skeggs <[email protected]>Cc Tomi Valkeinen <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Benjamin Gaignard <[email protected]>Cc Vincent Abriou <[email protected]>Cc Yannick Fertre <[email protected]>Cc Philippe Cornu <[email protected]>
for stm,
Many thanks
Philippe :-)
Quoted 354 lines
Cc Jyri Sarha <[email protected]>Cc "Ville Syrjälä" <[email protected]>Cc Rongrong Zou <[email protected]>Cc Shawn Guo <[email protected]>Cc Alexey Brodkin <[email protected]>Cc Eric Engestrom <[email protected]>Cc Chris Wilson <[email protected]>Cc Rob Clark <[email protected]>Cc Archit Taneja <[email protected]>Cc Thomas Hellstrom <[email protected]>Cc Maxime Ripard <[email protected]>--- drivers/gpu/drm/arm/malidp_planes.c | 1 - drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 1 - drivers/gpu/drm/drm_atomic.c | 3 +- drivers/gpu/drm/drm_atomic_helper.c | 55 ------------------------- drivers/gpu/drm/exynos/exynos_drm_plane.c | 1 - drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 1 - drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 1 - drivers/gpu/drm/i915/intel_display.c | 2 - drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 2 - drivers/gpu/drm/nouveau/nv50_display.c | 1 - drivers/gpu/drm/omapdrm/omap_plane.c | 1 - drivers/gpu/drm/rcar-du/rcar_du_plane.c | 1 - drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 1 - drivers/gpu/drm/sti/sti_cursor.c | 1 - drivers/gpu/drm/sti/sti_gdp.c | 1 - drivers/gpu/drm/sti/sti_hqvdp.c | 1 - drivers/gpu/drm/stm/ltdc.c | 1 - drivers/gpu/drm/tilcdc/tilcdc_plane.c | 1 - include/drm/drm_atomic.h | 3 -- include/drm/drm_atomic_helper.h | 3 -- 20 files changed, 1 insertion(+), 81 deletions(-)drivers/gpu/drm/arm/malidp_planes.c +0
-1@@ -128,7 +128,6 @@ static void malidp_plane_atomic_print_state(struct drm_printer *p,static const struct drm_plane_funcs malidp_de_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, - .set_property = drm_atomic_helper_plane_set_property, .destroy = malidp_de_plane_destroy, .reset = malidp_plane_reset, .atomic_duplicate_state = malidp_duplicate_plane_state,drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c +0
-1@@ -1052,7 +1052,6 @@ static void atmel_hlcdc_plane_atomic_destroy_state(struct drm_plane *p,static struct drm_plane_funcs layer_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, - .set_property = drm_atomic_helper_plane_set_property, .destroy = atmel_hlcdc_plane_destroy, .reset = atmel_hlcdc_plane_reset, .atomic_duplicate_state = atmel_hlcdc_plane_atomic_duplicate_state,drivers/gpu/drm/drm_atomic.c +1
-2@@ -713,7 +713,7 @@ EXPORT_SYMBOL(drm_atomic_get_plane_state);* RETURNS: * Zero on success, error code on failure */ -int drm_atomic_plane_set_property (struct drm_plane *plane, +static int drm_atomic_plane_set_property (struct drm_plane *plane,struct drm_plane_state *state,struct drm_property *property,uint64_t val) {@@ -770,7 +770,6 @@ int drm_atomic_plane_set_property(struct drm_plane *plane,return 0 ; } -EXPORT_SYMBOL (drm_atomic_plane_set_property);/** * drm_atomic_plane_get_property - get property value from plane state drivers/gpu/drm/drm_atomic_helper.c +0
-55@@ -2968,61 +2968,6 @@ int drm_atomic_helper_resume(struct drm_device *dev,EXPORT_SYMBOL (drm_atomic_helper_resume);/** -* drm_atomic_helper_plane_set_property - helper for plane properties -* @plane: DRM plane -* @property: DRM property -* @val: value of property -* -* Provides a default plane set_property handler using the atomic driver -* interface. -* -* RETURNS: -* Zero on success, error code on failure -*/ -int -drm_atomic_helper_plane_set_property (struct drm_plane *plane, -struct drm_property *property, -uint64_t val) -{ -struct drm_atomic_state *state; -struct drm_plane_state *plane_state; -int ret =0 ; - - state =drm_atomic_state_alloc (plane->dev); -if (!state) -return -ENOMEM ; - -/* ->set_property is always called with all locks held. */ - state->acquire_ctx = plane->dev->mode_config.acquire_ctx; -retry: - plane_state =drm_atomic_get_plane_state (state, plane); -if (IS_ERR (plane_state)) { - ret =PTR_ERR (plane_state); - goto fail; - } - - ret =drm_atomic_plane_set_property (plane, plane_state, - property, val); -if (ret) - goto fail; - - ret =drm_atomic_commit (state); -fail: -if (ret == -EDEADLK ) - goto backoff; - -drm_atomic_state_put (state); -return ret; - -backoff: -drm_atomic_state_clear (state); -drm_atomic_legacy_backoff (state); - - goto retry; -} -EXPORT_SYMBOL (drm_atomic_helper_plane_set_property); - -/** * drm_atomic_helper_connector_set_property - helper for connector properties * @connector: DRM connector * @property: DRM property drivers/gpu/drm/exynos/exynos_drm_plane.c +0
-1@@ -173,7 +173,6 @@ static struct drm_plane_funcs exynos_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .destroy = drm_plane_cleanup, - .set_property = drm_atomic_helper_plane_set_property, .reset = exynos_drm_plane_reset, .atomic_duplicate_state = exynos_drm_plane_duplicate_state, .atomic_destroy_state = exynos_drm_plane_destroy_state,drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c +0
-1@@ -150,7 +150,6 @@ static const u32 channel_formats1[] = {static struct drm_plane_funcs hibmc_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, - .set_property = drm_atomic_helper_plane_set_property, .destroy = drm_plane_cleanup, .reset = drm_atomic_helper_plane_reset, .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c +0
-1@@ -889,7 +889,6 @@ static const struct drm_plane_helper_funcs ade_plane_helper_funcs = {static struct drm_plane_funcs ade_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, - .set_property = drm_atomic_helper_plane_set_property, .destroy = drm_plane_cleanup, .reset = drm_atomic_helper_plane_reset, .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,drivers/gpu/drm/i915/intel_display.c +0
-2@@ -12649,7 +12649,6 @@ const struct drm_plane_funcs intel_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .destroy = intel_plane_destroy, - .set_property = drm_atomic_helper_plane_set_property, .atomic_get_property = intel_plane_atomic_get_property, .atomic_set_property = intel_plane_atomic_set_property, .atomic_duplicate_state = intel_plane_duplicate_state,@@ -12784,7 +12783,6 @@ static const struct drm_plane_funcs intel_cursor_plane_funcs = { .update_plane = intel_legacy_cursor_update, .disable_plane = drm_atomic_helper_disable_plane, .destroy = intel_plane_destroy, - .set_property = drm_atomic_helper_plane_set_property, .atomic_get_property = intel_plane_atomic_get_property, .atomic_set_property = intel_plane_atomic_set_property, .atomic_duplicate_state = intel_plane_duplicate_state,drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c +0
-2@@ -246,7 +246,6 @@ static const struct drm_plane_funcs mdp5_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .destroy = mdp5_plane_destroy, - .set_property = drm_atomic_helper_plane_set_property, .atomic_set_property = mdp5_plane_atomic_set_property, .atomic_get_property = mdp5_plane_atomic_get_property, .reset = mdp5_plane_reset,@@ -259,7 +258,6 @@ static const struct drm_plane_funcs mdp5_cursor_plane_funcs = { .update_plane = mdp5_update_cursor_plane_legacy, .disable_plane = drm_atomic_helper_disable_plane, .destroy = mdp5_plane_destroy, - .set_property = drm_atomic_helper_plane_set_property, .atomic_set_property = mdp5_plane_atomic_set_property, .atomic_get_property = mdp5_plane_atomic_get_property, .reset = mdp5_plane_reset,drivers/gpu/drm/nouveau/nv50_display.c +0
-1@@ -1055,7 +1055,6 @@ nv50_wndw = { .disable_plane = drm_atomic_helper_disable_plane, .destroy = nv50_wndw_destroy, .reset = nv50_wndw_reset, - .set_property = drm_atomic_helper_plane_set_property, .atomic_duplicate_state = nv50_wndw_atomic_duplicate_state, .atomic_destroy_state = nv50_wndw_atomic_destroy_state, };drivers/gpu/drm/omapdrm/omap_plane.c +0
-1@@ -235,7 +235,6 @@ static const struct drm_plane_funcs omap_plane_funcs = { .disable_plane = drm_atomic_helper_disable_plane, .reset = omap_plane_reset, .destroy = omap_plane_destroy, - .set_property = drm_atomic_helper_plane_set_property, .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state, .atomic_destroy_state = drm_atomic_helper_plane_destroy_state, .atomic_set_property = omap_plane_atomic_set_property,drivers/gpu/drm/rcar-du/rcar_du_plane.c +0
-1@@ -698,7 +698,6 @@ static const struct drm_plane_funcs rcar_du_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .reset = rcar_du_plane_reset, - .set_property = drm_atomic_helper_plane_set_property, .destroy = drm_plane_cleanup, .atomic_duplicate_state = rcar_du_plane_atomic_duplicate_state, .atomic_destroy_state = rcar_du_plane_atomic_destroy_state,drivers/gpu/drm/rcar-du/rcar_du_vsp.c +0
-1@@ -383,7 +383,6 @@ static const struct drm_plane_funcs rcar_du_vsp_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .reset = rcar_du_vsp_plane_reset, - .set_property = drm_atomic_helper_plane_set_property, .destroy = drm_plane_cleanup, .atomic_duplicate_state = rcar_du_vsp_plane_atomic_duplicate_state, .atomic_destroy_state = rcar_du_vsp_plane_atomic_destroy_state,drivers/gpu/drm/sti/sti_cursor.c +0
-1@@ -348,7 +348,6 @@ static const struct drm_plane_funcs sti_cursor_plane_helpers_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .destroy = sti_cursor_destroy, - .set_property = drm_atomic_helper_plane_set_property, .reset = sti_plane_reset, .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state, .atomic_destroy_state = drm_atomic_helper_plane_destroy_state,drivers/gpu/drm/sti/sti_gdp.c +0
-1@@ -895,7 +895,6 @@ static const struct drm_plane_funcs sti_gdp_plane_helpers_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .destroy = sti_gdp_destroy, - .set_property = drm_atomic_helper_plane_set_property, .reset = sti_plane_reset, .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state, .atomic_destroy_state = drm_atomic_helper_plane_destroy_state,drivers/gpu/drm/sti/sti_hqvdp.c +0
-1@@ -1276,7 +1276,6 @@ static const struct drm_plane_funcs sti_hqvdp_plane_helpers_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .destroy = sti_hqvdp_destroy, - .set_property = drm_atomic_helper_plane_set_property, .reset = sti_plane_reset, .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state, .atomic_destroy_state = drm_atomic_helper_plane_destroy_state,drivers/gpu/drm/stm/ltdc.c +0
-1@@ -697,7 +697,6 @@ static const struct drm_plane_funcs ltdc_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .destroy = drm_plane_cleanup, - .set_property = drm_atomic_helper_plane_set_property, .reset = drm_atomic_helper_plane_reset, .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state, .atomic_destroy_state = drm_atomic_helper_plane_destroy_state,drivers/gpu/drm/tilcdc/tilcdc_plane.c +0
-1@@ -28,7 +28,6 @@ static struct drm_plane_funcs tilcdc_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .destroy = drm_plane_cleanup, - .set_property = drm_atomic_helper_plane_set_property, .reset = drm_atomic_helper_plane_reset, .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state, .atomic_destroy_state = drm_atomic_helper_plane_destroy_state,include/drm/drm_atomic.h +0
-3@@ -315,9 +315,6 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc,struct drm_plane_state *__must_check drm_atomic_get_plane_state (struct drm_atomic_state *state,struct drm_plane *plane); -int drm_atomic_plane_set_property (struct drm_plane *plane, -struct drm_plane_state *state,struct drm_property *property, -uint64_t val);struct drm_connector_state *__must_check drm_atomic_get_connector_state (struct drm_atomic_state *state,struct drm_connector *connector);include/drm/drm_atomic_helper.h +0
-0
include/drm/drm_atomic_helper.h int drm_atomic_helper_commit_duplicated_state(struct drm_atomic_state *state, · line 129
Quoted 9 lines
include/drm/drm_atomic_helper.h +0
-3@@ -124,9 +124,6 @@ int drm_atomic_helper_commit_duplicated_state(struct drm_atomic_state *state,int drm_atomic_helper_resume (struct drm_device *dev,struct drm_atomic_state *state); -int drm_atomic_helper_plane_set_property (struct drm_plane *plane, -struct drm_property *property, -uint64_t val);int drm_atomic_helper_connector_set_property (struct drm_connector *connector,struct drm_property *property,uint64_t val);
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 5/8] drm: Nuke drm_atomic_helper_plane_set_property
In reply to Daniel VetterQuoted 69 lines · Daniel Vetter
It's dead code, the core handles all this directly now. This also allows us to unexport
drm_atomic_helper_plane_set_property.Signed-off-by Daniel Vetter <[email protected]>Cc Liviu Dudau <[email protected]>Cc Brian Starkey <[email protected]>Cc Mali DP Maintainers <[email protected]>Cc Boris Brezillon <[email protected]>Cc Daniel Vetter <[email protected]>Cc Jani Nikula <[email protected]>Cc Sean Paul <[email protected]>Cc David Airlie <[email protected]>Cc Inki Dae <[email protected]>Cc Joonyoung Shim <[email protected]>Cc Seung-Woo Kim <[email protected]>Cc Kyungmin Park <[email protected]>Cc Kukjin Kim <[email protected]>Cc Krzysztof Kozlowski <[email protected]>Cc Ben Skeggs <[email protected]>Cc Tomi Valkeinen <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Benjamin Gaignard <[email protected]>Cc Vincent Abriou <[email protected]>Cc Yannick Fertre <[email protected]>Cc Philippe Cornu <[email protected]>Cc Jyri Sarha <[email protected]>Cc "Ville Syrjälä" <[email protected]>Cc Rongrong Zou <[email protected]>Cc Shawn Guo <[email protected]>Cc Alexey Brodkin <[email protected]>Cc Eric Engestrom <[email protected]>Cc Chris Wilson <[email protected]>Cc Rob Clark <[email protected]>Cc Archit Taneja <[email protected]>Cc Thomas Hellstrom <[email protected]>Cc Maxime Ripard <[email protected]>--- drivers/gpu/drm/arm/malidp_planes.c | 1 - drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 1 - drivers/gpu/drm/drm_atomic.c | 3 +- drivers/gpu/drm/drm_atomic_helper.c | 55 ------------------------- drivers/gpu/drm/exynos/exynos_drm_plane.c | 1 - drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 1 - drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 1 - drivers/gpu/drm/i915/intel_display.c | 2 - drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 2 - drivers/gpu/drm/nouveau/nv50_display.c | 1 - drivers/gpu/drm/omapdrm/omap_plane.c | 1 - drivers/gpu/drm/rcar-du/rcar_du_plane.c | 1 - drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 1 - drivers/gpu/drm/sti/sti_cursor.c | 1 - drivers/gpu/drm/sti/sti_gdp.c | 1 - drivers/gpu/drm/sti/sti_hqvdp.c | 1 - drivers/gpu/drm/stm/ltdc.c | 1 - drivers/gpu/drm/tilcdc/tilcdc_plane.c | 1 - include/drm/drm_atomic.h | 3 -- include/drm/drm_atomic_helper.h | 3 -- 20 files changed, 1 insertion(+), 81 deletions(-)drivers/gpu/drm/arm/malidp_planes.c +0
-0
drivers/gpu/drm/arm/malidp_planes.c static void malidp_plane_atomic_print_state(struct drm_printer *p, · line 133
Quoted 7 lines
drivers/gpu/drm/arm/malidp_planes.c +0
-1@@ -128,7 +128,6 @@ static void malidp_plane_atomic_print_state(struct drm_printer *p,static const struct drm_plane_funcs malidp_de_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, - .set_property = drm_atomic_helper_plane_set_property, .destroy = malidp_de_plane_destroy, .reset = malidp_plane_reset, .atomic_duplicate_state = malidp_duplicate_plane_state,
For mali-dp changes:
I'm assuming the series goes through drm-next tree.
Thanks,
Liviu
Quoted 314 lines
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c +0
-1@@ -1052,7 +1052,6 @@ static void atmel_hlcdc_plane_atomic_destroy_state(struct drm_plane *p,static struct drm_plane_funcs layer_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, - .set_property = drm_atomic_helper_plane_set_property, .destroy = atmel_hlcdc_plane_destroy, .reset = atmel_hlcdc_plane_reset, .atomic_duplicate_state = atmel_hlcdc_plane_atomic_duplicate_state,drivers/gpu/drm/drm_atomic.c +1
-2@@ -713,7 +713,7 @@ EXPORT_SYMBOL(drm_atomic_get_plane_state);* RETURNS: * Zero on success, error code on failure */ -int drm_atomic_plane_set_property (struct drm_plane *plane, +static int drm_atomic_plane_set_property (struct drm_plane *plane,struct drm_plane_state *state,struct drm_property *property,uint64_t val) {@@ -770,7 +770,6 @@ int drm_atomic_plane_set_property(struct drm_plane *plane,return 0 ; } -EXPORT_SYMBOL (drm_atomic_plane_set_property);/** * drm_atomic_plane_get_property - get property value from plane state drivers/gpu/drm/drm_atomic_helper.c +0
-55@@ -2968,61 +2968,6 @@ int drm_atomic_helper_resume(struct drm_device *dev,EXPORT_SYMBOL (drm_atomic_helper_resume);/** -* drm_atomic_helper_plane_set_property - helper for plane properties -* @plane: DRM plane -* @property: DRM property -* @val: value of property -* -* Provides a default plane set_property handler using the atomic driver -* interface. -* -* RETURNS: -* Zero on success, error code on failure -*/ -int -drm_atomic_helper_plane_set_property (struct drm_plane *plane, -struct drm_property *property, -uint64_t val) -{ -struct drm_atomic_state *state; -struct drm_plane_state *plane_state; -int ret =0 ; - - state =drm_atomic_state_alloc (plane->dev); -if (!state) -return -ENOMEM ; - -/* ->set_property is always called with all locks held. */ - state->acquire_ctx = plane->dev->mode_config.acquire_ctx; -retry: - plane_state =drm_atomic_get_plane_state (state, plane); -if (IS_ERR (plane_state)) { - ret =PTR_ERR (plane_state); - goto fail; - } - - ret =drm_atomic_plane_set_property (plane, plane_state, - property, val); -if (ret) - goto fail; - - ret =drm_atomic_commit (state); -fail: -if (ret == -EDEADLK ) - goto backoff; - -drm_atomic_state_put (state); -return ret; - -backoff: -drm_atomic_state_clear (state); -drm_atomic_legacy_backoff (state); - - goto retry; -} -EXPORT_SYMBOL (drm_atomic_helper_plane_set_property); - -/** * drm_atomic_helper_connector_set_property - helper for connector properties * @connector: DRM connector * @property: DRM property drivers/gpu/drm/exynos/exynos_drm_plane.c +0
-1@@ -173,7 +173,6 @@ static struct drm_plane_funcs exynos_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .destroy = drm_plane_cleanup, - .set_property = drm_atomic_helper_plane_set_property, .reset = exynos_drm_plane_reset, .atomic_duplicate_state = exynos_drm_plane_duplicate_state, .atomic_destroy_state = exynos_drm_plane_destroy_state,drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c +0
-1@@ -150,7 +150,6 @@ static const u32 channel_formats1[] = {static struct drm_plane_funcs hibmc_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, - .set_property = drm_atomic_helper_plane_set_property, .destroy = drm_plane_cleanup, .reset = drm_atomic_helper_plane_reset, .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c +0
-1@@ -889,7 +889,6 @@ static const struct drm_plane_helper_funcs ade_plane_helper_funcs = {static struct drm_plane_funcs ade_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, - .set_property = drm_atomic_helper_plane_set_property, .destroy = drm_plane_cleanup, .reset = drm_atomic_helper_plane_reset, .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,drivers/gpu/drm/i915/intel_display.c +0
-2@@ -12649,7 +12649,6 @@ const struct drm_plane_funcs intel_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .destroy = intel_plane_destroy, - .set_property = drm_atomic_helper_plane_set_property, .atomic_get_property = intel_plane_atomic_get_property, .atomic_set_property = intel_plane_atomic_set_property, .atomic_duplicate_state = intel_plane_duplicate_state,@@ -12784,7 +12783,6 @@ static const struct drm_plane_funcs intel_cursor_plane_funcs = { .update_plane = intel_legacy_cursor_update, .disable_plane = drm_atomic_helper_disable_plane, .destroy = intel_plane_destroy, - .set_property = drm_atomic_helper_plane_set_property, .atomic_get_property = intel_plane_atomic_get_property, .atomic_set_property = intel_plane_atomic_set_property, .atomic_duplicate_state = intel_plane_duplicate_state,drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c +0
-2@@ -246,7 +246,6 @@ static const struct drm_plane_funcs mdp5_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .destroy = mdp5_plane_destroy, - .set_property = drm_atomic_helper_plane_set_property, .atomic_set_property = mdp5_plane_atomic_set_property, .atomic_get_property = mdp5_plane_atomic_get_property, .reset = mdp5_plane_reset,@@ -259,7 +258,6 @@ static const struct drm_plane_funcs mdp5_cursor_plane_funcs = { .update_plane = mdp5_update_cursor_plane_legacy, .disable_plane = drm_atomic_helper_disable_plane, .destroy = mdp5_plane_destroy, - .set_property = drm_atomic_helper_plane_set_property, .atomic_set_property = mdp5_plane_atomic_set_property, .atomic_get_property = mdp5_plane_atomic_get_property, .reset = mdp5_plane_reset,drivers/gpu/drm/nouveau/nv50_display.c +0
-1@@ -1055,7 +1055,6 @@ nv50_wndw = { .disable_plane = drm_atomic_helper_disable_plane, .destroy = nv50_wndw_destroy, .reset = nv50_wndw_reset, - .set_property = drm_atomic_helper_plane_set_property, .atomic_duplicate_state = nv50_wndw_atomic_duplicate_state, .atomic_destroy_state = nv50_wndw_atomic_destroy_state, };drivers/gpu/drm/omapdrm/omap_plane.c +0
-1@@ -235,7 +235,6 @@ static const struct drm_plane_funcs omap_plane_funcs = { .disable_plane = drm_atomic_helper_disable_plane, .reset = omap_plane_reset, .destroy = omap_plane_destroy, - .set_property = drm_atomic_helper_plane_set_property, .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state, .atomic_destroy_state = drm_atomic_helper_plane_destroy_state, .atomic_set_property = omap_plane_atomic_set_property,drivers/gpu/drm/rcar-du/rcar_du_plane.c +0
-1@@ -698,7 +698,6 @@ static const struct drm_plane_funcs rcar_du_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .reset = rcar_du_plane_reset, - .set_property = drm_atomic_helper_plane_set_property, .destroy = drm_plane_cleanup, .atomic_duplicate_state = rcar_du_plane_atomic_duplicate_state, .atomic_destroy_state = rcar_du_plane_atomic_destroy_state,drivers/gpu/drm/rcar-du/rcar_du_vsp.c +0
-1@@ -383,7 +383,6 @@ static const struct drm_plane_funcs rcar_du_vsp_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .reset = rcar_du_vsp_plane_reset, - .set_property = drm_atomic_helper_plane_set_property, .destroy = drm_plane_cleanup, .atomic_duplicate_state = rcar_du_vsp_plane_atomic_duplicate_state, .atomic_destroy_state = rcar_du_vsp_plane_atomic_destroy_state,drivers/gpu/drm/sti/sti_cursor.c +0
-1@@ -348,7 +348,6 @@ static const struct drm_plane_funcs sti_cursor_plane_helpers_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .destroy = sti_cursor_destroy, - .set_property = drm_atomic_helper_plane_set_property, .reset = sti_plane_reset, .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state, .atomic_destroy_state = drm_atomic_helper_plane_destroy_state,drivers/gpu/drm/sti/sti_gdp.c +0
-1@@ -895,7 +895,6 @@ static const struct drm_plane_funcs sti_gdp_plane_helpers_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .destroy = sti_gdp_destroy, - .set_property = drm_atomic_helper_plane_set_property, .reset = sti_plane_reset, .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state, .atomic_destroy_state = drm_atomic_helper_plane_destroy_state,drivers/gpu/drm/sti/sti_hqvdp.c +0
-1@@ -1276,7 +1276,6 @@ static const struct drm_plane_funcs sti_hqvdp_plane_helpers_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .destroy = sti_hqvdp_destroy, - .set_property = drm_atomic_helper_plane_set_property, .reset = sti_plane_reset, .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state, .atomic_destroy_state = drm_atomic_helper_plane_destroy_state,drivers/gpu/drm/stm/ltdc.c +0
-1@@ -697,7 +697,6 @@ static const struct drm_plane_funcs ltdc_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .destroy = drm_plane_cleanup, - .set_property = drm_atomic_helper_plane_set_property, .reset = drm_atomic_helper_plane_reset, .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state, .atomic_destroy_state = drm_atomic_helper_plane_destroy_state,drivers/gpu/drm/tilcdc/tilcdc_plane.c +0
-1@@ -28,7 +28,6 @@ static struct drm_plane_funcs tilcdc_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .destroy = drm_plane_cleanup, - .set_property = drm_atomic_helper_plane_set_property, .reset = drm_atomic_helper_plane_reset, .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state, .atomic_destroy_state = drm_atomic_helper_plane_destroy_state,include/drm/drm_atomic.h +0
-3@@ -315,9 +315,6 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc,struct drm_plane_state *__must_check drm_atomic_get_plane_state (struct drm_atomic_state *state,struct drm_plane *plane); -int drm_atomic_plane_set_property (struct drm_plane *plane, -struct drm_plane_state *state,struct drm_property *property, -uint64_t val);struct drm_connector_state *__must_check drm_atomic_get_connector_state (struct drm_atomic_state *state,struct drm_connector *connector);include/drm/drm_atomic_helper.h +0
-3@@ -124,9 +124,6 @@ int drm_atomic_helper_commit_duplicated_state(struct drm_atomic_state *state,int drm_atomic_helper_resume (struct drm_device *dev,struct drm_atomic_state *state); -int drm_atomic_helper_plane_set_property (struct drm_plane *plane, -struct drm_property *property, -uint64_t val);int drm_atomic_helper_connector_set_property (struct drm_connector *connector,struct drm_property *property,uint64_t val);Signature · 1 line
2.13.3
Signature · 12 lines
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-develRe: [PATCH 5/8] drm: Nuke drm_atomic_helper_plane_set_property
In reply to Daniel VetterQuoted 4 lines · Daniel Vetter
It's dead code, the core handles all this directly now. This also allows us to unexport
drm_atomic_helper_plane_set_property.Signed-off-by Daniel Vetter <[email protected]>
[...]
Quoted 3 lines
drivers/gpu/drm/sti/sti_cursor.c | 1 - drivers/gpu/drm/sti/sti_gdp.c | 1 - drivers/gpu/drm/sti/sti_hqvdp.c | 1 -
BR
Vincent
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 5/8] drm: Nuke drm_atomic_helper_plane_set_property
In reply to Daniel VetterHi Daniel,
Thank you for the patch.
Quoted 2 lines · On Tuesday 25 Jul 2017 10:01:19 Daniel Vetter wrote:
It's dead code, the core handles all this directly now. This also allows us to unexport
drm_atomic_helper_plane_set_property.
I assume you meant drm_atomic_plane_set_property. With that fixed,
Quoted 60 lines
Signed-off-by Daniel Vetter <[email protected]>Cc Liviu Dudau <[email protected]>Cc Brian Starkey <[email protected]>Cc Mali DP Maintainers <[email protected]>Cc Boris Brezillon <[email protected]>Cc Daniel Vetter <[email protected]>Cc Jani Nikula <[email protected]>Cc Sean Paul <[email protected]>Cc David Airlie <[email protected]>Cc Inki Dae <[email protected]>Cc Joonyoung Shim <[email protected]>Cc Seung-Woo Kim <[email protected]>Cc Kyungmin Park <[email protected]>Cc Kukjin Kim <[email protected]>Cc Krzysztof Kozlowski <[email protected]>Cc Ben Skeggs <[email protected]>Cc Tomi Valkeinen <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Benjamin Gaignard <[email protected]>Cc Vincent Abriou <[email protected]>Cc Yannick Fertre <[email protected]>Cc Philippe Cornu <[email protected]>Cc Jyri Sarha <[email protected]>Cc "Ville Syrjälä" <[email protected]>Cc Rongrong Zou <[email protected]>Cc Shawn Guo <[email protected]>Cc Alexey Brodkin <[email protected]>Cc Eric Engestrom <[email protected]>Cc Chris Wilson <[email protected]>Cc Rob Clark <[email protected]>Cc Archit Taneja <[email protected]>Cc Thomas Hellstrom <[email protected]>Cc Maxime Ripard <[email protected]>--- drivers/gpu/drm/arm/malidp_planes.c | 1 - drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 1 - drivers/gpu/drm/drm_atomic.c | 3 +- drivers/gpu/drm/drm_atomic_helper.c | 55 ---------------------- drivers/gpu/drm/exynos/exynos_drm_plane.c | 1 - drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 1 - drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 1 - drivers/gpu/drm/i915/intel_display.c | 2 - drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 2 - drivers/gpu/drm/nouveau/nv50_display.c | 1 - drivers/gpu/drm/omapdrm/omap_plane.c | 1 - drivers/gpu/drm/rcar-du/rcar_du_plane.c | 1 - drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 1 - drivers/gpu/drm/sti/sti_cursor.c | 1 - drivers/gpu/drm/sti/sti_gdp.c | 1 - drivers/gpu/drm/sti/sti_hqvdp.c | 1 - drivers/gpu/drm/stm/ltdc.c | 1 - drivers/gpu/drm/tilcdc/tilcdc_plane.c | 1 - include/drm/drm_atomic.h | 3 -- include/drm/drm_atomic_helper.h | 3 -- 20 files changed, 1 insertion(+), 81 deletions(-)
Signature · 8 lines
Regards, Laurent Pinchart _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
A message that is not in the archive (sent off-list or not yet received): 20170725080122.20548-1-daniel.vetter-/[email protected]
PATCH 6/8 drm: Nuke drm_atomic_helper_connector_set_property
It's dead code, the core handles all this directly now. This also allows us to unexport drm_atomic_helper_connector_set_property.
The only special case is nouveau which used one function for both pre-nv50 legacy modeset code and post-nv50 atomic world instead of 2 vtables. But amounts to exactly the same.
What is rather strange here is how few drivers set this up, I suspect the earlier patch to handle properties in the core did end up fixing a pile of possible issues.
--- drivers/gpu/drm/drm_atomic.c | 3 +- drivers/gpu/drm/drm_atomic_helper.c | 55 ----------------------------- drivers/gpu/drm/i915/intel_crt.c | 1 - drivers/gpu/drm/i915/intel_dp.c | 1 - drivers/gpu/drm/i915/intel_dp_mst.c | 1 - drivers/gpu/drm/i915/intel_dsi.c | 1 - drivers/gpu/drm/i915/intel_dvo.c | 1 - drivers/gpu/drm/i915/intel_hdmi.c | 1 - drivers/gpu/drm/i915/intel_lvds.c | 1 - drivers/gpu/drm/i915/intel_sdvo.c | 1 - drivers/gpu/drm/i915/intel_tv.c | 1 - drivers/gpu/drm/nouveau/nouveau_connector.c | 3 -- drivers/gpu/drm/nouveau/nv50_display.c | 1 - drivers/gpu/drm/sti/sti_hdmi.c | 1 - drivers/gpu/drm/vc4/vc4_vec.c | 1 - include/drm/drm_atomic.h | 3 -- include/drm/drm_atomic_helper.h | 3 -- 17 files changed, 1 insertion(+), 78 deletions(-)
drivers/gpu/drm/drm_atomic.c +1 -2
@@ -1144,7 +1144,7 @@ EXPORT_SYMBOL(drm_atomic_get_connector_state);* RETURNS: * Zero on success, error code on failure */ -int drm_atomic_connector_set_property (struct drm_connector *connector, +static int drm_atomic_connector_set_property (struct drm_connector *connector,struct drm_connector_state *state,struct drm_property *property,uint64_t val) {
@@ -1211,7 +1211,6 @@ int drm_atomic_connector_set_property(struct drm_connector *connector,return 0 ; } -EXPORT_SYMBOL (drm_atomic_connector_set_property);static void drm_atomic_connector_print_state (struct drm_printer *p,const struct drm_connector_state *state)
drivers/gpu/drm/drm_atomic_helper.c +0 -55
61 lines not on this page · raw message
drivers/gpu/drm/i915/intel_crt.c +0 -1
@@ -807,7 +807,6 @@ static const struct drm_connector_funcs intel_crt_connector_funcs = { .late_register = intel_connector_register, .early_unregister = intel_connector_unregister, .destroy = intel_crt_destroy, - .set_property = drm_atomic_helper_connector_set_property, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, };
drivers/gpu/drm/i915/intel_dp.c +0 -1
@@ -5010,7 +5010,6 @@ static const struct drm_connector_funcs intel_dp_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .force = intel_dp_force, .fill_modes = drm_helper_probe_single_connector_modes, - .set_property = drm_atomic_helper_connector_set_property, .atomic_get_property = intel_digital_connector_atomic_get_property, .atomic_set_property = intel_digital_connector_atomic_set_property, .late_register = intel_dp_connector_register,
drivers/gpu/drm/i915/intel_dp_mst.c +0 -1
@@ -349,7 +349,6 @@ static const struct drm_connector_funcs intel_dp_mst_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .detect = intel_dp_mst_detect, .fill_modes = drm_helper_probe_single_connector_modes, - .set_property = drm_atomic_helper_connector_set_property, .late_register = intel_connector_register, .early_unregister = intel_connector_unregister, .destroy = intel_dp_mst_connector_destroy,
drivers/gpu/drm/i915/intel_dsi.c +0 -1
@@ -1658,7 +1658,6 @@ static const struct drm_connector_funcs intel_dsi_connector_funcs = { .early_unregister = intel_connector_unregister, .destroy = intel_dsi_connector_destroy, .fill_modes = drm_helper_probe_single_connector_modes, - .set_property = drm_atomic_helper_connector_set_property, .atomic_get_property = intel_digital_connector_atomic_get_property, .atomic_set_property = intel_digital_connector_atomic_set_property, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
drivers/gpu/drm/i915/intel_dvo.c +0 -1
@@ -350,7 +350,6 @@ static const struct drm_connector_funcs intel_dvo_connector_funcs = { .early_unregister = intel_connector_unregister, .destroy = intel_dvo_destroy, .fill_modes = drm_helper_probe_single_connector_modes, - .set_property = drm_atomic_helper_connector_set_property, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, };
drivers/gpu/drm/i915/intel_hdmi.c +0 -1
@@ -1765,7 +1765,6 @@ static const struct drm_connector_funcs intel_hdmi_connector_funcs = { .detect = intel_hdmi_detect, .force = intel_hdmi_force, .fill_modes = drm_helper_probe_single_connector_modes, - .set_property = drm_atomic_helper_connector_set_property, .atomic_get_property = intel_digital_connector_atomic_get_property, .atomic_set_property = intel_digital_connector_atomic_set_property, .late_register = intel_connector_register,
drivers/gpu/drm/i915/intel_lvds.c +0 -1
@@ -598,7 +598,6 @@ static const struct drm_connector_funcs intel_lvds_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .detect = intel_lvds_detect, .fill_modes = drm_helper_probe_single_connector_modes, - .set_property = drm_atomic_helper_connector_set_property, .atomic_get_property = intel_digital_connector_atomic_get_property, .atomic_set_property = intel_digital_connector_atomic_set_property, .late_register = intel_connector_register,
drivers/gpu/drm/i915/intel_sdvo.c +0 -1
@@ -2196,7 +2196,6 @@ static const struct drm_connector_funcs intel_sdvo_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .detect = intel_sdvo_detect, .fill_modes = drm_helper_probe_single_connector_modes, - .set_property = drm_atomic_helper_connector_set_property, .atomic_get_property = intel_sdvo_connector_atomic_get_property, .atomic_set_property = intel_sdvo_connector_atomic_set_property, .late_register = intel_sdvo_connector_register,
drivers/gpu/drm/i915/intel_tv.c +0 -1
@@ -1411,7 +1411,6 @@ static const struct drm_connector_funcs intel_tv_connector_funcs = { .late_register = intel_connector_register, .early_unregister = intel_connector_unregister, .destroy = intel_tv_destroy, - .set_property = drm_atomic_helper_connector_set_property, .fill_modes = drm_helper_probe_single_connector_modes, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
drivers/gpu/drm/nouveau/nouveau_connector.c +0 -3
@@ -770,9 +770,6 @@ nouveau_connector_set_property(struct drm_connector *connector,struct drm_encoder *encoder =to_drm_encoder (nv_encoder);int ret; -if (drm_drv_uses_atomic_modeset (connector->dev)) -return drm_atomic_helper_connector_set_property (connector, property, value); - ret = connector->funcs->atomic_set_property (&nv_connector->base, &asyc->state, property, value);
drivers/gpu/drm/nouveau/nv50_display.c +0 -1
@@ -3122,7 +3122,6 @@ nv50_mstc = { .reset = nouveau_conn_reset, .detect = nv50_mstc_detect, .fill_modes = drm_helper_probe_single_connector_modes, - .set_property = drm_atomic_helper_connector_set_property, .destroy = nv50_mstc_destroy, .atomic_duplicate_state = nouveau_conn_atomic_duplicate_state, .atomic_destroy_state = nouveau_conn_atomic_destroy_state,
drivers/gpu/drm/sti/sti_hdmi.c +0 -1
@@ -1118,7 +1118,6 @@ static const struct drm_connector_funcs sti_hdmi_connector_funcs = { .detect = sti_hdmi_connector_detect, .destroy = drm_connector_cleanup, .reset = drm_atomic_helper_connector_reset, - .set_property = drm_atomic_helper_connector_set_property, .atomic_set_property = sti_hdmi_connector_set_property, .atomic_get_property = sti_hdmi_connector_get_property, .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
drivers/gpu/drm/vc4/vc4_vec.c +0 -1
@@ -369,7 +369,6 @@ static const struct drm_connector_funcs vc4_vec_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .detect = vc4_vec_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, - .set_property = drm_atomic_helper_connector_set_property, .destroy = vc4_vec_connector_destroy, .reset = drm_atomic_helper_connector_reset, .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
include/drm/drm_atomic.h +0 -3
@@ -318,9 +318,6 @@ drm_atomic_get_plane_state(struct drm_atomic_state *state,struct drm_connector_state *__must_check drm_atomic_get_connector_state (struct drm_atomic_state *state,struct drm_connector *connector); -int drm_atomic_connector_set_property (struct drm_connector *connector, -struct drm_connector_state *state,struct drm_property *property, -uint64_t val); void drm_atomic_private_obj_init(struct drm_private_obj *obj, struct drm_private_state *state,
include/drm/drm_atomic_helper.h +0 -3
@@ -124,9 +124,6 @@ int drm_atomic_helper_commit_duplicated_state(struct drm_atomic_state *state,int drm_atomic_helper_resume (struct drm_device *dev,struct drm_atomic_state *state); -int drm_atomic_helper_connector_set_property (struct drm_connector *connector, -struct drm_property *property, -uint64_t val); int drm_atomic_helper_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, struct drm_pending_vblank_event *event,
Signature · 6 lines
2.13.3 _______________________________________________ Nouveau mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/nouveau
A message that is not in the archive (sent off-list or not yet received): 20170725080122.20548-7-daniel.vetter-/[email protected]
Re: [Intel-gfx] [PATCH 6/8] drm: Nuke drm_atomic_helper_connector_set_property
Op 25-07-17 om 10:01 schreef Daniel Vetter:
Quoted 10 lines
It's dead code, the core handles all this directly now. This also allows us to unexport
drm_atomic_helper_connector_set_property.The only special case is nouveau which used one function for both pre-nv50 legacy modeset code and post-nv50 atomic world instead of 2 vtables. But amounts to exactly the same.
What is rather strange here is how few drivers set this up, I suspect the earlier patch to handle properties in the core did end up fixing a pile of possible issues.
Legacy drivers didn't always hook it up either, probably why. :) No use hooking it up in legacy world if you didn't expose a property.
But yeah, good to fix this.
Quoted 295 lines
Signed-off-by Daniel Vetter <[email protected]>Cc Daniel Vetter <[email protected]>Cc Jani Nikula <[email protected]>Cc Sean Paul <[email protected]>Cc David Airlie <[email protected]>Cc Ben Skeggs <[email protected]>Cc Benjamin Gaignard <[email protected]>Cc Vincent Abriou <[email protected]>Cc Eric Anholt <[email protected]>--- drivers/gpu/drm/drm_atomic.c | 3 +- drivers/gpu/drm/drm_atomic_helper.c | 55 ----------------------------- drivers/gpu/drm/i915/intel_crt.c | 1 - drivers/gpu/drm/i915/intel_dp.c | 1 - drivers/gpu/drm/i915/intel_dp_mst.c | 1 - drivers/gpu/drm/i915/intel_dsi.c | 1 - drivers/gpu/drm/i915/intel_dvo.c | 1 - drivers/gpu/drm/i915/intel_hdmi.c | 1 - drivers/gpu/drm/i915/intel_lvds.c | 1 - drivers/gpu/drm/i915/intel_sdvo.c | 1 - drivers/gpu/drm/i915/intel_tv.c | 1 - drivers/gpu/drm/nouveau/nouveau_connector.c | 3 -- drivers/gpu/drm/nouveau/nv50_display.c | 1 - drivers/gpu/drm/sti/sti_hdmi.c | 1 - drivers/gpu/drm/vc4/vc4_vec.c | 1 - include/drm/drm_atomic.h | 3 -- include/drm/drm_atomic_helper.h | 3 -- 17 files changed, 1 insertion(+), 78 deletions(-)drivers/gpu/drm/drm_atomic.c +1
-2@@ -1144,7 +1144,7 @@ EXPORT_SYMBOL(drm_atomic_get_connector_state);* RETURNS: * Zero on success, error code on failure */ -int drm_atomic_connector_set_property (struct drm_connector *connector, +static int drm_atomic_connector_set_property (struct drm_connector *connector,struct drm_connector_state *state,struct drm_property *property,uint64_t val) {@@ -1211,7 +1211,6 @@ int drm_atomic_connector_set_property(struct drm_connector *connector,return 0 ; } -EXPORT_SYMBOL (drm_atomic_connector_set_property);static void drm_atomic_connector_print_state (struct drm_printer *p,const struct drm_connector_state *state)drivers/gpu/drm/drm_atomic_helper.c +0
-55@@ -2967,61 +2967,6 @@ int drm_atomic_helper_resume(struct drm_device *dev, }EXPORT_SYMBOL (drm_atomic_helper_resume); -/** -* drm_atomic_helper_connector_set_property - helper for connector properties -* @connector: DRM connector -* @property: DRM property -* @val: value of property -* -* Provides a default connector set_property handler using the atomic driver -* interface. -* -* RETURNS: -* Zero on success, error code on failure -*/ -int -drm_atomic_helper_connector_set_property (struct drm_connector *connector, -struct drm_property *property, -uint64_t val) -{ -struct drm_atomic_state *state; -struct drm_connector_state *connector_state; -int ret =0 ; - - state =drm_atomic_state_alloc (connector->dev); -if (!state) -return -ENOMEM ; - -/* ->set_property is always called with all locks held. */ - state->acquire_ctx = connector->dev->mode_config.acquire_ctx; -retry: - connector_state =drm_atomic_get_connector_state (state, connector); -if (IS_ERR (connector_state)) { - ret =PTR_ERR (connector_state); - goto fail; - } - - ret =drm_atomic_connector_set_property (connector, connector_state, - property, val); -if (ret) - goto fail; - - ret =drm_atomic_commit (state); -fail: -if (ret == -EDEADLK ) - goto backoff; - -drm_atomic_state_put (state); -return ret; - -backoff: -drm_atomic_state_clear (state); -drm_atomic_legacy_backoff (state); - - goto retry; -} -EXPORT_SYMBOL (drm_atomic_helper_connector_set_property); - static int page_flip_common(struct drm_atomic_state *state, struct drm_crtc *crtc, struct drm_framebuffer *fb,drivers/gpu/drm/i915/intel_crt.c +0
-1@@ -807,7 +807,6 @@ static const struct drm_connector_funcs intel_crt_connector_funcs = { .late_register = intel_connector_register, .early_unregister = intel_connector_unregister, .destroy = intel_crt_destroy, - .set_property = drm_atomic_helper_connector_set_property, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, };drivers/gpu/drm/i915/intel_dp.c +0
-1@@ -5010,7 +5010,6 @@ static const struct drm_connector_funcs intel_dp_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .force = intel_dp_force, .fill_modes = drm_helper_probe_single_connector_modes, - .set_property = drm_atomic_helper_connector_set_property, .atomic_get_property = intel_digital_connector_atomic_get_property, .atomic_set_property = intel_digital_connector_atomic_set_property, .late_register = intel_dp_connector_register,drivers/gpu/drm/i915/intel_dp_mst.c +0
-1@@ -349,7 +349,6 @@ static const struct drm_connector_funcs intel_dp_mst_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .detect = intel_dp_mst_detect, .fill_modes = drm_helper_probe_single_connector_modes, - .set_property = drm_atomic_helper_connector_set_property, .late_register = intel_connector_register, .early_unregister = intel_connector_unregister, .destroy = intel_dp_mst_connector_destroy,drivers/gpu/drm/i915/intel_dsi.c +0
-1@@ -1658,7 +1658,6 @@ static const struct drm_connector_funcs intel_dsi_connector_funcs = { .early_unregister = intel_connector_unregister, .destroy = intel_dsi_connector_destroy, .fill_modes = drm_helper_probe_single_connector_modes, - .set_property = drm_atomic_helper_connector_set_property, .atomic_get_property = intel_digital_connector_atomic_get_property, .atomic_set_property = intel_digital_connector_atomic_set_property, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state,drivers/gpu/drm/i915/intel_dvo.c +0
-1@@ -350,7 +350,6 @@ static const struct drm_connector_funcs intel_dvo_connector_funcs = { .early_unregister = intel_connector_unregister, .destroy = intel_dvo_destroy, .fill_modes = drm_helper_probe_single_connector_modes, - .set_property = drm_atomic_helper_connector_set_property, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, };drivers/gpu/drm/i915/intel_hdmi.c +0
-1@@ -1765,7 +1765,6 @@ static const struct drm_connector_funcs intel_hdmi_connector_funcs = { .detect = intel_hdmi_detect, .force = intel_hdmi_force, .fill_modes = drm_helper_probe_single_connector_modes, - .set_property = drm_atomic_helper_connector_set_property, .atomic_get_property = intel_digital_connector_atomic_get_property, .atomic_set_property = intel_digital_connector_atomic_set_property, .late_register = intel_connector_register,drivers/gpu/drm/i915/intel_lvds.c +0
-1@@ -598,7 +598,6 @@ static const struct drm_connector_funcs intel_lvds_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .detect = intel_lvds_detect, .fill_modes = drm_helper_probe_single_connector_modes, - .set_property = drm_atomic_helper_connector_set_property, .atomic_get_property = intel_digital_connector_atomic_get_property, .atomic_set_property = intel_digital_connector_atomic_set_property, .late_register = intel_connector_register,drivers/gpu/drm/i915/intel_sdvo.c +0
-1@@ -2196,7 +2196,6 @@ static const struct drm_connector_funcs intel_sdvo_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .detect = intel_sdvo_detect, .fill_modes = drm_helper_probe_single_connector_modes, - .set_property = drm_atomic_helper_connector_set_property, .atomic_get_property = intel_sdvo_connector_atomic_get_property, .atomic_set_property = intel_sdvo_connector_atomic_set_property, .late_register = intel_sdvo_connector_register,drivers/gpu/drm/i915/intel_tv.c +0
-1@@ -1411,7 +1411,6 @@ static const struct drm_connector_funcs intel_tv_connector_funcs = { .late_register = intel_connector_register, .early_unregister = intel_connector_unregister, .destroy = intel_tv_destroy, - .set_property = drm_atomic_helper_connector_set_property, .fill_modes = drm_helper_probe_single_connector_modes, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,drivers/gpu/drm/nouveau/nouveau_connector.c +0
-3@@ -770,9 +770,6 @@ nouveau_connector_set_property(struct drm_connector *connector,struct drm_encoder *encoder =to_drm_encoder (nv_encoder);int ret; -if (drm_drv_uses_atomic_modeset (connector->dev)) -return drm_atomic_helper_connector_set_property (connector, property, value); - ret = connector->funcs->atomic_set_property (&nv_connector->base, &asyc->state, property, value);drivers/gpu/drm/nouveau/nv50_display.c +0
-1@@ -3122,7 +3122,6 @@ nv50_mstc = { .reset = nouveau_conn_reset, .detect = nv50_mstc_detect, .fill_modes = drm_helper_probe_single_connector_modes, - .set_property = drm_atomic_helper_connector_set_property, .destroy = nv50_mstc_destroy, .atomic_duplicate_state = nouveau_conn_atomic_duplicate_state, .atomic_destroy_state = nouveau_conn_atomic_destroy_state,drivers/gpu/drm/sti/sti_hdmi.c +0
-1@@ -1118,7 +1118,6 @@ static const struct drm_connector_funcs sti_hdmi_connector_funcs = { .detect = sti_hdmi_connector_detect, .destroy = drm_connector_cleanup, .reset = drm_atomic_helper_connector_reset, - .set_property = drm_atomic_helper_connector_set_property, .atomic_set_property = sti_hdmi_connector_set_property, .atomic_get_property = sti_hdmi_connector_get_property, .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,drivers/gpu/drm/vc4/vc4_vec.c +0
-1@@ -369,7 +369,6 @@ static const struct drm_connector_funcs vc4_vec_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .detect = vc4_vec_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, - .set_property = drm_atomic_helper_connector_set_property, .destroy = vc4_vec_connector_destroy, .reset = drm_atomic_helper_connector_reset, .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,include/drm/drm_atomic.h +0
-3@@ -318,9 +318,6 @@ drm_atomic_get_plane_state(struct drm_atomic_state *state,struct drm_connector_state *__must_check drm_atomic_get_connector_state (struct drm_atomic_state *state,struct drm_connector *connector); -int drm_atomic_connector_set_property (struct drm_connector *connector, -struct drm_connector_state *state,struct drm_property *property, -uint64_t val); void drm_atomic_private_obj_init(struct drm_private_obj *obj, struct drm_private_state *state,include/drm/drm_atomic_helper.h +0
-0
include/drm/drm_atomic_helper.h int drm_atomic_helper_commit_duplicated_state(struct drm_atomic_state *state, · line 129
Quoted 9 lines
include/drm/drm_atomic_helper.h +0
-3@@ -124,9 +124,6 @@ int drm_atomic_helper_commit_duplicated_state(struct drm_atomic_state *state,int drm_atomic_helper_resume (struct drm_device *dev,struct drm_atomic_state *state); -int drm_atomic_helper_connector_set_property (struct drm_connector *connector, -struct drm_property *property, -uint64_t val); int drm_atomic_helper_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, struct drm_pending_vblank_event *event,
_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
Re: [PATCH 6/8] drm: Nuke drm_atomic_helper_connector_set_property
Quoted 8 lines · Maarten Lankhorst
Op 25-07-17 om 10:01 schreef Daniel Vetter:
Quoted 7 lines
It's dead code, the core handles all this directly now. This also allows us to unexport
drm_atomic_helper_connector_set_property.The only special case is nouveau which used one function for both pre-nv50 legacy modeset code and post-nv50 atomic world instead of 2 vtables. But amounts to exactly the same.
Quoted 7 lines
Quoted 3 lines
What is rather strange here is how few drivers set this up, I suspect the earlier patch to handle properties in the core did end up fixing a pile of possible issues.
Legacy drivers didn't always hook it up either, probably why. :) No use hooking it up in legacy world if you didn't expose a property.
But yeah, good to fix this.
With atomic, everyone has properties ...
-Daniel
Quoted 306 lines
Quoted 304 lines
Signed-off-by Daniel Vetter <[email protected]>Cc Daniel Vetter <[email protected]>Cc Jani Nikula <[email protected]>Cc Sean Paul <[email protected]>Cc David Airlie <[email protected]>Cc Ben Skeggs <[email protected]>Cc Benjamin Gaignard <[email protected]>Cc Vincent Abriou <[email protected]>Cc Eric Anholt <[email protected]>--- drivers/gpu/drm/drm_atomic.c | 3 +- drivers/gpu/drm/drm_atomic_helper.c | 55 ----------------------------- drivers/gpu/drm/i915/intel_crt.c | 1 - drivers/gpu/drm/i915/intel_dp.c | 1 - drivers/gpu/drm/i915/intel_dp_mst.c | 1 - drivers/gpu/drm/i915/intel_dsi.c | 1 - drivers/gpu/drm/i915/intel_dvo.c | 1 - drivers/gpu/drm/i915/intel_hdmi.c | 1 - drivers/gpu/drm/i915/intel_lvds.c | 1 - drivers/gpu/drm/i915/intel_sdvo.c | 1 - drivers/gpu/drm/i915/intel_tv.c | 1 - drivers/gpu/drm/nouveau/nouveau_connector.c | 3 -- drivers/gpu/drm/nouveau/nv50_display.c | 1 - drivers/gpu/drm/sti/sti_hdmi.c | 1 - drivers/gpu/drm/vc4/vc4_vec.c | 1 - include/drm/drm_atomic.h | 3 -- include/drm/drm_atomic_helper.h | 3 -- 17 files changed, 1 insertion(+), 78 deletions(-)drivers/gpu/drm/drm_atomic.c +1
-2@@ -1144,7 +1144,7 @@ EXPORT_SYMBOL(drm_atomic_get_connector_state);* RETURNS: * Zero on success, error code on failure */ -int drm_atomic_connector_set_property (struct drm_connector *connector, +static int drm_atomic_connector_set_property (struct drm_connector *connector,struct drm_connector_state *state,struct drm_property *property,uint64_t val) {@@ -1211,7 +1211,6 @@ int drm_atomic_connector_set_property(struct drm_connector *connector,return 0 ; } -EXPORT_SYMBOL (drm_atomic_connector_set_property);static void drm_atomic_connector_print_state (struct drm_printer *p,const struct drm_connector_state *state)drivers/gpu/drm/drm_atomic_helper.c +0
-55@@ -2967,61 +2967,6 @@ int drm_atomic_helper_resume(struct drm_device *dev, }EXPORT_SYMBOL (drm_atomic_helper_resume); -/** -* drm_atomic_helper_connector_set_property - helper for connector properties -* @connector: DRM connector -* @property: DRM property -* @val: value of property -* -* Provides a default connector set_property handler using the atomic driver -* interface. -* -* RETURNS: -* Zero on success, error code on failure -*/ -int -drm_atomic_helper_connector_set_property (struct drm_connector *connector, -struct drm_property *property, -uint64_t val) -{ -struct drm_atomic_state *state; -struct drm_connector_state *connector_state; -int ret =0 ; - - state =drm_atomic_state_alloc (connector->dev); -if (!state) -return -ENOMEM ; - -/* ->set_property is always called with all locks held. */ - state->acquire_ctx = connector->dev->mode_config.acquire_ctx; -retry: - connector_state =drm_atomic_get_connector_state (state, connector); -if (IS_ERR (connector_state)) { - ret =PTR_ERR (connector_state); - goto fail; - } - - ret =drm_atomic_connector_set_property (connector, connector_state, - property, val); -if (ret) - goto fail; - - ret =drm_atomic_commit (state); -fail: -if (ret == -EDEADLK ) - goto backoff; - -drm_atomic_state_put (state); -return ret; - -backoff: -drm_atomic_state_clear (state); -drm_atomic_legacy_backoff (state); - - goto retry; -} -EXPORT_SYMBOL (drm_atomic_helper_connector_set_property); - static int page_flip_common(struct drm_atomic_state *state, struct drm_crtc *crtc, struct drm_framebuffer *fb,drivers/gpu/drm/i915/intel_crt.c +0
-1@@ -807,7 +807,6 @@ static const struct drm_connector_funcs intel_crt_connector_funcs = { .late_register = intel_connector_register, .early_unregister = intel_connector_unregister, .destroy = intel_crt_destroy, - .set_property = drm_atomic_helper_connector_set_property, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, };drivers/gpu/drm/i915/intel_dp.c +0
-1@@ -5010,7 +5010,6 @@ static const struct drm_connector_funcs intel_dp_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .force = intel_dp_force, .fill_modes = drm_helper_probe_single_connector_modes, - .set_property = drm_atomic_helper_connector_set_property, .atomic_get_property = intel_digital_connector_atomic_get_property, .atomic_set_property = intel_digital_connector_atomic_set_property, .late_register = intel_dp_connector_register,drivers/gpu/drm/i915/intel_dp_mst.c +0
-1@@ -349,7 +349,6 @@ static const struct drm_connector_funcs intel_dp_mst_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .detect = intel_dp_mst_detect, .fill_modes = drm_helper_probe_single_connector_modes, - .set_property = drm_atomic_helper_connector_set_property, .late_register = intel_connector_register, .early_unregister = intel_connector_unregister, .destroy = intel_dp_mst_connector_destroy,drivers/gpu/drm/i915/intel_dsi.c +0
-1@@ -1658,7 +1658,6 @@ static const struct drm_connector_funcs intel_dsi_connector_funcs = { .early_unregister = intel_connector_unregister, .destroy = intel_dsi_connector_destroy, .fill_modes = drm_helper_probe_single_connector_modes, - .set_property = drm_atomic_helper_connector_set_property, .atomic_get_property = intel_digital_connector_atomic_get_property, .atomic_set_property = intel_digital_connector_atomic_set_property, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state,drivers/gpu/drm/i915/intel_dvo.c +0
-1@@ -350,7 +350,6 @@ static const struct drm_connector_funcs intel_dvo_connector_funcs = { .early_unregister = intel_connector_unregister, .destroy = intel_dvo_destroy, .fill_modes = drm_helper_probe_single_connector_modes, - .set_property = drm_atomic_helper_connector_set_property, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, };drivers/gpu/drm/i915/intel_hdmi.c +0
-1@@ -1765,7 +1765,6 @@ static const struct drm_connector_funcs intel_hdmi_connector_funcs = { .detect = intel_hdmi_detect, .force = intel_hdmi_force, .fill_modes = drm_helper_probe_single_connector_modes, - .set_property = drm_atomic_helper_connector_set_property, .atomic_get_property = intel_digital_connector_atomic_get_property, .atomic_set_property = intel_digital_connector_atomic_set_property, .late_register = intel_connector_register,drivers/gpu/drm/i915/intel_lvds.c +0
-1@@ -598,7 +598,6 @@ static const struct drm_connector_funcs intel_lvds_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .detect = intel_lvds_detect, .fill_modes = drm_helper_probe_single_connector_modes, - .set_property = drm_atomic_helper_connector_set_property, .atomic_get_property = intel_digital_connector_atomic_get_property, .atomic_set_property = intel_digital_connector_atomic_set_property, .late_register = intel_connector_register,drivers/gpu/drm/i915/intel_sdvo.c +0
-1@@ -2196,7 +2196,6 @@ static const struct drm_connector_funcs intel_sdvo_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .detect = intel_sdvo_detect, .fill_modes = drm_helper_probe_single_connector_modes, - .set_property = drm_atomic_helper_connector_set_property, .atomic_get_property = intel_sdvo_connector_atomic_get_property, .atomic_set_property = intel_sdvo_connector_atomic_set_property, .late_register = intel_sdvo_connector_register,drivers/gpu/drm/i915/intel_tv.c +0
-1@@ -1411,7 +1411,6 @@ static const struct drm_connector_funcs intel_tv_connector_funcs = { .late_register = intel_connector_register, .early_unregister = intel_connector_unregister, .destroy = intel_tv_destroy, - .set_property = drm_atomic_helper_connector_set_property, .fill_modes = drm_helper_probe_single_connector_modes, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,drivers/gpu/drm/nouveau/nouveau_connector.c +0
-3@@ -770,9 +770,6 @@ nouveau_connector_set_property(struct drm_connector *connector,struct drm_encoder *encoder =to_drm_encoder (nv_encoder);int ret; -if (drm_drv_uses_atomic_modeset (connector->dev)) -return drm_atomic_helper_connector_set_property (connector, property, value); - ret = connector->funcs->atomic_set_property (&nv_connector->base, &asyc->state, property, value);drivers/gpu/drm/nouveau/nv50_display.c +0
-1@@ -3122,7 +3122,6 @@ nv50_mstc = { .reset = nouveau_conn_reset, .detect = nv50_mstc_detect, .fill_modes = drm_helper_probe_single_connector_modes, - .set_property = drm_atomic_helper_connector_set_property, .destroy = nv50_mstc_destroy, .atomic_duplicate_state = nouveau_conn_atomic_duplicate_state, .atomic_destroy_state = nouveau_conn_atomic_destroy_state,drivers/gpu/drm/sti/sti_hdmi.c +0
-1@@ -1118,7 +1118,6 @@ static const struct drm_connector_funcs sti_hdmi_connector_funcs = { .detect = sti_hdmi_connector_detect, .destroy = drm_connector_cleanup, .reset = drm_atomic_helper_connector_reset, - .set_property = drm_atomic_helper_connector_set_property, .atomic_set_property = sti_hdmi_connector_set_property, .atomic_get_property = sti_hdmi_connector_get_property, .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,drivers/gpu/drm/vc4/vc4_vec.c +0
-1@@ -369,7 +369,6 @@ static const struct drm_connector_funcs vc4_vec_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .detect = vc4_vec_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, - .set_property = drm_atomic_helper_connector_set_property, .destroy = vc4_vec_connector_destroy, .reset = drm_atomic_helper_connector_reset, .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,include/drm/drm_atomic.h +0
-3@@ -318,9 +318,6 @@ drm_atomic_get_plane_state(struct drm_atomic_state *state,struct drm_connector_state *__must_check drm_atomic_get_connector_state (struct drm_atomic_state *state,struct drm_connector *connector); -int drm_atomic_connector_set_property (struct drm_connector *connector, -struct drm_connector_state *state,struct drm_property *property, -uint64_t val); void drm_atomic_private_obj_init(struct drm_private_obj *obj, struct drm_private_state *state,include/drm/drm_atomic_helper.h +0
-3@@ -124,9 +124,6 @@ int drm_atomic_helper_commit_duplicated_state(struct drm_atomic_state *state,int drm_atomic_helper_resume (struct drm_device *dev,struct drm_atomic_state *state); -int drm_atomic_helper_connector_set_property (struct drm_connector *connector, -struct drm_property *property, -uint64_t val); int drm_atomic_helper_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, struct drm_pending_vblank_event *event,
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 6/8] drm: Nuke drm_atomic_helper_connector_set_property
In reply to Daniel VetterQuoted 12 lines · Daniel Vetter
It's dead code, the core handles all this directly now. This also allows us to unexport
drm_atomic_helper_connector_set_property.The only special case is nouveau which used one function for both pre-nv50 legacy modeset code and post-nv50 atomic world instead of 2 vtables. But amounts to exactly the same.
What is rather strange here is how few drivers set this up, I suspect the earlier patch to handle properties in the core did end up fixing a pile of possible issues.
Signed-off-by Daniel Vetter <[email protected]>
[...]
Quoted 1 line
drivers/gpu/drm/sti/sti_hdmi.c | 1 -
BR
Vincent
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 7/8 drm: Nuke drm_atomic_helper_connector_dpms
In reply to Daniel VetterIt's dead code, the core handles all this directly now.
The only special case is nouveau and tda988x which used one function for both legacy modeset code and -nv50 atomic world instead of 2 vtables. But amounts to exactly the same.
v2: Rebase over the panel/brideg refactorings in stm/ltdc.
--- drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 1 - drivers/gpu/drm/bridge/analogix-anx78xx.c | 1 - drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 1 - drivers/gpu/drm/bridge/dumb-vga-dac.c | 1 - .../drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c | 1 - drivers/gpu/drm/bridge/nxp-ptn3460.c | 1 - drivers/gpu/drm/bridge/panel.c | 1 - drivers/gpu/drm/bridge/parade-ps8622.c | 1 - drivers/gpu/drm/bridge/sii902x.c | 1 - drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 1 - drivers/gpu/drm/bridge/tc358767.c | 1 - drivers/gpu/drm/bridge/ti-tfp410.c | 1 - drivers/gpu/drm/drm_atomic_helper.c | 79 ---------------------- drivers/gpu/drm/exynos/exynos_drm_dpi.c | 1 - drivers/gpu/drm/exynos/exynos_drm_dsi.c | 1 - drivers/gpu/drm/exynos/exynos_drm_vidi.c | 1 - drivers/gpu/drm/exynos/exynos_hdmi.c | 1 - drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c | 1 - drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 1 - drivers/gpu/drm/i2c/tda998x_drv.c | 10 +-- drivers/gpu/drm/i915/intel_crt.c | 1 - drivers/gpu/drm/i915/intel_dp.c | 1 - drivers/gpu/drm/i915/intel_dp_mst.c | 1 - drivers/gpu/drm/i915/intel_dsi.c | 1 - drivers/gpu/drm/i915/intel_dvo.c | 1 - drivers/gpu/drm/i915/intel_hdmi.c | 1 - drivers/gpu/drm/i915/intel_lvds.c | 1 - drivers/gpu/drm/i915/intel_sdvo.c | 1 - drivers/gpu/drm/i915/intel_tv.c | 1 - drivers/gpu/drm/imx/imx-ldb.c | 1 - drivers/gpu/drm/imx/imx-tve.c | 1 - drivers/gpu/drm/imx/parallel-display.c | 1 - drivers/gpu/drm/mediatek/mtk_dsi.c | 1 - drivers/gpu/drm/mediatek/mtk_hdmi.c | 1 - drivers/gpu/drm/meson/meson_venc_cvbs.c | 1 - drivers/gpu/drm/msm/dsi/dsi_manager.c | 1 - drivers/gpu/drm/msm/edp/edp_connector.c | 1 - drivers/gpu/drm/msm/hdmi/hdmi_connector.c | 1 - drivers/gpu/drm/msm/mdp/mdp4/mdp4_lvds_connector.c | 1 - drivers/gpu/drm/mxsfb/mxsfb_out.c | 1 - drivers/gpu/drm/nouveau/nouveau_connector.c | 12 +--- drivers/gpu/drm/nouveau/nv50_display.c | 1 - drivers/gpu/drm/omapdrm/omap_connector.c | 1 - drivers/gpu/drm/pl111/pl111_connector.c | 1 - drivers/gpu/drm/rcar-du/rcar_du_lvdscon.c | 1 - drivers/gpu/drm/rockchip/cdn-dp-core.c | 1 - drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 1 - drivers/gpu/drm/rockchip/inno_hdmi.c | 1 - drivers/gpu/drm/sti/sti_dvo.c | 1 - drivers/gpu/drm/sti/sti_hda.c | 1 - drivers/gpu/drm/sti/sti_hdmi.c | 1 - drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 1 - drivers/gpu/drm/sun4i/sun4i_rgb.c | 1 - drivers/gpu/drm/sun4i/sun4i_tv.c | 1 - drivers/gpu/drm/tegra/dsi.c | 1 - drivers/gpu/drm/tegra/hdmi.c | 1 - drivers/gpu/drm/tegra/rgb.c | 1 - drivers/gpu/drm/tegra/sor.c | 1 - drivers/gpu/drm/tilcdc/tilcdc_panel.c | 1 - drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 1 - drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c | 1 - drivers/gpu/drm/vc4/vc4_hdmi.c | 1 - drivers/gpu/drm/vc4/vc4_vec.c | 1 - drivers/gpu/drm/virtio/virtgpu_display.c | 1 - drivers/gpu/drm/zte/zx_hdmi.c | 1 - drivers/gpu/drm/zte/zx_tvenc.c | 1 - drivers/gpu/drm/zte/zx_vga.c | 1 - include/drm/drm_atomic_helper.h | 2 - 68 files changed, 3 insertions(+), 164 deletions(-)
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c +0 -1
@@ -786,7 +786,6 @@ adv7511_connector_detect(struct drm_connector *connector, bool force) }static struct drm_connector_funcs adv7511_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = adv7511_connector_detect, .destroy = drm_connector_cleanup,
drivers/gpu/drm/bridge/analogix-anx78xx.c +0 -1
@@ -1002,7 +1002,6 @@ static enum drm_connector_status anx78xx_detect(struct drm_connector *connector, }static const struct drm_connector_funcs anx78xx_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = anx78xx_detect, .destroy = drm_connector_cleanup,
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +0 -1
@@ -1005,7 +1005,6 @@ analogix_dp_detect(struct drm_connector *connector, bool force) }static const struct drm_connector_funcs analogix_dp_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = analogix_dp_detect, .destroy = drm_connector_cleanup,
drivers/gpu/drm/bridge/dumb-vga-dac.c +0 -1
@@ -92,7 +92,6 @@ dumb_vga_connector_detect(struct drm_connector *connector, bool force) }static const struct drm_connector_funcs dumb_vga_con_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = dumb_vga_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = drm_connector_cleanup,
drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c +0 -1
@@ -193,7 +193,6 @@ static enum drm_connector_status ge_b850v3_lvds_detect( }static const struct drm_connector_funcs ge_b850v3_lvds_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = ge_b850v3_lvds_detect, .destroy = drm_connector_cleanup,
drivers/gpu/drm/bridge/nxp-ptn3460.c +0 -1
@@ -238,7 +238,6 @@ static const struct drm_connector_helper_funcs ptn3460_connector_helper_funcs = };static const struct drm_connector_funcs ptn3460_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = drm_connector_cleanup, .reset = drm_atomic_helper_connector_reset,
drivers/gpu/drm/bridge/panel.c +0 -1
@@ -50,7 +50,6 @@ panel_bridge_connector_helper_funcs = { };static const struct drm_connector_funcs panel_bridge_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .reset = drm_atomic_helper_connector_reset, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = drm_connector_cleanup,
drivers/gpu/drm/bridge/parade-ps8622.c +0 -1
@@ -476,7 +476,6 @@ static const struct drm_connector_helper_funcs ps8622_connector_helper_funcs = { };static const struct drm_connector_funcs ps8622_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = drm_connector_cleanup, .reset = drm_atomic_helper_connector_reset,
drivers/gpu/drm/bridge/sii902x.c +0 -1
@@ -124,7 +124,6 @@ sii902x_connector_detect(struct drm_connector *connector, bool force) }static const struct drm_connector_funcs sii902x_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = sii902x_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = drm_connector_cleanup,
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +0 -1
@@ -1920,7 +1920,6 @@ static void dw_hdmi_connector_force(struct drm_connector *connector) }static const struct drm_connector_funcs dw_hdmi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = dw_hdmi_connector_detect, .destroy = drm_connector_cleanup,
drivers/gpu/drm/bridge/tc358767.c +0 -1
@@ -1160,7 +1160,6 @@ static const struct drm_connector_helper_funcs tc_connector_helper_funcs = { };static const struct drm_connector_funcs tc_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = drm_connector_cleanup, .reset = drm_atomic_helper_connector_reset,
drivers/gpu/drm/bridge/ti-tfp410.c +0 -1
@@ -102,7 +102,6 @@ tfp410_connector_detect(struct drm_connector *connector, bool force) }static const struct drm_connector_funcs tfp410_con_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = tfp410_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = drm_connector_cleanup,
drivers/gpu/drm/drm_atomic_helper.c +0 -79
85 lines not on this page · raw message
drivers/gpu/drm/exynos/exynos_drm_dpi.c +0 -1
@@ -59,7 +59,6 @@ static void exynos_dpi_connector_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs exynos_dpi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = exynos_dpi_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = exynos_dpi_connector_destroy,
drivers/gpu/drm/exynos/exynos_drm_dsi.c +0 -1
@@ -1537,7 +1537,6 @@ static void exynos_dsi_connector_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs exynos_dsi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = exynos_dsi_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = exynos_dsi_connector_destroy,
drivers/gpu/drm/exynos/exynos_drm_vidi.c +0 -1
@@ -289,7 +289,6 @@ static void vidi_connector_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs vidi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = vidi_detect, .destroy = vidi_connector_destroy,
drivers/gpu/drm/exynos/exynos_hdmi.c +0 -1
@@ -835,7 +835,6 @@ static void hdmi_connector_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs hdmi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = hdmi_detect, .destroy = hdmi_connector_destroy,
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c +0 -1
@@ -63,7 +63,6 @@ static const struct drm_connector_funcs fsl_dcu_drm_connector_funcs = { .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, .destroy = fsl_dcu_drm_connector_destroy, - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .reset = drm_atomic_helper_connector_reset, };
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c +0 -1
@@ -47,7 +47,6 @@ static const struct drm_connector_helper_funcs };static const struct drm_connector_funcs hibmc_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = drm_connector_cleanup, .reset = drm_atomic_helper_connector_reset,
drivers/gpu/drm/i2c/tda998x_drv.c +1 -9
@@ -969,14 +969,6 @@ static int tda998x_audio_codec_init(struct tda998x_priv *priv,/* DRM connector functions */ -static int tda998x_connector_dpms (struct drm_connector *connector,int mode) -{ -if (drm_core_check_feature (connector->dev,DRIVER_ATOMIC )) -return drm_atomic_helper_connector_dpms (connector, mode); -else -return drm_helper_connector_dpms (connector, mode); -} -static int tda998x_connector_fill_modes (struct drm_connector *connector,uint32_t maxX,uint32_t maxY) {
@@ -1014,7 +1006,7 @@ static void tda998x_connector_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs tda998x_connector_funcs = { - .dpms = tda998x_connector_dpms, + .dpms = drm_helper_connector_dpms, .reset = drm_atomic_helper_connector_reset, .fill_modes = tda998x_connector_fill_modes, .detect = tda998x_connector_detect,
drivers/gpu/drm/i915/intel_crt.c +0 -1
@@ -802,7 +802,6 @@ void intel_crt_reset(struct drm_encoder *encoder)*/ static const struct drm_connector_funcs intel_crt_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .late_register = intel_connector_register, .early_unregister = intel_connector_unregister,
drivers/gpu/drm/i915/intel_dp.c +0 -1
@@ -5007,7 +5007,6 @@ void intel_dp_encoder_reset(struct drm_encoder *encoder) }static const struct drm_connector_funcs intel_dp_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .force = intel_dp_force, .fill_modes = drm_helper_probe_single_connector_modes, .atomic_get_property = intel_digital_connector_atomic_get_property,
drivers/gpu/drm/i915/intel_dp_mst.c +0 -1
@@ -346,7 +346,6 @@ intel_dp_mst_connector_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs intel_dp_mst_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = intel_dp_mst_detect, .fill_modes = drm_helper_probe_single_connector_modes, .late_register = intel_connector_register,
drivers/gpu/drm/i915/intel_dsi.c +0 -1
@@ -1653,7 +1653,6 @@ static const struct drm_connector_helper_funcs intel_dsi_connector_helper_funcs };static const struct drm_connector_funcs intel_dsi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .late_register = intel_connector_register, .early_unregister = intel_connector_unregister, .destroy = intel_dsi_connector_destroy,
drivers/gpu/drm/i915/intel_dvo.c +0 -1
@@ -344,7 +344,6 @@ static void intel_dvo_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs intel_dvo_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = intel_dvo_detect, .late_register = intel_connector_register, .early_unregister = intel_connector_unregister,
drivers/gpu/drm/i915/intel_hdmi.c +0 -1
@@ -1761,7 +1761,6 @@ static void intel_hdmi_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs intel_hdmi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = intel_hdmi_detect, .force = intel_hdmi_force, .fill_modes = drm_helper_probe_single_connector_modes,
drivers/gpu/drm/i915/intel_lvds.c +0 -1
@@ -595,7 +595,6 @@ static const struct drm_connector_helper_funcs intel_lvds_connector_helper_funcs };static const struct drm_connector_funcs intel_lvds_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = intel_lvds_detect, .fill_modes = drm_helper_probe_single_connector_modes, .atomic_get_property = intel_digital_connector_atomic_get_property,
drivers/gpu/drm/i915/intel_sdvo.c +0 -1
@@ -2193,7 +2193,6 @@ intel_sdvo_connector_duplicate_state(struct drm_connector *connector) }static const struct drm_connector_funcs intel_sdvo_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = intel_sdvo_detect, .fill_modes = drm_helper_probe_single_connector_modes, .atomic_get_property = intel_sdvo_connector_atomic_get_property,
drivers/gpu/drm/i915/intel_tv.c +0 -1
@@ -1407,7 +1407,6 @@ intel_tv_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs intel_tv_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .late_register = intel_connector_register, .early_unregister = intel_connector_unregister, .destroy = intel_tv_destroy,
drivers/gpu/drm/imx/imx-ldb.c +0 -1
@@ -389,7 +389,6 @@ static int imx_ldb_encoder_atomic_check(struct drm_encoder *encoder,static const struct drm_connector_funcs imx_ldb_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = imx_drm_connector_destroy, .reset = drm_atomic_helper_connector_reset,
drivers/gpu/drm/imx/imx-tve.c +0 -1
@@ -341,7 +341,6 @@ static int imx_tve_atomic_check(struct drm_encoder *encoder, }static const struct drm_connector_funcs imx_tve_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = imx_drm_connector_destroy, .reset = drm_atomic_helper_connector_reset,
drivers/gpu/drm/imx/parallel-display.c +0 -1
@@ -135,7 +135,6 @@ static int imx_pd_encoder_atomic_check(struct drm_encoder *encoder, }static const struct drm_connector_funcs imx_pd_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = imx_drm_connector_destroy, .reset = drm_atomic_helper_connector_reset,
drivers/gpu/drm/mediatek/mtk_dsi.c +0 -1
@@ -766,7 +766,6 @@ static const struct drm_encoder_helper_funcs mtk_dsi_encoder_helper_funcs = { };static const struct drm_connector_funcs mtk_dsi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = drm_connector_cleanup, .reset = drm_atomic_helper_connector_reset,
drivers/gpu/drm/mediatek/mtk_hdmi.c +0 -1
@@ -1261,7 +1261,6 @@ static struct drm_encoder *mtk_hdmi_conn_best_enc(struct drm_connector *conn) }static const struct drm_connector_funcs mtk_hdmi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = hdmi_conn_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = hdmi_conn_destroy,
drivers/gpu/drm/meson/meson_venc_cvbs.c +0 -1
@@ -118,7 +118,6 @@ static int meson_cvbs_connector_mode_valid(struct drm_connector *connector, }static const struct drm_connector_funcs meson_cvbs_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = meson_cvbs_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = meson_cvbs_connector_destroy,
drivers/gpu/drm/msm/dsi/dsi_manager.c +0 -1
@@ -626,7 +626,6 @@ static void dsi_mgr_bridge_mode_set(struct drm_bridge *bridge, }static const struct drm_connector_funcs dsi_mgr_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = dsi_mgr_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = dsi_mgr_connector_destroy,
drivers/gpu/drm/msm/edp/edp_connector.c +0 -1
@@ -92,7 +92,6 @@ static int edp_connector_mode_valid(struct drm_connector *connector, }static const struct drm_connector_funcs edp_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = edp_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = edp_connector_destroy,
drivers/gpu/drm/msm/hdmi/hdmi_connector.c +0 -1
@@ -407,7 +407,6 @@ static int msm_hdmi_connector_mode_valid(struct drm_connector *connector, }static const struct drm_connector_funcs hdmi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = hdmi_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = hdmi_connector_destroy,
drivers/gpu/drm/msm/mdp/mdp4/mdp4_lvds_connector.c +0 -1
@@ -91,7 +91,6 @@ static int mdp4_lvds_connector_mode_valid(struct drm_connector *connector, }static const struct drm_connector_funcs mdp4_lvds_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = mdp4_lvds_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = mdp4_lvds_connector_destroy,
drivers/gpu/drm/mxsfb/mxsfb_out.c +0 -1
@@ -74,7 +74,6 @@ static void mxsfb_panel_connector_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs mxsfb_panel_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = mxsfb_panel_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = mxsfb_panel_connector_destroy,
drivers/gpu/drm/nouveau/nouveau_connector.c +2 -10
@@ -1072,17 +1072,9 @@ nouveau_connector_helper_funcs = { .best_encoder = nouveau_connector_best_encoder, }; -static int -nouveau_connector_dpms (struct drm_connector *connector,int mode) -{ -if (drm_drv_uses_atomic_modeset (connector->dev)) -return drm_atomic_helper_connector_dpms (connector, mode); -return drm_helper_connector_dpms (connector, mode); -} -static const struct drm_connector_funcs nouveau_connector_funcs = { - .dpms = nouveau_connector_dpms, + .dpms = drm_helper_connector_dpms, .reset = nouveau_conn_reset, .detect = nouveau_connector_detect, .force = nouveau_connector_force,
@@ -1097,7 +1089,7 @@ nouveau_connector_funcs = {static const struct drm_connector_funcs nouveau_connector_funcs_lvds = { - .dpms = nouveau_connector_dpms, + .dpms = drm_helper_connector_dpms, .reset = nouveau_conn_reset, .detect = nouveau_connector_detect_lvds, .force = nouveau_connector_force,
drivers/gpu/drm/nouveau/nv50_display.c +0 -1
@@ -3118,7 +3118,6 @@ nv50_mstc_destroy(struct drm_connector *connector)static const struct drm_connector_funcs nv50_mstc = { - .dpms = drm_atomic_helper_connector_dpms, .reset = nouveau_conn_reset, .detect = nv50_mstc_detect, .fill_modes = drm_helper_probe_single_connector_modes,
drivers/gpu/drm/omapdrm/omap_connector.c +0 -1
@@ -195,7 +195,6 @@ static int omap_connector_mode_valid(struct drm_connector *connector, }static const struct drm_connector_funcs omap_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .reset = drm_atomic_helper_connector_reset, .detect = omap_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes,
drivers/gpu/drm/pl111/pl111_connector.c +0 -1
@@ -69,7 +69,6 @@ const struct drm_connector_funcs connector_funcs = { .fill_modes = drm_helper_probe_single_connector_modes, .destroy = pl111_connector_destroy, .detect = pl111_connector_detect, - .dpms = drm_atomic_helper_connector_dpms, .reset = drm_atomic_helper_connector_reset, .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
drivers/gpu/drm/rcar-du/rcar_du_lvdscon.c +0 -1
@@ -46,7 +46,6 @@ static void rcar_du_lvds_connector_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .reset = drm_atomic_helper_connector_reset, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = rcar_du_lvds_connector_destroy,
drivers/gpu/drm/rockchip/cdn-dp-core.c +0 -1
@@ -254,7 +254,6 @@ static void cdn_dp_connector_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs cdn_dp_atomic_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = cdn_dp_connector_detect, .destroy = cdn_dp_connector_destroy, .fill_modes = drm_helper_probe_single_connector_modes,
drivers/gpu/drm/rockchip/dw-mipi-dsi.c +0 -1
@@ -1080,7 +1080,6 @@ static void dw_mipi_dsi_drm_connector_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs dw_mipi_dsi_atomic_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = dw_mipi_dsi_drm_connector_destroy, .reset = drm_atomic_helper_connector_reset,
drivers/gpu/drm/rockchip/inno_hdmi.c +0 -1
@@ -593,7 +593,6 @@ static void inno_hdmi_connector_destroy(struct drm_connector *connector) }static struct drm_connector_funcs inno_hdmi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = inno_hdmi_probe_single_connector_modes, .detect = inno_hdmi_connector_detect, .destroy = inno_hdmi_connector_destroy,
drivers/gpu/drm/sti/sti_dvo.c +0 -1
@@ -412,7 +412,6 @@ static int sti_dvo_late_register(struct drm_connector *connector) }static const struct drm_connector_funcs sti_dvo_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = sti_dvo_connector_detect, .destroy = drm_connector_cleanup,
drivers/gpu/drm/sti/sti_hda.c +0 -1
@@ -647,7 +647,6 @@ static int sti_hda_late_register(struct drm_connector *connector) }static const struct drm_connector_funcs sti_hda_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = drm_connector_cleanup, .reset = drm_atomic_helper_connector_reset,
drivers/gpu/drm/sti/sti_hdmi.c +0 -1
@@ -1113,7 +1113,6 @@ static int sti_hdmi_late_register(struct drm_connector *connector) }static const struct drm_connector_funcs sti_hdmi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = sti_hdmi_connector_detect, .destroy = drm_connector_cleanup,
drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c +0 -1
@@ -306,7 +306,6 @@ sun4i_hdmi_connector_detect(struct drm_connector *connector, bool force) }static const struct drm_connector_funcs sun4i_hdmi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = sun4i_hdmi_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = drm_connector_cleanup,
drivers/gpu/drm/sun4i/sun4i_rgb.c +0 -1
@@ -120,7 +120,6 @@ sun4i_rgb_connector_destroy(struct drm_connector *connector) }static struct drm_connector_funcs sun4i_rgb_con_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = sun4i_rgb_connector_destroy, .reset = drm_atomic_helper_connector_reset,
drivers/gpu/drm/sun4i/sun4i_tv.c +0 -1
@@ -546,7 +546,6 @@ sun4i_tv_comp_connector_destroy(struct drm_connector *connector) }static struct drm_connector_funcs sun4i_tv_comp_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = sun4i_tv_comp_connector_destroy, .reset = drm_atomic_helper_connector_reset,
drivers/gpu/drm/tegra/dsi.c +0 -1
@@ -815,7 +815,6 @@ tegra_dsi_connector_duplicate_state(struct drm_connector *connector) }static const struct drm_connector_funcs tegra_dsi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .reset = tegra_dsi_connector_reset, .detect = tegra_output_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes,
drivers/gpu/drm/tegra/hdmi.c +0 -1
@@ -902,7 +902,6 @@ tegra_hdmi_connector_detect(struct drm_connector *connector, bool force) }static const struct drm_connector_funcs tegra_hdmi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .reset = drm_atomic_helper_connector_reset, .detect = tegra_hdmi_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes,
drivers/gpu/drm/tegra/rgb.c +0 -1
@@ -88,7 +88,6 @@ static void tegra_dc_write_regs(struct tegra_dc *dc, }static const struct drm_connector_funcs tegra_rgb_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .reset = drm_atomic_helper_connector_reset, .detect = tegra_output_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes,
drivers/gpu/drm/tegra/sor.c +0 -1
@@ -1340,7 +1340,6 @@ tegra_sor_connector_duplicate_state(struct drm_connector *connector) }static const struct drm_connector_funcs tegra_sor_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .reset = tegra_sor_connector_reset, .detect = tegra_sor_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes,
drivers/gpu/drm/tilcdc/tilcdc_panel.c +0 -1
@@ -189,7 +189,6 @@ static struct drm_encoder *panel_connector_best_encoder(static const struct drm_connector_funcs panel_connector_funcs = { .destroy = panel_connector_destroy, - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .reset = drm_atomic_helper_connector_reset, .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
drivers/gpu/drm/tilcdc/tilcdc_tfp410.c +0 -1
@@ -202,7 +202,6 @@ static struct drm_encoder *tfp410_connector_best_encoder(static const struct drm_connector_funcs tfp410_connector_funcs = { .destroy = tfp410_connector_destroy, - .dpms = drm_atomic_helper_connector_dpms, .detect = tfp410_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .reset = drm_atomic_helper_connector_reset,
drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c +0 -1
@@ -71,7 +71,6 @@ static void tinydrm_connector_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs tinydrm_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .reset = drm_atomic_helper_connector_reset, .detect = tinydrm_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes,
drivers/gpu/drm/vc4/vc4_hdmi.c +0 -1
@@ -265,7 +265,6 @@ static int vc4_hdmi_connector_get_modes(struct drm_connector *connector) }static const struct drm_connector_funcs vc4_hdmi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = vc4_hdmi_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = vc4_hdmi_connector_destroy,
drivers/gpu/drm/vc4/vc4_vec.c +0 -1
@@ -366,7 +366,6 @@ static int vc4_vec_connector_get_modes(struct drm_connector *connector) }static const struct drm_connector_funcs vc4_vec_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = vc4_vec_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = vc4_vec_connector_destroy,
drivers/gpu/drm/virtio/virtgpu_display.c +0 -1
@@ -252,7 +252,6 @@ static void virtio_gpu_conn_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs virtio_gpu_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = virtio_gpu_conn_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = virtio_gpu_conn_destroy,
drivers/gpu/drm/zte/zx_hdmi.c +0 -1
@@ -300,7 +300,6 @@ zx_hdmi_connector_detect(struct drm_connector *connector, bool force) }static const struct drm_connector_funcs zx_hdmi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = zx_hdmi_connector_detect, .destroy = drm_connector_cleanup,
drivers/gpu/drm/zte/zx_tvenc.c +0 -1
@@ -269,7 +269,6 @@ static struct drm_connector_helper_funcs zx_tvenc_connector_helper_funcs = { };static const struct drm_connector_funcs zx_tvenc_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = drm_connector_cleanup, .reset = drm_atomic_helper_connector_reset,
drivers/gpu/drm/zte/zx_vga.c +0 -1
@@ -138,7 +138,6 @@ zx_vga_connector_detect(struct drm_connector *connector, bool force) }static const struct drm_connector_funcs zx_vga_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = zx_vga_connector_detect, .destroy = drm_connector_cleanup,
include/drm/drm_atomic_helper.h +0 -2
@@ -136,8 +136,6 @@ int drm_atomic_helper_page_flip_target(uint32_t flags, uint32_t target, struct drm_modeset_acquire_ctx *ctx); -int drm_atomic_helper_connector_dpms (struct drm_connector *connector, -int mode);struct drm_encoder *drm_atomic_helper_best_encoder (struct drm_connector *connector);
Signature · 6 lines
2.13.3 _______________________________________________ Virtualization mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Re: [PATCH 7/8] drm: Nuke drm_atomic_helper_connector_dpms
Quoted 158 lines · Daniel Vetter
It's dead code, the core handles all this directly now.
The only special case is nouveau and tda988x which used one function for both legacy modeset code and -nv50 atomic world instead of 2 vtables. But amounts to exactly the same.
v2: Rebase over the panel/brideg refactorings in stm/ltdc.
Signed-off-by Daniel Vetter <[email protected]>Cc Archit Taneja <[email protected]>Cc Andrzej Hajda <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Peter Senna Tschudin <[email protected]>Cc Martin Donnelly <[email protected]>Cc Martyn Welch <[email protected]>Cc Daniel Vetter <[email protected]>Cc Jani Nikula <[email protected]>Cc Sean Paul <[email protected]>Cc David Airlie <[email protected]>Cc Inki Dae <[email protected]>Cc Joonyoung Shim <[email protected]>Cc Seung-Woo Kim <[email protected]>Cc Kyungmin Park <[email protected]>Cc Kukjin Kim <[email protected]>Cc Krzysztof Kozlowski <[email protected]>Cc Stefan Agner <[email protected]>Cc Alison Wang <[email protected]>Cc Russell King <[email protected]>Cc Philipp Zabel <[email protected]>Cc CK Hu <[email protected]>Cc Matthias Brugger <[email protected]>Cc Neil Armstrong <[email protected]>Cc Carlo Caione <[email protected]>Cc Kevin Hilman <[email protected]>Cc Marek Vasut <[email protected]>Cc Ben Skeggs <[email protected]>Cc Tomi Valkeinen <[email protected]>Cc Eric Anholt <[email protected]>Cc Mark Yao <[email protected]>Cc Heiko Stuebner <[email protected]>Cc Benjamin Gaignard <[email protected]>Cc Vincent Abriou <[email protected]>Cc Yannick Fertre <[email protected]>Cc Philippe Cornu <[email protected]>Cc Maxime Ripard <[email protected]>Cc Chen-Yu Tsai <[email protected]>Cc Thierry Reding <[email protected]>Cc Jonathan Hunter <[email protected]>Cc Jyri Sarha <[email protected]>Cc Gerd Hoffmann <[email protected]>Cc Shawn Guo <[email protected]>Cc John Stultz <[email protected]>Cc Lars-Peter Clausen <[email protected]>Cc Sergei Shtylyov <[email protected]>Cc Jeffy Chen <[email protected]>Cc Tomeu Vizoso <[email protected]>Cc Yakir Yang <[email protected]>Cc Marek Szyprowski <[email protected]>Cc Jose Abreu <[email protected]>Cc Romain Perier <[email protected]>Cc Kieran Bingham <[email protected]>Cc Xinliang Liu <[email protected]>Cc Alexey Brodkin <[email protected]>Cc Alex Deucher <[email protected]>Cc Rongrong Zou <[email protected]>Cc Rob Clark <[email protected]>Cc Hai Li <[email protected]>Cc "Noralf Trønnes" <[email protected]>Cc zain wang <[email protected]>Cc Baoyou Xie <[email protected]>Cc Boris Brezillon <[email protected]>--- drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 1 - drivers/gpu/drm/bridge/analogix-anx78xx.c | 1 - drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 1 - drivers/gpu/drm/bridge/dumb-vga-dac.c | 1 - .../drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c | 1 - drivers/gpu/drm/bridge/nxp-ptn3460.c | 1 - drivers/gpu/drm/bridge/panel.c | 1 - drivers/gpu/drm/bridge/parade-ps8622.c | 1 - drivers/gpu/drm/bridge/sii902x.c | 1 - drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 1 - drivers/gpu/drm/bridge/tc358767.c | 1 - drivers/gpu/drm/bridge/ti-tfp410.c | 1 - drivers/gpu/drm/drm_atomic_helper.c | 79 ---------------------- drivers/gpu/drm/exynos/exynos_drm_dpi.c | 1 - drivers/gpu/drm/exynos/exynos_drm_dsi.c | 1 - drivers/gpu/drm/exynos/exynos_drm_vidi.c | 1 - drivers/gpu/drm/exynos/exynos_hdmi.c | 1 - drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c | 1 - drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 1 - drivers/gpu/drm/i2c/tda998x_drv.c | 10 +-- drivers/gpu/drm/i915/intel_crt.c | 1 - drivers/gpu/drm/i915/intel_dp.c | 1 - drivers/gpu/drm/i915/intel_dp_mst.c | 1 - drivers/gpu/drm/i915/intel_dsi.c | 1 - drivers/gpu/drm/i915/intel_dvo.c | 1 - drivers/gpu/drm/i915/intel_hdmi.c | 1 - drivers/gpu/drm/i915/intel_lvds.c | 1 - drivers/gpu/drm/i915/intel_sdvo.c | 1 - drivers/gpu/drm/i915/intel_tv.c | 1 - drivers/gpu/drm/imx/imx-ldb.c | 1 - drivers/gpu/drm/imx/imx-tve.c | 1 - drivers/gpu/drm/imx/parallel-display.c | 1 - drivers/gpu/drm/mediatek/mtk_dsi.c | 1 - drivers/gpu/drm/mediatek/mtk_hdmi.c | 1 - drivers/gpu/drm/meson/meson_venc_cvbs.c | 1 - drivers/gpu/drm/msm/dsi/dsi_manager.c | 1 - drivers/gpu/drm/msm/edp/edp_connector.c | 1 - drivers/gpu/drm/msm/hdmi/hdmi_connector.c | 1 - drivers/gpu/drm/msm/mdp/mdp4/mdp4_lvds_connector.c | 1 - drivers/gpu/drm/mxsfb/mxsfb_out.c | 1 - drivers/gpu/drm/nouveau/nouveau_connector.c | 12 +--- drivers/gpu/drm/nouveau/nv50_display.c | 1 - drivers/gpu/drm/omapdrm/omap_connector.c | 1 - drivers/gpu/drm/pl111/pl111_connector.c | 1 - drivers/gpu/drm/rcar-du/rcar_du_lvdscon.c | 1 - drivers/gpu/drm/rockchip/cdn-dp-core.c | 1 - drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 1 - drivers/gpu/drm/rockchip/inno_hdmi.c | 1 - drivers/gpu/drm/sti/sti_dvo.c | 1 - drivers/gpu/drm/sti/sti_hda.c | 1 - drivers/gpu/drm/sti/sti_hdmi.c | 1 - drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 1 - drivers/gpu/drm/sun4i/sun4i_rgb.c | 1 - drivers/gpu/drm/sun4i/sun4i_tv.c | 1 - drivers/gpu/drm/tegra/dsi.c | 1 - drivers/gpu/drm/tegra/hdmi.c | 1 - drivers/gpu/drm/tegra/rgb.c | 1 - drivers/gpu/drm/tegra/sor.c | 1 - drivers/gpu/drm/tilcdc/tilcdc_panel.c | 1 - drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 1 - drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c | 1 - drivers/gpu/drm/vc4/vc4_hdmi.c | 1 - drivers/gpu/drm/vc4/vc4_vec.c | 1 - drivers/gpu/drm/virtio/virtgpu_display.c | 1 - drivers/gpu/drm/zte/zx_hdmi.c | 1 - drivers/gpu/drm/zte/zx_tvenc.c | 1 - drivers/gpu/drm/zte/zx_vga.c | 1 - include/drm/drm_atomic_helper.h | 2 - 68 files changed, 3 insertions(+), 164 deletions(-)drivers/gpu/drm/meson/meson_venc_cvbs.c +0
-0
drivers/gpu/drm/meson/meson_venc_cvbs.c static int meson_cvbs_connector_mode_valid(struct drm_connector *connector, · line 123
Quoted 7 lines
drivers/gpu/drm/meson/meson_venc_cvbs.c +0
-1@@ -118,7 +118,6 @@ static int meson_cvbs_connector_mode_valid(struct drm_connector *connector, }static const struct drm_connector_funcs meson_cvbs_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = meson_cvbs_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = meson_cvbs_connector_destroy,
For meson driver :
For the rest:
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 7/8] drm: Nuke drm_atomic_helper_connector_dpms
In reply to Daniel VetterQuoted 158 lines · Daniel Vetter
It's dead code, the core handles all this directly now.
The only special case is nouveau and tda988x which used one function for both legacy modeset code and -nv50 atomic world instead of 2 vtables. But amounts to exactly the same.
v2: Rebase over the panel/brideg refactorings in stm/ltdc.
Signed-off-by Daniel Vetter <[email protected]>Cc Archit Taneja <[email protected]>Cc Andrzej Hajda <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Peter Senna Tschudin <[email protected]>Cc Martin Donnelly <[email protected]>Cc Martyn Welch <[email protected]>Cc Daniel Vetter <[email protected]>Cc Jani Nikula <[email protected]>Cc Sean Paul <[email protected]>Cc David Airlie <[email protected]>Cc Inki Dae <[email protected]>Cc Joonyoung Shim <[email protected]>Cc Seung-Woo Kim <[email protected]>Cc Kyungmin Park <[email protected]>Cc Kukjin Kim <[email protected]>Cc Krzysztof Kozlowski <[email protected]>Cc Stefan Agner <[email protected]>Cc Alison Wang <[email protected]>Cc Russell King <[email protected]>Cc Philipp Zabel <[email protected]>Cc CK Hu <[email protected]>Cc Matthias Brugger <[email protected]>Cc Neil Armstrong <[email protected]>Cc Carlo Caione <[email protected]>Cc Kevin Hilman <[email protected]>Cc Marek Vasut <[email protected]>Cc Ben Skeggs <[email protected]>Cc Tomi Valkeinen <[email protected]>Cc Eric Anholt <[email protected]>Cc Mark Yao <[email protected]>Cc Heiko Stuebner <[email protected]>Cc Benjamin Gaignard <[email protected]>Cc Vincent Abriou <[email protected]>Cc Yannick Fertre <[email protected]>Cc Philippe Cornu <[email protected]>Cc Maxime Ripard <[email protected]>Cc Chen-Yu Tsai <[email protected]>Cc Thierry Reding <[email protected]>Cc Jonathan Hunter <[email protected]>Cc Jyri Sarha <[email protected]>Cc Gerd Hoffmann <[email protected]>Cc Shawn Guo <[email protected]>Cc John Stultz <[email protected]>Cc Lars-Peter Clausen <[email protected]>Cc Sergei Shtylyov <[email protected]>Cc Jeffy Chen <[email protected]>Cc Tomeu Vizoso <[email protected]>Cc Yakir Yang <[email protected]>Cc Marek Szyprowski <[email protected]>Cc Jose Abreu <[email protected]>Cc Romain Perier <[email protected]>Cc Kieran Bingham <[email protected]>Cc Xinliang Liu <[email protected]>Cc Alexey Brodkin <[email protected]>Cc Alex Deucher <[email protected]>Cc Rongrong Zou <[email protected]>Cc Rob Clark <[email protected]>Cc Hai Li <[email protected]>Cc "Noralf Trønnes" <[email protected]>Cc zain wang <[email protected]>Cc Baoyou Xie <[email protected]>Cc Boris Brezillon <[email protected]>--- drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 1 - drivers/gpu/drm/bridge/analogix-anx78xx.c | 1 - drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 1 - drivers/gpu/drm/bridge/dumb-vga-dac.c | 1 - .../drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c | 1 - drivers/gpu/drm/bridge/nxp-ptn3460.c | 1 - drivers/gpu/drm/bridge/panel.c | 1 - drivers/gpu/drm/bridge/parade-ps8622.c | 1 - drivers/gpu/drm/bridge/sii902x.c | 1 - drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 1 - drivers/gpu/drm/bridge/tc358767.c | 1 - drivers/gpu/drm/bridge/ti-tfp410.c | 1 - drivers/gpu/drm/drm_atomic_helper.c | 79 ---------------------- drivers/gpu/drm/exynos/exynos_drm_dpi.c | 1 - drivers/gpu/drm/exynos/exynos_drm_dsi.c | 1 - drivers/gpu/drm/exynos/exynos_drm_vidi.c | 1 - drivers/gpu/drm/exynos/exynos_hdmi.c | 1 - drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c | 1 - drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 1 - drivers/gpu/drm/i2c/tda998x_drv.c | 10 +-- drivers/gpu/drm/i915/intel_crt.c | 1 - drivers/gpu/drm/i915/intel_dp.c | 1 - drivers/gpu/drm/i915/intel_dp_mst.c | 1 - drivers/gpu/drm/i915/intel_dsi.c | 1 - drivers/gpu/drm/i915/intel_dvo.c | 1 - drivers/gpu/drm/i915/intel_hdmi.c | 1 - drivers/gpu/drm/i915/intel_lvds.c | 1 - drivers/gpu/drm/i915/intel_sdvo.c | 1 - drivers/gpu/drm/i915/intel_tv.c | 1 - drivers/gpu/drm/imx/imx-ldb.c | 1 - drivers/gpu/drm/imx/imx-tve.c | 1 - drivers/gpu/drm/imx/parallel-display.c | 1 - drivers/gpu/drm/mediatek/mtk_dsi.c | 1 - drivers/gpu/drm/mediatek/mtk_hdmi.c | 1 - drivers/gpu/drm/meson/meson_venc_cvbs.c | 1 - drivers/gpu/drm/msm/dsi/dsi_manager.c | 1 - drivers/gpu/drm/msm/edp/edp_connector.c | 1 - drivers/gpu/drm/msm/hdmi/hdmi_connector.c | 1 - drivers/gpu/drm/msm/mdp/mdp4/mdp4_lvds_connector.c | 1 - drivers/gpu/drm/mxsfb/mxsfb_out.c | 1 - drivers/gpu/drm/nouveau/nouveau_connector.c | 12 +--- drivers/gpu/drm/nouveau/nv50_display.c | 1 - drivers/gpu/drm/omapdrm/omap_connector.c | 1 - drivers/gpu/drm/pl111/pl111_connector.c | 1 - drivers/gpu/drm/rcar-du/rcar_du_lvdscon.c | 1 - drivers/gpu/drm/rockchip/cdn-dp-core.c | 1 - drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 1 - drivers/gpu/drm/rockchip/inno_hdmi.c | 1 - drivers/gpu/drm/sti/sti_dvo.c | 1 - drivers/gpu/drm/sti/sti_hda.c | 1 - drivers/gpu/drm/sti/sti_hdmi.c | 1 - drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 1 - drivers/gpu/drm/sun4i/sun4i_rgb.c | 1 - drivers/gpu/drm/sun4i/sun4i_tv.c | 1 - drivers/gpu/drm/tegra/dsi.c | 1 - drivers/gpu/drm/tegra/hdmi.c | 1 - drivers/gpu/drm/tegra/rgb.c | 1 - drivers/gpu/drm/tegra/sor.c | 1 - drivers/gpu/drm/tilcdc/tilcdc_panel.c | 1 - drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 1 - drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c | 1 - drivers/gpu/drm/vc4/vc4_hdmi.c | 1 - drivers/gpu/drm/vc4/vc4_vec.c | 1 - drivers/gpu/drm/virtio/virtgpu_display.c | 1 - drivers/gpu/drm/zte/zx_hdmi.c | 1 - drivers/gpu/drm/zte/zx_tvenc.c | 1 - drivers/gpu/drm/zte/zx_vga.c | 1 - include/drm/drm_atomic_helper.h | 2 - 68 files changed, 3 insertions(+), 164 deletions(-)drivers/gpu/drm/meson/meson_venc_cvbs.c +0
-0
drivers/gpu/drm/meson/meson_venc_cvbs.c static int meson_cvbs_connector_mode_valid(struct drm_connector *connector, · line 123
Quoted 7 lines
drivers/gpu/drm/meson/meson_venc_cvbs.c +0
-1@@ -118,7 +118,6 @@ static int meson_cvbs_connector_mode_valid(struct drm_connector *connector, }static const struct drm_connector_funcs meson_cvbs_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = meson_cvbs_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = meson_cvbs_connector_destroy,
For meson driver :
For the rest:
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Re: [PATCH 7/8] drm: Nuke drm_atomic_helper_connector_dpms
In reply to Daniel VetterQuoted 9 lines · Daniel Vetter
It's dead code, the core handles all this directly now.
The only special case is nouveau and tda988x which used one function for both legacy modeset code and -nv50 atomic world instead of 2 vtables. But amounts to exactly the same.
v2: Rebase over the panel/brideg refactorings in stm/ltdc.
Signed-off-by Daniel Vetter <[email protected]>
[...]
Quoted 5 lines
drivers/gpu/drm/imx/imx-ldb.c | 1 - drivers/gpu/drm/imx/imx-tve.c | 1 - drivers/gpu/drm/imx/parallel-display.c | 1 - drivers/gpu/drm/mediatek/mtk_dsi.c | 1 - drivers/gpu/drm/mediatek/mtk_hdmi.c | 1 -
regards
Philipp
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 7/8] drm: Nuke drm_atomic_helper_connector_dpms
In reply to Daniel VetterQuoted 9 lines · Daniel Vetter
It's dead code, the core handles all this directly now.
The only special case is nouveau and tda988x which used one function for both legacy modeset code and -nv50 atomic world instead of 2 vtables. But amounts to exactly the same.
v2: Rebase over the panel/brideg refactorings in stm/ltdc.
Signed-off-by Daniel Vetter <[email protected]>
[...]
Quoted 5 lines
drivers/gpu/drm/imx/imx-ldb.c | 1 - drivers/gpu/drm/imx/imx-tve.c | 1 - drivers/gpu/drm/imx/parallel-display.c | 1 - drivers/gpu/drm/mediatek/mtk_dsi.c | 1 - drivers/gpu/drm/mediatek/mtk_hdmi.c | 1 -
regards
Philipp
Re: [PATCH 7/8] drm: Nuke drm_atomic_helper_connector_dpms
In reply to Daniel VetterQuoted 7 lines · Daniel Vetter
It's dead code, the core handles all this directly now.
The only special case is nouveau and tda988x which used one function for both legacy modeset code and -nv50 atomic world instead of 2 vtables. But amounts to exactly the same.
v2: Rebase over the panel/brideg refactorings in stm/ltdc.
s/brideg/bridge
<snip>
Quoted 5 lines
--- drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 1 - drivers/gpu/drm/bridge/analogix-anx78xx.c | 1 - drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 1 - drivers/gpu/drm/bridge/dumb-vga-dac.c | 1 -
Quoted 8 lines
.../drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c | 1 - drivers/gpu/drm/bridge/nxp-ptn3460.c | 1 - drivers/gpu/drm/bridge/panel.c | 1 - drivers/gpu/drm/bridge/parade-ps8622.c | 1 - drivers/gpu/drm/bridge/sii902x.c | 1 - drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 1 - drivers/gpu/drm/bridge/tc358767.c | 1 - drivers/gpu/drm/bridge/ti-tfp410.c | 1 -
For bridge changes:
Archit
Signature · 6 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 7/8] drm: Nuke drm_atomic_helper_connector_dpms
In reply to Daniel VetterQuoted 7 lines · Daniel Vetter
It's dead code, the core handles all this directly now.
The only special case is nouveau and tda988x which used one function for both legacy modeset code and -nv50 atomic world instead of 2 vtables. But amounts to exactly the same.
v2: Rebase over the panel/brideg refactorings in stm/ltdc.
s/brideg/bridge
<snip>
Quoted 5 lines
--- drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 1 - drivers/gpu/drm/bridge/analogix-anx78xx.c | 1 - drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 1 - drivers/gpu/drm/bridge/dumb-vga-dac.c | 1 -
Quoted 8 lines
.../drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c | 1 - drivers/gpu/drm/bridge/nxp-ptn3460.c | 1 - drivers/gpu/drm/bridge/panel.c | 1 - drivers/gpu/drm/bridge/parade-ps8622.c | 1 - drivers/gpu/drm/bridge/sii902x.c | 1 - drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 1 - drivers/gpu/drm/bridge/tc358767.c | 1 - drivers/gpu/drm/bridge/ti-tfp410.c | 1 -
For bridge changes:
Archit
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
Re: [PATCH 7/8] drm: Nuke drm_atomic_helper_connector_dpms
In reply to Daniel VetterQuoted 36 lines · Daniel Vetter
It's dead code, the core handles all this directly now.
The only special case is nouveau and tda988x which used one function for both legacy modeset code and -nv50 atomic world instead of 2 vtables. But amounts to exactly the same.
v2: Rebase over the panel/brideg refactorings in stm/ltdc.
Signed-off-by Daniel Vetter <[email protected]>Cc Archit Taneja <[email protected]>Cc Andrzej Hajda <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Peter Senna Tschudin <[email protected]>Cc Martin Donnelly <[email protected]>Cc Martyn Welch <[email protected]>Cc Daniel Vetter <[email protected]>Cc Jani Nikula <[email protected]>Cc Sean Paul <[email protected]>Cc David Airlie <[email protected]>Cc Inki Dae <[email protected]>Cc Joonyoung Shim <[email protected]>Cc Seung-Woo Kim <[email protected]>Cc Kyungmin Park <[email protected]>Cc Kukjin Kim <[email protected]>Cc Krzysztof Kozlowski <[email protected]>Cc Stefan Agner <[email protected]>Cc Alison Wang <[email protected]>Cc Russell King <[email protected]>Cc Philipp Zabel <[email protected]>Cc CK Hu <[email protected]>Cc Matthias Brugger <[email protected]>Cc Neil Armstrong <[email protected]>Cc Carlo Caione <[email protected]>Cc Kevin Hilman <[email protected]>Cc Marek Vasut <[email protected]>Cc Ben Skeggs <[email protected]>
Quoted 8 lines
Cc Tomi Valkeinen <[email protected]>Cc Eric Anholt <[email protected]>Cc Mark Yao <[email protected]>Cc Heiko Stuebner <[email protected]>Cc Benjamin Gaignard <[email protected]>Cc Vincent Abriou <[email protected]>Cc Yannick Fertre <[email protected]>Cc Philippe Cornu <[email protected]>
Many thanks
Philippe :-)
Quoted 1,032 lines
Cc Maxime Ripard <[email protected]>Cc Chen-Yu Tsai <[email protected]>Cc Thierry Reding <[email protected]>Cc Jonathan Hunter <[email protected]>Cc Jyri Sarha <[email protected]>Cc Gerd Hoffmann <[email protected]>Cc Shawn Guo <[email protected]>Cc John Stultz <[email protected]>Cc Lars-Peter Clausen <[email protected]>Cc Sergei Shtylyov <[email protected]>Cc Jeffy Chen <[email protected]>Cc Tomeu Vizoso <[email protected]>Cc Yakir Yang <[email protected]>Cc Marek Szyprowski <[email protected]>Cc Jose Abreu <[email protected]>Cc Romain Perier <[email protected]>Cc Kieran Bingham <[email protected]>Cc Xinliang Liu <[email protected]>Cc Alexey Brodkin <[email protected]>Cc Alex Deucher <[email protected]>Cc Rongrong Zou <[email protected]>Cc Rob Clark <[email protected]>Cc Hai Li <[email protected]>Cc "Noralf Trønnes" <[email protected]>Cc zain wang <[email protected]>Cc Baoyou Xie <[email protected]>Cc Boris Brezillon <[email protected]>--- drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 1 - drivers/gpu/drm/bridge/analogix-anx78xx.c | 1 - drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 1 - drivers/gpu/drm/bridge/dumb-vga-dac.c | 1 - .../drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c | 1 - drivers/gpu/drm/bridge/nxp-ptn3460.c | 1 - drivers/gpu/drm/bridge/panel.c | 1 - drivers/gpu/drm/bridge/parade-ps8622.c | 1 - drivers/gpu/drm/bridge/sii902x.c | 1 - drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 1 - drivers/gpu/drm/bridge/tc358767.c | 1 - drivers/gpu/drm/bridge/ti-tfp410.c | 1 - drivers/gpu/drm/drm_atomic_helper.c | 79 ---------------------- drivers/gpu/drm/exynos/exynos_drm_dpi.c | 1 - drivers/gpu/drm/exynos/exynos_drm_dsi.c | 1 - drivers/gpu/drm/exynos/exynos_drm_vidi.c | 1 - drivers/gpu/drm/exynos/exynos_hdmi.c | 1 - drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c | 1 - drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 1 - drivers/gpu/drm/i2c/tda998x_drv.c | 10 +-- drivers/gpu/drm/i915/intel_crt.c | 1 - drivers/gpu/drm/i915/intel_dp.c | 1 - drivers/gpu/drm/i915/intel_dp_mst.c | 1 - drivers/gpu/drm/i915/intel_dsi.c | 1 - drivers/gpu/drm/i915/intel_dvo.c | 1 - drivers/gpu/drm/i915/intel_hdmi.c | 1 - drivers/gpu/drm/i915/intel_lvds.c | 1 - drivers/gpu/drm/i915/intel_sdvo.c | 1 - drivers/gpu/drm/i915/intel_tv.c | 1 - drivers/gpu/drm/imx/imx-ldb.c | 1 - drivers/gpu/drm/imx/imx-tve.c | 1 - drivers/gpu/drm/imx/parallel-display.c | 1 - drivers/gpu/drm/mediatek/mtk_dsi.c | 1 - drivers/gpu/drm/mediatek/mtk_hdmi.c | 1 - drivers/gpu/drm/meson/meson_venc_cvbs.c | 1 - drivers/gpu/drm/msm/dsi/dsi_manager.c | 1 - drivers/gpu/drm/msm/edp/edp_connector.c | 1 - drivers/gpu/drm/msm/hdmi/hdmi_connector.c | 1 - drivers/gpu/drm/msm/mdp/mdp4/mdp4_lvds_connector.c | 1 - drivers/gpu/drm/mxsfb/mxsfb_out.c | 1 - drivers/gpu/drm/nouveau/nouveau_connector.c | 12 +--- drivers/gpu/drm/nouveau/nv50_display.c | 1 - drivers/gpu/drm/omapdrm/omap_connector.c | 1 - drivers/gpu/drm/pl111/pl111_connector.c | 1 - drivers/gpu/drm/rcar-du/rcar_du_lvdscon.c | 1 - drivers/gpu/drm/rockchip/cdn-dp-core.c | 1 - drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 1 - drivers/gpu/drm/rockchip/inno_hdmi.c | 1 - drivers/gpu/drm/sti/sti_dvo.c | 1 - drivers/gpu/drm/sti/sti_hda.c | 1 - drivers/gpu/drm/sti/sti_hdmi.c | 1 - drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 1 - drivers/gpu/drm/sun4i/sun4i_rgb.c | 1 - drivers/gpu/drm/sun4i/sun4i_tv.c | 1 - drivers/gpu/drm/tegra/dsi.c | 1 - drivers/gpu/drm/tegra/hdmi.c | 1 - drivers/gpu/drm/tegra/rgb.c | 1 - drivers/gpu/drm/tegra/sor.c | 1 - drivers/gpu/drm/tilcdc/tilcdc_panel.c | 1 - drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 1 - drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c | 1 - drivers/gpu/drm/vc4/vc4_hdmi.c | 1 - drivers/gpu/drm/vc4/vc4_vec.c | 1 - drivers/gpu/drm/virtio/virtgpu_display.c | 1 - drivers/gpu/drm/zte/zx_hdmi.c | 1 - drivers/gpu/drm/zte/zx_tvenc.c | 1 - drivers/gpu/drm/zte/zx_vga.c | 1 - include/drm/drm_atomic_helper.h | 2 - 68 files changed, 3 insertions(+), 164 deletions(-)drivers/gpu/drm/bridge/adv7511/adv7511_drv.c +0
-1@@ -786,7 +786,6 @@ adv7511_connector_detect(struct drm_connector *connector, bool force) }static struct drm_connector_funcs adv7511_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = adv7511_connector_detect, .destroy = drm_connector_cleanup,drivers/gpu/drm/bridge/analogix-anx78xx.c +0
-1@@ -1002,7 +1002,6 @@ static enum drm_connector_status anx78xx_detect(struct drm_connector *connector, }static const struct drm_connector_funcs anx78xx_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = anx78xx_detect, .destroy = drm_connector_cleanup,drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +0
-1@@ -1005,7 +1005,6 @@ analogix_dp_detect(struct drm_connector *connector, bool force) }static const struct drm_connector_funcs analogix_dp_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = analogix_dp_detect, .destroy = drm_connector_cleanup,drivers/gpu/drm/bridge/dumb-vga-dac.c +0
-1@@ -92,7 +92,6 @@ dumb_vga_connector_detect(struct drm_connector *connector, bool force) }static const struct drm_connector_funcs dumb_vga_con_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = dumb_vga_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = drm_connector_cleanup,drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c +0
-1@@ -193,7 +193,6 @@ static enum drm_connector_status ge_b850v3_lvds_detect( }static const struct drm_connector_funcs ge_b850v3_lvds_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = ge_b850v3_lvds_detect, .destroy = drm_connector_cleanup,drivers/gpu/drm/bridge/nxp-ptn3460.c +0
-1@@ -238,7 +238,6 @@ static const struct drm_connector_helper_funcs ptn3460_connector_helper_funcs = };static const struct drm_connector_funcs ptn3460_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = drm_connector_cleanup, .reset = drm_atomic_helper_connector_reset,drivers/gpu/drm/bridge/panel.c +0
-1@@ -50,7 +50,6 @@ panel_bridge_connector_helper_funcs = { };static const struct drm_connector_funcs panel_bridge_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .reset = drm_atomic_helper_connector_reset, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = drm_connector_cleanup,drivers/gpu/drm/bridge/parade-ps8622.c +0
-1@@ -476,7 +476,6 @@ static const struct drm_connector_helper_funcs ps8622_connector_helper_funcs = { };static const struct drm_connector_funcs ps8622_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = drm_connector_cleanup, .reset = drm_atomic_helper_connector_reset,drivers/gpu/drm/bridge/sii902x.c +0
-1@@ -124,7 +124,6 @@ sii902x_connector_detect(struct drm_connector *connector, bool force) }static const struct drm_connector_funcs sii902x_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = sii902x_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = drm_connector_cleanup,drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +0
-1@@ -1920,7 +1920,6 @@ static void dw_hdmi_connector_force(struct drm_connector *connector) }static const struct drm_connector_funcs dw_hdmi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = dw_hdmi_connector_detect, .destroy = drm_connector_cleanup,drivers/gpu/drm/bridge/tc358767.c +0
-1@@ -1160,7 +1160,6 @@ static const struct drm_connector_helper_funcs tc_connector_helper_funcs = { };static const struct drm_connector_funcs tc_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = drm_connector_cleanup, .reset = drm_atomic_helper_connector_reset,drivers/gpu/drm/bridge/ti-tfp410.c +0
-1@@ -102,7 +102,6 @@ tfp410_connector_detect(struct drm_connector *connector, bool force) }static const struct drm_connector_funcs tfp410_con_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = tfp410_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = drm_connector_cleanup,drivers/gpu/drm/drm_atomic_helper.c +0
-79@@ -3102,85 +3102,6 @@ int drm_atomic_helper_page_flip_target(struct drm_crtc *crtc,EXPORT_SYMBOL (drm_atomic_helper_page_flip_target);/** -* drm_atomic_helper_connector_dpms() - connector dpms helper implementation -* @connector: affected connector -* @mode: DPMS mode -* -* This is the main helper function provided by the atomic helper framework for -* implementing the legacy DPMS connector interface. It computes the new desired -* &drm_crtc_state.active state for the corresponding CRTC (if the connector is -* enabled) and updates it. -* -* Returns: -* Returns 0 on success, negative errno numbers on failure. -*/ -int drm_atomic_helper_connector_dpms (struct drm_connector *connector, -int mode) -{ -struct drm_mode_config *config = &connector->dev->mode_config; -struct drm_atomic_state *state; -struct drm_crtc_state *crtc_state; -struct drm_crtc *crtc; -struct drm_connector *tmp_connector; -struct drm_connector_list_iter conn_iter; -int ret; -bool active = false; -int old_mode = connector->dpms; - -if (mode !=DRM_MODE_DPMS_ON ) - mode =DRM_MODE_DPMS_OFF ; - - connector->dpms = mode; - crtc = connector->state->crtc; - -if (!crtc) -return 0 ; - - state =drm_atomic_state_alloc (connector->dev); -if (!state) -return -ENOMEM ; - - state->acquire_ctx = crtc->dev->mode_config.acquire_ctx; -retry: - crtc_state =drm_atomic_get_crtc_state (state, crtc); -if (IS_ERR (crtc_state)) { - ret =PTR_ERR (crtc_state); - goto fail; - } - -WARN_ON (!drm_modeset_is_locked (&config->connection_mutex)); - -drm_connector_list_iter_begin (connector->dev, &conn_iter); -drm_for_each_connector_iter (tmp_connector, &conn_iter) { -if (tmp_connector->state->crtc != crtc) -continue ; - -if (tmp_connector->dpms ==DRM_MODE_DPMS_ON ) { - active = true; -break ; - } - } -drm_connector_list_iter_end (&conn_iter); - crtc_state->active = active; - - ret =drm_atomic_commit (state); -fail: -if (ret == -EDEADLK ) - goto backoff; -if (ret !=0 ) - connector->dpms = old_mode; -drm_atomic_state_put (state); -return ret; - -backoff: -drm_atomic_state_clear (state); -drm_atomic_legacy_backoff (state); - - goto retry; -} -EXPORT_SYMBOL (drm_atomic_helper_connector_dpms); - -/** * drm_atomic_helper_best_encoder - Helper for * &drm_connector_helper_funcs.best_encoder callback * @connector: Connector control structure drivers/gpu/drm/exynos/exynos_drm_dpi.c +0
-1@@ -59,7 +59,6 @@ static void exynos_dpi_connector_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs exynos_dpi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = exynos_dpi_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = exynos_dpi_connector_destroy,drivers/gpu/drm/exynos/exynos_drm_dsi.c +0
-1@@ -1537,7 +1537,6 @@ static void exynos_dsi_connector_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs exynos_dsi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = exynos_dsi_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = exynos_dsi_connector_destroy,drivers/gpu/drm/exynos/exynos_drm_vidi.c +0
-1@@ -289,7 +289,6 @@ static void vidi_connector_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs vidi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = vidi_detect, .destroy = vidi_connector_destroy,drivers/gpu/drm/exynos/exynos_hdmi.c +0
-1@@ -835,7 +835,6 @@ static void hdmi_connector_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs hdmi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = hdmi_detect, .destroy = hdmi_connector_destroy,drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c +0
-1@@ -63,7 +63,6 @@ static const struct drm_connector_funcs fsl_dcu_drm_connector_funcs = { .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, .destroy = fsl_dcu_drm_connector_destroy, - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .reset = drm_atomic_helper_connector_reset, };drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c +0
-1@@ -47,7 +47,6 @@ static const struct drm_connector_helper_funcs };static const struct drm_connector_funcs hibmc_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = drm_connector_cleanup, .reset = drm_atomic_helper_connector_reset,drivers/gpu/drm/i2c/tda998x_drv.c +1
-9@@ -969,14 +969,6 @@ static int tda998x_audio_codec_init(struct tda998x_priv *priv,/* DRM connector functions */ -static int tda998x_connector_dpms (struct drm_connector *connector,int mode) -{ -if (drm_core_check_feature (connector->dev,DRIVER_ATOMIC )) -return drm_atomic_helper_connector_dpms (connector, mode); -else -return drm_helper_connector_dpms (connector, mode); -} -static int tda998x_connector_fill_modes (struct drm_connector *connector,uint32_t maxX,uint32_t maxY) {@@ -1014,7 +1006,7 @@ static void tda998x_connector_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs tda998x_connector_funcs = { - .dpms = tda998x_connector_dpms, + .dpms = drm_helper_connector_dpms, .reset = drm_atomic_helper_connector_reset, .fill_modes = tda998x_connector_fill_modes, .detect = tda998x_connector_detect,drivers/gpu/drm/i915/intel_crt.c +0
-1@@ -802,7 +802,6 @@ void intel_crt_reset(struct drm_encoder *encoder)*/ static const struct drm_connector_funcs intel_crt_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .late_register = intel_connector_register, .early_unregister = intel_connector_unregister,drivers/gpu/drm/i915/intel_dp.c +0
-1@@ -5007,7 +5007,6 @@ void intel_dp_encoder_reset(struct drm_encoder *encoder) }static const struct drm_connector_funcs intel_dp_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .force = intel_dp_force, .fill_modes = drm_helper_probe_single_connector_modes, .atomic_get_property = intel_digital_connector_atomic_get_property,drivers/gpu/drm/i915/intel_dp_mst.c +0
-1@@ -346,7 +346,6 @@ intel_dp_mst_connector_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs intel_dp_mst_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = intel_dp_mst_detect, .fill_modes = drm_helper_probe_single_connector_modes, .late_register = intel_connector_register,drivers/gpu/drm/i915/intel_dsi.c +0
-1@@ -1653,7 +1653,6 @@ static const struct drm_connector_helper_funcs intel_dsi_connector_helper_funcs };static const struct drm_connector_funcs intel_dsi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .late_register = intel_connector_register, .early_unregister = intel_connector_unregister, .destroy = intel_dsi_connector_destroy,drivers/gpu/drm/i915/intel_dvo.c +0
-1@@ -344,7 +344,6 @@ static void intel_dvo_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs intel_dvo_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = intel_dvo_detect, .late_register = intel_connector_register, .early_unregister = intel_connector_unregister,drivers/gpu/drm/i915/intel_hdmi.c +0
-1@@ -1761,7 +1761,6 @@ static void intel_hdmi_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs intel_hdmi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = intel_hdmi_detect, .force = intel_hdmi_force, .fill_modes = drm_helper_probe_single_connector_modes,drivers/gpu/drm/i915/intel_lvds.c +0
-1@@ -595,7 +595,6 @@ static const struct drm_connector_helper_funcs intel_lvds_connector_helper_funcs };static const struct drm_connector_funcs intel_lvds_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = intel_lvds_detect, .fill_modes = drm_helper_probe_single_connector_modes, .atomic_get_property = intel_digital_connector_atomic_get_property,drivers/gpu/drm/i915/intel_sdvo.c +0
-1@@ -2193,7 +2193,6 @@ intel_sdvo_connector_duplicate_state(struct drm_connector *connector) }static const struct drm_connector_funcs intel_sdvo_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = intel_sdvo_detect, .fill_modes = drm_helper_probe_single_connector_modes, .atomic_get_property = intel_sdvo_connector_atomic_get_property,drivers/gpu/drm/i915/intel_tv.c +0
-1@@ -1407,7 +1407,6 @@ intel_tv_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs intel_tv_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .late_register = intel_connector_register, .early_unregister = intel_connector_unregister, .destroy = intel_tv_destroy,drivers/gpu/drm/imx/imx-ldb.c +0
-1@@ -389,7 +389,6 @@ static int imx_ldb_encoder_atomic_check(struct drm_encoder *encoder,static const struct drm_connector_funcs imx_ldb_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = imx_drm_connector_destroy, .reset = drm_atomic_helper_connector_reset,drivers/gpu/drm/imx/imx-tve.c +0
-1@@ -341,7 +341,6 @@ static int imx_tve_atomic_check(struct drm_encoder *encoder, }static const struct drm_connector_funcs imx_tve_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = imx_drm_connector_destroy, .reset = drm_atomic_helper_connector_reset,drivers/gpu/drm/imx/parallel-display.c +0
-1@@ -135,7 +135,6 @@ static int imx_pd_encoder_atomic_check(struct drm_encoder *encoder, }static const struct drm_connector_funcs imx_pd_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = imx_drm_connector_destroy, .reset = drm_atomic_helper_connector_reset,drivers/gpu/drm/mediatek/mtk_dsi.c +0
-1@@ -766,7 +766,6 @@ static const struct drm_encoder_helper_funcs mtk_dsi_encoder_helper_funcs = { };static const struct drm_connector_funcs mtk_dsi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = drm_connector_cleanup, .reset = drm_atomic_helper_connector_reset,drivers/gpu/drm/mediatek/mtk_hdmi.c +0
-1@@ -1261,7 +1261,6 @@ static struct drm_encoder *mtk_hdmi_conn_best_enc(struct drm_connector *conn) }static const struct drm_connector_funcs mtk_hdmi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = hdmi_conn_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = hdmi_conn_destroy,drivers/gpu/drm/meson/meson_venc_cvbs.c +0
-1@@ -118,7 +118,6 @@ static int meson_cvbs_connector_mode_valid(struct drm_connector *connector, }static const struct drm_connector_funcs meson_cvbs_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = meson_cvbs_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = meson_cvbs_connector_destroy,drivers/gpu/drm/msm/dsi/dsi_manager.c +0
-1@@ -626,7 +626,6 @@ static void dsi_mgr_bridge_mode_set(struct drm_bridge *bridge, }static const struct drm_connector_funcs dsi_mgr_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = dsi_mgr_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = dsi_mgr_connector_destroy,drivers/gpu/drm/msm/edp/edp_connector.c +0
-1@@ -92,7 +92,6 @@ static int edp_connector_mode_valid(struct drm_connector *connector, }static const struct drm_connector_funcs edp_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = edp_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = edp_connector_destroy,drivers/gpu/drm/msm/hdmi/hdmi_connector.c +0
-1@@ -407,7 +407,6 @@ static int msm_hdmi_connector_mode_valid(struct drm_connector *connector, }static const struct drm_connector_funcs hdmi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = hdmi_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = hdmi_connector_destroy,drivers/gpu/drm/msm/mdp/mdp4/mdp4_lvds_connector.c +0
-1@@ -91,7 +91,6 @@ static int mdp4_lvds_connector_mode_valid(struct drm_connector *connector, }static const struct drm_connector_funcs mdp4_lvds_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = mdp4_lvds_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = mdp4_lvds_connector_destroy,drivers/gpu/drm/mxsfb/mxsfb_out.c +0
-1@@ -74,7 +74,6 @@ static void mxsfb_panel_connector_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs mxsfb_panel_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = mxsfb_panel_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = mxsfb_panel_connector_destroy,drivers/gpu/drm/nouveau/nouveau_connector.c +2
-10@@ -1072,17 +1072,9 @@ nouveau_connector_helper_funcs = { .best_encoder = nouveau_connector_best_encoder, }; -static int -nouveau_connector_dpms (struct drm_connector *connector,int mode) -{ -if (drm_drv_uses_atomic_modeset (connector->dev)) -return drm_atomic_helper_connector_dpms (connector, mode); -return drm_helper_connector_dpms (connector, mode); -} -static const struct drm_connector_funcs nouveau_connector_funcs = { - .dpms = nouveau_connector_dpms, + .dpms = drm_helper_connector_dpms, .reset = nouveau_conn_reset, .detect = nouveau_connector_detect, .force = nouveau_connector_force,@@ -1097,7 +1089,7 @@ nouveau_connector_funcs = {static const struct drm_connector_funcs nouveau_connector_funcs_lvds = { - .dpms = nouveau_connector_dpms, + .dpms = drm_helper_connector_dpms, .reset = nouveau_conn_reset, .detect = nouveau_connector_detect_lvds, .force = nouveau_connector_force,drivers/gpu/drm/nouveau/nv50_display.c +0
-1@@ -3118,7 +3118,6 @@ nv50_mstc_destroy(struct drm_connector *connector)static const struct drm_connector_funcs nv50_mstc = { - .dpms = drm_atomic_helper_connector_dpms, .reset = nouveau_conn_reset, .detect = nv50_mstc_detect, .fill_modes = drm_helper_probe_single_connector_modes,drivers/gpu/drm/omapdrm/omap_connector.c +0
-1@@ -195,7 +195,6 @@ static int omap_connector_mode_valid(struct drm_connector *connector, }static const struct drm_connector_funcs omap_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .reset = drm_atomic_helper_connector_reset, .detect = omap_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes,drivers/gpu/drm/pl111/pl111_connector.c +0
-1@@ -69,7 +69,6 @@ const struct drm_connector_funcs connector_funcs = { .fill_modes = drm_helper_probe_single_connector_modes, .destroy = pl111_connector_destroy, .detect = pl111_connector_detect, - .dpms = drm_atomic_helper_connector_dpms, .reset = drm_atomic_helper_connector_reset, .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state,drivers/gpu/drm/rcar-du/rcar_du_lvdscon.c +0
-1@@ -46,7 +46,6 @@ static void rcar_du_lvds_connector_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .reset = drm_atomic_helper_connector_reset, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = rcar_du_lvds_connector_destroy,drivers/gpu/drm/rockchip/cdn-dp-core.c +0
-1@@ -254,7 +254,6 @@ static void cdn_dp_connector_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs cdn_dp_atomic_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = cdn_dp_connector_detect, .destroy = cdn_dp_connector_destroy, .fill_modes = drm_helper_probe_single_connector_modes,drivers/gpu/drm/rockchip/dw-mipi-dsi.c +0
-1@@ -1080,7 +1080,6 @@ static void dw_mipi_dsi_drm_connector_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs dw_mipi_dsi_atomic_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = dw_mipi_dsi_drm_connector_destroy, .reset = drm_atomic_helper_connector_reset,drivers/gpu/drm/rockchip/inno_hdmi.c +0
-1@@ -593,7 +593,6 @@ static void inno_hdmi_connector_destroy(struct drm_connector *connector) }static struct drm_connector_funcs inno_hdmi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = inno_hdmi_probe_single_connector_modes, .detect = inno_hdmi_connector_detect, .destroy = inno_hdmi_connector_destroy,drivers/gpu/drm/sti/sti_dvo.c +0
-1@@ -412,7 +412,6 @@ static int sti_dvo_late_register(struct drm_connector *connector) }static const struct drm_connector_funcs sti_dvo_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = sti_dvo_connector_detect, .destroy = drm_connector_cleanup,drivers/gpu/drm/sti/sti_hda.c +0
-1@@ -647,7 +647,6 @@ static int sti_hda_late_register(struct drm_connector *connector) }static const struct drm_connector_funcs sti_hda_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = drm_connector_cleanup, .reset = drm_atomic_helper_connector_reset,drivers/gpu/drm/sti/sti_hdmi.c +0
-1@@ -1113,7 +1113,6 @@ static int sti_hdmi_late_register(struct drm_connector *connector) }static const struct drm_connector_funcs sti_hdmi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = sti_hdmi_connector_detect, .destroy = drm_connector_cleanup,drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c +0
-1@@ -306,7 +306,6 @@ sun4i_hdmi_connector_detect(struct drm_connector *connector, bool force) }static const struct drm_connector_funcs sun4i_hdmi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = sun4i_hdmi_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = drm_connector_cleanup,drivers/gpu/drm/sun4i/sun4i_rgb.c +0
-1@@ -120,7 +120,6 @@ sun4i_rgb_connector_destroy(struct drm_connector *connector) }static struct drm_connector_funcs sun4i_rgb_con_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = sun4i_rgb_connector_destroy, .reset = drm_atomic_helper_connector_reset,drivers/gpu/drm/sun4i/sun4i_tv.c +0
-1@@ -546,7 +546,6 @@ sun4i_tv_comp_connector_destroy(struct drm_connector *connector) }static struct drm_connector_funcs sun4i_tv_comp_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = sun4i_tv_comp_connector_destroy, .reset = drm_atomic_helper_connector_reset,drivers/gpu/drm/tegra/dsi.c +0
-1@@ -815,7 +815,6 @@ tegra_dsi_connector_duplicate_state(struct drm_connector *connector) }static const struct drm_connector_funcs tegra_dsi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .reset = tegra_dsi_connector_reset, .detect = tegra_output_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes,drivers/gpu/drm/tegra/hdmi.c +0
-1@@ -902,7 +902,6 @@ tegra_hdmi_connector_detect(struct drm_connector *connector, bool force) }static const struct drm_connector_funcs tegra_hdmi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .reset = drm_atomic_helper_connector_reset, .detect = tegra_hdmi_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes,drivers/gpu/drm/tegra/rgb.c +0
-1@@ -88,7 +88,6 @@ static void tegra_dc_write_regs(struct tegra_dc *dc, }static const struct drm_connector_funcs tegra_rgb_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .reset = drm_atomic_helper_connector_reset, .detect = tegra_output_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes,drivers/gpu/drm/tegra/sor.c +0
-1@@ -1340,7 +1340,6 @@ tegra_sor_connector_duplicate_state(struct drm_connector *connector) }static const struct drm_connector_funcs tegra_sor_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .reset = tegra_sor_connector_reset, .detect = tegra_sor_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes,drivers/gpu/drm/tilcdc/tilcdc_panel.c +0
-1@@ -189,7 +189,6 @@ static struct drm_encoder *panel_connector_best_encoder(static const struct drm_connector_funcs panel_connector_funcs = { .destroy = panel_connector_destroy, - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .reset = drm_atomic_helper_connector_reset, .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,drivers/gpu/drm/tilcdc/tilcdc_tfp410.c +0
-1@@ -202,7 +202,6 @@ static struct drm_encoder *tfp410_connector_best_encoder(static const struct drm_connector_funcs tfp410_connector_funcs = { .destroy = tfp410_connector_destroy, - .dpms = drm_atomic_helper_connector_dpms, .detect = tfp410_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .reset = drm_atomic_helper_connector_reset,drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c +0
-1@@ -71,7 +71,6 @@ static void tinydrm_connector_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs tinydrm_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .reset = drm_atomic_helper_connector_reset, .detect = tinydrm_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes,drivers/gpu/drm/vc4/vc4_hdmi.c +0
-1@@ -265,7 +265,6 @@ static int vc4_hdmi_connector_get_modes(struct drm_connector *connector) }static const struct drm_connector_funcs vc4_hdmi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = vc4_hdmi_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = vc4_hdmi_connector_destroy,drivers/gpu/drm/vc4/vc4_vec.c +0
-1@@ -366,7 +366,6 @@ static int vc4_vec_connector_get_modes(struct drm_connector *connector) }static const struct drm_connector_funcs vc4_vec_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = vc4_vec_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = vc4_vec_connector_destroy,drivers/gpu/drm/virtio/virtgpu_display.c +0
-1@@ -252,7 +252,6 @@ static void virtio_gpu_conn_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs virtio_gpu_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = virtio_gpu_conn_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = virtio_gpu_conn_destroy,drivers/gpu/drm/zte/zx_hdmi.c +0
-1@@ -300,7 +300,6 @@ zx_hdmi_connector_detect(struct drm_connector *connector, bool force) }static const struct drm_connector_funcs zx_hdmi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = zx_hdmi_connector_detect, .destroy = drm_connector_cleanup,drivers/gpu/drm/zte/zx_tvenc.c +0
-1@@ -269,7 +269,6 @@ static struct drm_connector_helper_funcs zx_tvenc_connector_helper_funcs = { };static const struct drm_connector_funcs zx_tvenc_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = drm_connector_cleanup, .reset = drm_atomic_helper_connector_reset,drivers/gpu/drm/zte/zx_vga.c +0
-1@@ -138,7 +138,6 @@ zx_vga_connector_detect(struct drm_connector *connector, bool force) }static const struct drm_connector_funcs zx_vga_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = zx_vga_connector_detect, .destroy = drm_connector_cleanup,include/drm/drm_atomic_helper.h +0
-0
include/drm/drm_atomic_helper.h int drm_atomic_helper_page_flip_target( · line 141
Quoted 8 lines
include/drm/drm_atomic_helper.h +0
-2@@ -136,8 +136,6 @@ int drm_atomic_helper_page_flip_target(uint32_t flags, uint32_t target, struct drm_modeset_acquire_ctx *ctx); -int drm_atomic_helper_connector_dpms (struct drm_connector *connector, -int mode);struct drm_encoder *drm_atomic_helper_best_encoder (struct drm_connector *connector);
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 7/8] drm: Nuke drm_atomic_helper_connector_dpms
In reply to Daniel VetterQuoted 36 lines · Daniel Vetter
It's dead code, the core handles all this directly now.
The only special case is nouveau and tda988x which used one function for both legacy modeset code and -nv50 atomic world instead of 2 vtables. But amounts to exactly the same.
v2: Rebase over the panel/brideg refactorings in stm/ltdc.
Signed-off-by Daniel Vetter <[email protected]>Cc Archit Taneja <[email protected]>Cc Andrzej Hajda <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Peter Senna Tschudin <[email protected]>Cc Martin Donnelly <[email protected]>Cc Martyn Welch <[email protected]>Cc Daniel Vetter <[email protected]>Cc Jani Nikula <[email protected]>Cc Sean Paul <[email protected]>Cc David Airlie <[email protected]>Cc Inki Dae <[email protected]>Cc Joonyoung Shim <[email protected]>Cc Seung-Woo Kim <[email protected]>Cc Kyungmin Park <[email protected]>Cc Kukjin Kim <[email protected]>Cc Krzysztof Kozlowski <[email protected]>Cc Stefan Agner <[email protected]>Cc Alison Wang <[email protected]>Cc Russell King <[email protected]>Cc Philipp Zabel <[email protected]>Cc CK Hu <[email protected]>Cc Matthias Brugger <[email protected]>Cc Neil Armstrong <[email protected]>Cc Carlo Caione <[email protected]>Cc Kevin Hilman <[email protected]>Cc Marek Vasut <[email protected]>Cc Ben Skeggs <[email protected]>
Quoted 8 lines
Cc Tomi Valkeinen <[email protected]>Cc Eric Anholt <[email protected]>Cc Mark Yao <[email protected]>Cc Heiko Stuebner <[email protected]>Cc Benjamin Gaignard <[email protected]>Cc Vincent Abriou <[email protected]>Cc Yannick Fertre <[email protected]>Cc Philippe Cornu <[email protected]>
Many thanks
Philippe :-)
Quoted 1,032 lines
Cc Maxime Ripard <[email protected]>Cc Chen-Yu Tsai <[email protected]>Cc Thierry Reding <[email protected]>Cc Jonathan Hunter <[email protected]>Cc Jyri Sarha <[email protected]>Cc Gerd Hoffmann <[email protected]>Cc Shawn Guo <[email protected]>Cc John Stultz <[email protected]>Cc Lars-Peter Clausen <[email protected]>Cc Sergei Shtylyov <[email protected]>Cc Jeffy Chen <[email protected]>Cc Tomeu Vizoso <[email protected]>Cc Yakir Yang <[email protected]>Cc Marek Szyprowski <[email protected]>Cc Jose Abreu <[email protected]>Cc Romain Perier <[email protected]>Cc Kieran Bingham <[email protected]>Cc Xinliang Liu <[email protected]>Cc Alexey Brodkin <[email protected]>Cc Alex Deucher <[email protected]>Cc Rongrong Zou <[email protected]>Cc Rob Clark <[email protected]>Cc Hai Li <[email protected]>Cc "Noralf Trønnes" <[email protected]>Cc zain wang <[email protected]>Cc Baoyou Xie <[email protected]>Cc Boris Brezillon <[email protected]>--- drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 1 - drivers/gpu/drm/bridge/analogix-anx78xx.c | 1 - drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 1 - drivers/gpu/drm/bridge/dumb-vga-dac.c | 1 - .../drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c | 1 - drivers/gpu/drm/bridge/nxp-ptn3460.c | 1 - drivers/gpu/drm/bridge/panel.c | 1 - drivers/gpu/drm/bridge/parade-ps8622.c | 1 - drivers/gpu/drm/bridge/sii902x.c | 1 - drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 1 - drivers/gpu/drm/bridge/tc358767.c | 1 - drivers/gpu/drm/bridge/ti-tfp410.c | 1 - drivers/gpu/drm/drm_atomic_helper.c | 79 ---------------------- drivers/gpu/drm/exynos/exynos_drm_dpi.c | 1 - drivers/gpu/drm/exynos/exynos_drm_dsi.c | 1 - drivers/gpu/drm/exynos/exynos_drm_vidi.c | 1 - drivers/gpu/drm/exynos/exynos_hdmi.c | 1 - drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c | 1 - drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 1 - drivers/gpu/drm/i2c/tda998x_drv.c | 10 +-- drivers/gpu/drm/i915/intel_crt.c | 1 - drivers/gpu/drm/i915/intel_dp.c | 1 - drivers/gpu/drm/i915/intel_dp_mst.c | 1 - drivers/gpu/drm/i915/intel_dsi.c | 1 - drivers/gpu/drm/i915/intel_dvo.c | 1 - drivers/gpu/drm/i915/intel_hdmi.c | 1 - drivers/gpu/drm/i915/intel_lvds.c | 1 - drivers/gpu/drm/i915/intel_sdvo.c | 1 - drivers/gpu/drm/i915/intel_tv.c | 1 - drivers/gpu/drm/imx/imx-ldb.c | 1 - drivers/gpu/drm/imx/imx-tve.c | 1 - drivers/gpu/drm/imx/parallel-display.c | 1 - drivers/gpu/drm/mediatek/mtk_dsi.c | 1 - drivers/gpu/drm/mediatek/mtk_hdmi.c | 1 - drivers/gpu/drm/meson/meson_venc_cvbs.c | 1 - drivers/gpu/drm/msm/dsi/dsi_manager.c | 1 - drivers/gpu/drm/msm/edp/edp_connector.c | 1 - drivers/gpu/drm/msm/hdmi/hdmi_connector.c | 1 - drivers/gpu/drm/msm/mdp/mdp4/mdp4_lvds_connector.c | 1 - drivers/gpu/drm/mxsfb/mxsfb_out.c | 1 - drivers/gpu/drm/nouveau/nouveau_connector.c | 12 +--- drivers/gpu/drm/nouveau/nv50_display.c | 1 - drivers/gpu/drm/omapdrm/omap_connector.c | 1 - drivers/gpu/drm/pl111/pl111_connector.c | 1 - drivers/gpu/drm/rcar-du/rcar_du_lvdscon.c | 1 - drivers/gpu/drm/rockchip/cdn-dp-core.c | 1 - drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 1 - drivers/gpu/drm/rockchip/inno_hdmi.c | 1 - drivers/gpu/drm/sti/sti_dvo.c | 1 - drivers/gpu/drm/sti/sti_hda.c | 1 - drivers/gpu/drm/sti/sti_hdmi.c | 1 - drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 1 - drivers/gpu/drm/sun4i/sun4i_rgb.c | 1 - drivers/gpu/drm/sun4i/sun4i_tv.c | 1 - drivers/gpu/drm/tegra/dsi.c | 1 - drivers/gpu/drm/tegra/hdmi.c | 1 - drivers/gpu/drm/tegra/rgb.c | 1 - drivers/gpu/drm/tegra/sor.c | 1 - drivers/gpu/drm/tilcdc/tilcdc_panel.c | 1 - drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 1 - drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c | 1 - drivers/gpu/drm/vc4/vc4_hdmi.c | 1 - drivers/gpu/drm/vc4/vc4_vec.c | 1 - drivers/gpu/drm/virtio/virtgpu_display.c | 1 - drivers/gpu/drm/zte/zx_hdmi.c | 1 - drivers/gpu/drm/zte/zx_tvenc.c | 1 - drivers/gpu/drm/zte/zx_vga.c | 1 - include/drm/drm_atomic_helper.h | 2 - 68 files changed, 3 insertions(+), 164 deletions(-)drivers/gpu/drm/bridge/adv7511/adv7511_drv.c +0
-1@@ -786,7 +786,6 @@ adv7511_connector_detect(struct drm_connector *connector, bool force) }static struct drm_connector_funcs adv7511_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = adv7511_connector_detect, .destroy = drm_connector_cleanup,drivers/gpu/drm/bridge/analogix-anx78xx.c +0
-1@@ -1002,7 +1002,6 @@ static enum drm_connector_status anx78xx_detect(struct drm_connector *connector, }static const struct drm_connector_funcs anx78xx_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = anx78xx_detect, .destroy = drm_connector_cleanup,drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +0
-1@@ -1005,7 +1005,6 @@ analogix_dp_detect(struct drm_connector *connector, bool force) }static const struct drm_connector_funcs analogix_dp_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = analogix_dp_detect, .destroy = drm_connector_cleanup,drivers/gpu/drm/bridge/dumb-vga-dac.c +0
-1@@ -92,7 +92,6 @@ dumb_vga_connector_detect(struct drm_connector *connector, bool force) }static const struct drm_connector_funcs dumb_vga_con_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = dumb_vga_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = drm_connector_cleanup,drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c +0
-1@@ -193,7 +193,6 @@ static enum drm_connector_status ge_b850v3_lvds_detect( }static const struct drm_connector_funcs ge_b850v3_lvds_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = ge_b850v3_lvds_detect, .destroy = drm_connector_cleanup,drivers/gpu/drm/bridge/nxp-ptn3460.c +0
-1@@ -238,7 +238,6 @@ static const struct drm_connector_helper_funcs ptn3460_connector_helper_funcs = };static const struct drm_connector_funcs ptn3460_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = drm_connector_cleanup, .reset = drm_atomic_helper_connector_reset,drivers/gpu/drm/bridge/panel.c +0
-1@@ -50,7 +50,6 @@ panel_bridge_connector_helper_funcs = { };static const struct drm_connector_funcs panel_bridge_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .reset = drm_atomic_helper_connector_reset, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = drm_connector_cleanup,drivers/gpu/drm/bridge/parade-ps8622.c +0
-1@@ -476,7 +476,6 @@ static const struct drm_connector_helper_funcs ps8622_connector_helper_funcs = { };static const struct drm_connector_funcs ps8622_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = drm_connector_cleanup, .reset = drm_atomic_helper_connector_reset,drivers/gpu/drm/bridge/sii902x.c +0
-1@@ -124,7 +124,6 @@ sii902x_connector_detect(struct drm_connector *connector, bool force) }static const struct drm_connector_funcs sii902x_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = sii902x_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = drm_connector_cleanup,drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +0
-1@@ -1920,7 +1920,6 @@ static void dw_hdmi_connector_force(struct drm_connector *connector) }static const struct drm_connector_funcs dw_hdmi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = dw_hdmi_connector_detect, .destroy = drm_connector_cleanup,drivers/gpu/drm/bridge/tc358767.c +0
-1@@ -1160,7 +1160,6 @@ static const struct drm_connector_helper_funcs tc_connector_helper_funcs = { };static const struct drm_connector_funcs tc_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = drm_connector_cleanup, .reset = drm_atomic_helper_connector_reset,drivers/gpu/drm/bridge/ti-tfp410.c +0
-1@@ -102,7 +102,6 @@ tfp410_connector_detect(struct drm_connector *connector, bool force) }static const struct drm_connector_funcs tfp410_con_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = tfp410_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = drm_connector_cleanup,drivers/gpu/drm/drm_atomic_helper.c +0
-79@@ -3102,85 +3102,6 @@ int drm_atomic_helper_page_flip_target(struct drm_crtc *crtc,EXPORT_SYMBOL (drm_atomic_helper_page_flip_target);/** -* drm_atomic_helper_connector_dpms() - connector dpms helper implementation -* @connector: affected connector -* @mode: DPMS mode -* -* This is the main helper function provided by the atomic helper framework for -* implementing the legacy DPMS connector interface. It computes the new desired -* &drm_crtc_state.active state for the corresponding CRTC (if the connector is -* enabled) and updates it. -* -* Returns: -* Returns 0 on success, negative errno numbers on failure. -*/ -int drm_atomic_helper_connector_dpms (struct drm_connector *connector, -int mode) -{ -struct drm_mode_config *config = &connector->dev->mode_config; -struct drm_atomic_state *state; -struct drm_crtc_state *crtc_state; -struct drm_crtc *crtc; -struct drm_connector *tmp_connector; -struct drm_connector_list_iter conn_iter; -int ret; -bool active = false; -int old_mode = connector->dpms; - -if (mode !=DRM_MODE_DPMS_ON ) - mode =DRM_MODE_DPMS_OFF ; - - connector->dpms = mode; - crtc = connector->state->crtc; - -if (!crtc) -return 0 ; - - state =drm_atomic_state_alloc (connector->dev); -if (!state) -return -ENOMEM ; - - state->acquire_ctx = crtc->dev->mode_config.acquire_ctx; -retry: - crtc_state =drm_atomic_get_crtc_state (state, crtc); -if (IS_ERR (crtc_state)) { - ret =PTR_ERR (crtc_state); - goto fail; - } - -WARN_ON (!drm_modeset_is_locked (&config->connection_mutex)); - -drm_connector_list_iter_begin (connector->dev, &conn_iter); -drm_for_each_connector_iter (tmp_connector, &conn_iter) { -if (tmp_connector->state->crtc != crtc) -continue ; - -if (tmp_connector->dpms ==DRM_MODE_DPMS_ON ) { - active = true; -break ; - } - } -drm_connector_list_iter_end (&conn_iter); - crtc_state->active = active; - - ret =drm_atomic_commit (state); -fail: -if (ret == -EDEADLK ) - goto backoff; -if (ret !=0 ) - connector->dpms = old_mode; -drm_atomic_state_put (state); -return ret; - -backoff: -drm_atomic_state_clear (state); -drm_atomic_legacy_backoff (state); - - goto retry; -} -EXPORT_SYMBOL (drm_atomic_helper_connector_dpms); - -/** * drm_atomic_helper_best_encoder - Helper for * &drm_connector_helper_funcs.best_encoder callback * @connector: Connector control structure drivers/gpu/drm/exynos/exynos_drm_dpi.c +0
-1@@ -59,7 +59,6 @@ static void exynos_dpi_connector_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs exynos_dpi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = exynos_dpi_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = exynos_dpi_connector_destroy,drivers/gpu/drm/exynos/exynos_drm_dsi.c +0
-1@@ -1537,7 +1537,6 @@ static void exynos_dsi_connector_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs exynos_dsi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = exynos_dsi_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = exynos_dsi_connector_destroy,drivers/gpu/drm/exynos/exynos_drm_vidi.c +0
-1@@ -289,7 +289,6 @@ static void vidi_connector_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs vidi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = vidi_detect, .destroy = vidi_connector_destroy,drivers/gpu/drm/exynos/exynos_hdmi.c +0
-1@@ -835,7 +835,6 @@ static void hdmi_connector_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs hdmi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = hdmi_detect, .destroy = hdmi_connector_destroy,drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c +0
-1@@ -63,7 +63,6 @@ static const struct drm_connector_funcs fsl_dcu_drm_connector_funcs = { .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, .destroy = fsl_dcu_drm_connector_destroy, - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .reset = drm_atomic_helper_connector_reset, };drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c +0
-1@@ -47,7 +47,6 @@ static const struct drm_connector_helper_funcs };static const struct drm_connector_funcs hibmc_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = drm_connector_cleanup, .reset = drm_atomic_helper_connector_reset,drivers/gpu/drm/i2c/tda998x_drv.c +1
-9@@ -969,14 +969,6 @@ static int tda998x_audio_codec_init(struct tda998x_priv *priv,/* DRM connector functions */ -static int tda998x_connector_dpms (struct drm_connector *connector,int mode) -{ -if (drm_core_check_feature (connector->dev,DRIVER_ATOMIC )) -return drm_atomic_helper_connector_dpms (connector, mode); -else -return drm_helper_connector_dpms (connector, mode); -} -static int tda998x_connector_fill_modes (struct drm_connector *connector,uint32_t maxX,uint32_t maxY) {@@ -1014,7 +1006,7 @@ static void tda998x_connector_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs tda998x_connector_funcs = { - .dpms = tda998x_connector_dpms, + .dpms = drm_helper_connector_dpms, .reset = drm_atomic_helper_connector_reset, .fill_modes = tda998x_connector_fill_modes, .detect = tda998x_connector_detect,drivers/gpu/drm/i915/intel_crt.c +0
-1@@ -802,7 +802,6 @@ void intel_crt_reset(struct drm_encoder *encoder)*/ static const struct drm_connector_funcs intel_crt_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .late_register = intel_connector_register, .early_unregister = intel_connector_unregister,drivers/gpu/drm/i915/intel_dp.c +0
-1@@ -5007,7 +5007,6 @@ void intel_dp_encoder_reset(struct drm_encoder *encoder) }static const struct drm_connector_funcs intel_dp_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .force = intel_dp_force, .fill_modes = drm_helper_probe_single_connector_modes, .atomic_get_property = intel_digital_connector_atomic_get_property,drivers/gpu/drm/i915/intel_dp_mst.c +0
-1@@ -346,7 +346,6 @@ intel_dp_mst_connector_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs intel_dp_mst_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = intel_dp_mst_detect, .fill_modes = drm_helper_probe_single_connector_modes, .late_register = intel_connector_register,drivers/gpu/drm/i915/intel_dsi.c +0
-1@@ -1653,7 +1653,6 @@ static const struct drm_connector_helper_funcs intel_dsi_connector_helper_funcs };static const struct drm_connector_funcs intel_dsi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .late_register = intel_connector_register, .early_unregister = intel_connector_unregister, .destroy = intel_dsi_connector_destroy,drivers/gpu/drm/i915/intel_dvo.c +0
-1@@ -344,7 +344,6 @@ static void intel_dvo_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs intel_dvo_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = intel_dvo_detect, .late_register = intel_connector_register, .early_unregister = intel_connector_unregister,drivers/gpu/drm/i915/intel_hdmi.c +0
-1@@ -1761,7 +1761,6 @@ static void intel_hdmi_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs intel_hdmi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = intel_hdmi_detect, .force = intel_hdmi_force, .fill_modes = drm_helper_probe_single_connector_modes,drivers/gpu/drm/i915/intel_lvds.c +0
-1@@ -595,7 +595,6 @@ static const struct drm_connector_helper_funcs intel_lvds_connector_helper_funcs };static const struct drm_connector_funcs intel_lvds_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = intel_lvds_detect, .fill_modes = drm_helper_probe_single_connector_modes, .atomic_get_property = intel_digital_connector_atomic_get_property,drivers/gpu/drm/i915/intel_sdvo.c +0
-1@@ -2193,7 +2193,6 @@ intel_sdvo_connector_duplicate_state(struct drm_connector *connector) }static const struct drm_connector_funcs intel_sdvo_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = intel_sdvo_detect, .fill_modes = drm_helper_probe_single_connector_modes, .atomic_get_property = intel_sdvo_connector_atomic_get_property,drivers/gpu/drm/i915/intel_tv.c +0
-1@@ -1407,7 +1407,6 @@ intel_tv_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs intel_tv_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .late_register = intel_connector_register, .early_unregister = intel_connector_unregister, .destroy = intel_tv_destroy,drivers/gpu/drm/imx/imx-ldb.c +0
-1@@ -389,7 +389,6 @@ static int imx_ldb_encoder_atomic_check(struct drm_encoder *encoder,static const struct drm_connector_funcs imx_ldb_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = imx_drm_connector_destroy, .reset = drm_atomic_helper_connector_reset,drivers/gpu/drm/imx/imx-tve.c +0
-1@@ -341,7 +341,6 @@ static int imx_tve_atomic_check(struct drm_encoder *encoder, }static const struct drm_connector_funcs imx_tve_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = imx_drm_connector_destroy, .reset = drm_atomic_helper_connector_reset,drivers/gpu/drm/imx/parallel-display.c +0
-1@@ -135,7 +135,6 @@ static int imx_pd_encoder_atomic_check(struct drm_encoder *encoder, }static const struct drm_connector_funcs imx_pd_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = imx_drm_connector_destroy, .reset = drm_atomic_helper_connector_reset,drivers/gpu/drm/mediatek/mtk_dsi.c +0
-1@@ -766,7 +766,6 @@ static const struct drm_encoder_helper_funcs mtk_dsi_encoder_helper_funcs = { };static const struct drm_connector_funcs mtk_dsi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = drm_connector_cleanup, .reset = drm_atomic_helper_connector_reset,drivers/gpu/drm/mediatek/mtk_hdmi.c +0
-1@@ -1261,7 +1261,6 @@ static struct drm_encoder *mtk_hdmi_conn_best_enc(struct drm_connector *conn) }static const struct drm_connector_funcs mtk_hdmi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = hdmi_conn_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = hdmi_conn_destroy,drivers/gpu/drm/meson/meson_venc_cvbs.c +0
-1@@ -118,7 +118,6 @@ static int meson_cvbs_connector_mode_valid(struct drm_connector *connector, }static const struct drm_connector_funcs meson_cvbs_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = meson_cvbs_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = meson_cvbs_connector_destroy,drivers/gpu/drm/msm/dsi/dsi_manager.c +0
-1@@ -626,7 +626,6 @@ static void dsi_mgr_bridge_mode_set(struct drm_bridge *bridge, }static const struct drm_connector_funcs dsi_mgr_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = dsi_mgr_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = dsi_mgr_connector_destroy,drivers/gpu/drm/msm/edp/edp_connector.c +0
-1@@ -92,7 +92,6 @@ static int edp_connector_mode_valid(struct drm_connector *connector, }static const struct drm_connector_funcs edp_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = edp_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = edp_connector_destroy,drivers/gpu/drm/msm/hdmi/hdmi_connector.c +0
-1@@ -407,7 +407,6 @@ static int msm_hdmi_connector_mode_valid(struct drm_connector *connector, }static const struct drm_connector_funcs hdmi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = hdmi_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = hdmi_connector_destroy,drivers/gpu/drm/msm/mdp/mdp4/mdp4_lvds_connector.c +0
-1@@ -91,7 +91,6 @@ static int mdp4_lvds_connector_mode_valid(struct drm_connector *connector, }static const struct drm_connector_funcs mdp4_lvds_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = mdp4_lvds_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = mdp4_lvds_connector_destroy,drivers/gpu/drm/mxsfb/mxsfb_out.c +0
-1@@ -74,7 +74,6 @@ static void mxsfb_panel_connector_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs mxsfb_panel_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = mxsfb_panel_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = mxsfb_panel_connector_destroy,drivers/gpu/drm/nouveau/nouveau_connector.c +2
-10@@ -1072,17 +1072,9 @@ nouveau_connector_helper_funcs = { .best_encoder = nouveau_connector_best_encoder, }; -static int -nouveau_connector_dpms (struct drm_connector *connector,int mode) -{ -if (drm_drv_uses_atomic_modeset (connector->dev)) -return drm_atomic_helper_connector_dpms (connector, mode); -return drm_helper_connector_dpms (connector, mode); -} -static const struct drm_connector_funcs nouveau_connector_funcs = { - .dpms = nouveau_connector_dpms, + .dpms = drm_helper_connector_dpms, .reset = nouveau_conn_reset, .detect = nouveau_connector_detect, .force = nouveau_connector_force,@@ -1097,7 +1089,7 @@ nouveau_connector_funcs = {static const struct drm_connector_funcs nouveau_connector_funcs_lvds = { - .dpms = nouveau_connector_dpms, + .dpms = drm_helper_connector_dpms, .reset = nouveau_conn_reset, .detect = nouveau_connector_detect_lvds, .force = nouveau_connector_force,drivers/gpu/drm/nouveau/nv50_display.c +0
-1@@ -3118,7 +3118,6 @@ nv50_mstc_destroy(struct drm_connector *connector)static const struct drm_connector_funcs nv50_mstc = { - .dpms = drm_atomic_helper_connector_dpms, .reset = nouveau_conn_reset, .detect = nv50_mstc_detect, .fill_modes = drm_helper_probe_single_connector_modes,drivers/gpu/drm/omapdrm/omap_connector.c +0
-1@@ -195,7 +195,6 @@ static int omap_connector_mode_valid(struct drm_connector *connector, }static const struct drm_connector_funcs omap_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .reset = drm_atomic_helper_connector_reset, .detect = omap_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes,drivers/gpu/drm/pl111/pl111_connector.c +0
-1@@ -69,7 +69,6 @@ const struct drm_connector_funcs connector_funcs = { .fill_modes = drm_helper_probe_single_connector_modes, .destroy = pl111_connector_destroy, .detect = pl111_connector_detect, - .dpms = drm_atomic_helper_connector_dpms, .reset = drm_atomic_helper_connector_reset, .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state,drivers/gpu/drm/rcar-du/rcar_du_lvdscon.c +0
-1@@ -46,7 +46,6 @@ static void rcar_du_lvds_connector_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .reset = drm_atomic_helper_connector_reset, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = rcar_du_lvds_connector_destroy,drivers/gpu/drm/rockchip/cdn-dp-core.c +0
-1@@ -254,7 +254,6 @@ static void cdn_dp_connector_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs cdn_dp_atomic_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = cdn_dp_connector_detect, .destroy = cdn_dp_connector_destroy, .fill_modes = drm_helper_probe_single_connector_modes,drivers/gpu/drm/rockchip/dw-mipi-dsi.c +0
-1@@ -1080,7 +1080,6 @@ static void dw_mipi_dsi_drm_connector_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs dw_mipi_dsi_atomic_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = dw_mipi_dsi_drm_connector_destroy, .reset = drm_atomic_helper_connector_reset,drivers/gpu/drm/rockchip/inno_hdmi.c +0
-1@@ -593,7 +593,6 @@ static void inno_hdmi_connector_destroy(struct drm_connector *connector) }static struct drm_connector_funcs inno_hdmi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = inno_hdmi_probe_single_connector_modes, .detect = inno_hdmi_connector_detect, .destroy = inno_hdmi_connector_destroy,drivers/gpu/drm/sti/sti_dvo.c +0
-1@@ -412,7 +412,6 @@ static int sti_dvo_late_register(struct drm_connector *connector) }static const struct drm_connector_funcs sti_dvo_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = sti_dvo_connector_detect, .destroy = drm_connector_cleanup,drivers/gpu/drm/sti/sti_hda.c +0
-1@@ -647,7 +647,6 @@ static int sti_hda_late_register(struct drm_connector *connector) }static const struct drm_connector_funcs sti_hda_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = drm_connector_cleanup, .reset = drm_atomic_helper_connector_reset,drivers/gpu/drm/sti/sti_hdmi.c +0
-1@@ -1113,7 +1113,6 @@ static int sti_hdmi_late_register(struct drm_connector *connector) }static const struct drm_connector_funcs sti_hdmi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = sti_hdmi_connector_detect, .destroy = drm_connector_cleanup,drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c +0
-1@@ -306,7 +306,6 @@ sun4i_hdmi_connector_detect(struct drm_connector *connector, bool force) }static const struct drm_connector_funcs sun4i_hdmi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = sun4i_hdmi_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = drm_connector_cleanup,drivers/gpu/drm/sun4i/sun4i_rgb.c +0
-1@@ -120,7 +120,6 @@ sun4i_rgb_connector_destroy(struct drm_connector *connector) }static struct drm_connector_funcs sun4i_rgb_con_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = sun4i_rgb_connector_destroy, .reset = drm_atomic_helper_connector_reset,drivers/gpu/drm/sun4i/sun4i_tv.c +0
-1@@ -546,7 +546,6 @@ sun4i_tv_comp_connector_destroy(struct drm_connector *connector) }static struct drm_connector_funcs sun4i_tv_comp_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = sun4i_tv_comp_connector_destroy, .reset = drm_atomic_helper_connector_reset,drivers/gpu/drm/tegra/dsi.c +0
-1@@ -815,7 +815,6 @@ tegra_dsi_connector_duplicate_state(struct drm_connector *connector) }static const struct drm_connector_funcs tegra_dsi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .reset = tegra_dsi_connector_reset, .detect = tegra_output_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes,drivers/gpu/drm/tegra/hdmi.c +0
-1@@ -902,7 +902,6 @@ tegra_hdmi_connector_detect(struct drm_connector *connector, bool force) }static const struct drm_connector_funcs tegra_hdmi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .reset = drm_atomic_helper_connector_reset, .detect = tegra_hdmi_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes,drivers/gpu/drm/tegra/rgb.c +0
-1@@ -88,7 +88,6 @@ static void tegra_dc_write_regs(struct tegra_dc *dc, }static const struct drm_connector_funcs tegra_rgb_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .reset = drm_atomic_helper_connector_reset, .detect = tegra_output_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes,drivers/gpu/drm/tegra/sor.c +0
-1@@ -1340,7 +1340,6 @@ tegra_sor_connector_duplicate_state(struct drm_connector *connector) }static const struct drm_connector_funcs tegra_sor_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .reset = tegra_sor_connector_reset, .detect = tegra_sor_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes,drivers/gpu/drm/tilcdc/tilcdc_panel.c +0
-1@@ -189,7 +189,6 @@ static struct drm_encoder *panel_connector_best_encoder(static const struct drm_connector_funcs panel_connector_funcs = { .destroy = panel_connector_destroy, - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .reset = drm_atomic_helper_connector_reset, .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,drivers/gpu/drm/tilcdc/tilcdc_tfp410.c +0
-1@@ -202,7 +202,6 @@ static struct drm_encoder *tfp410_connector_best_encoder(static const struct drm_connector_funcs tfp410_connector_funcs = { .destroy = tfp410_connector_destroy, - .dpms = drm_atomic_helper_connector_dpms, .detect = tfp410_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .reset = drm_atomic_helper_connector_reset,drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c +0
-1@@ -71,7 +71,6 @@ static void tinydrm_connector_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs tinydrm_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .reset = drm_atomic_helper_connector_reset, .detect = tinydrm_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes,drivers/gpu/drm/vc4/vc4_hdmi.c +0
-1@@ -265,7 +265,6 @@ static int vc4_hdmi_connector_get_modes(struct drm_connector *connector) }static const struct drm_connector_funcs vc4_hdmi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = vc4_hdmi_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = vc4_hdmi_connector_destroy,drivers/gpu/drm/vc4/vc4_vec.c +0
-1@@ -366,7 +366,6 @@ static int vc4_vec_connector_get_modes(struct drm_connector *connector) }static const struct drm_connector_funcs vc4_vec_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = vc4_vec_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = vc4_vec_connector_destroy,drivers/gpu/drm/virtio/virtgpu_display.c +0
-1@@ -252,7 +252,6 @@ static void virtio_gpu_conn_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs virtio_gpu_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .detect = virtio_gpu_conn_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = virtio_gpu_conn_destroy,drivers/gpu/drm/zte/zx_hdmi.c +0
-1@@ -300,7 +300,6 @@ zx_hdmi_connector_detect(struct drm_connector *connector, bool force) }static const struct drm_connector_funcs zx_hdmi_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = zx_hdmi_connector_detect, .destroy = drm_connector_cleanup,drivers/gpu/drm/zte/zx_tvenc.c +0
-1@@ -269,7 +269,6 @@ static struct drm_connector_helper_funcs zx_tvenc_connector_helper_funcs = { };static const struct drm_connector_funcs zx_tvenc_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = drm_connector_cleanup, .reset = drm_atomic_helper_connector_reset,drivers/gpu/drm/zte/zx_vga.c +0
-1@@ -138,7 +138,6 @@ zx_vga_connector_detect(struct drm_connector *connector, bool force) }static const struct drm_connector_funcs zx_vga_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = zx_vga_connector_detect, .destroy = drm_connector_cleanup,include/drm/drm_atomic_helper.h +0
-0
include/drm/drm_atomic_helper.h int drm_atomic_helper_page_flip_target( · line 141
Quoted 8 lines
include/drm/drm_atomic_helper.h +0
-2@@ -136,8 +136,6 @@ int drm_atomic_helper_page_flip_target(uint32_t flags, uint32_t target, struct drm_modeset_acquire_ctx *ctx); -int drm_atomic_helper_connector_dpms (struct drm_connector *connector, -int mode);struct drm_encoder *drm_atomic_helper_best_encoder (struct drm_connector *connector);
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Re: [PATCH 7/8] drm: Nuke drm_atomic_helper_connector_dpms
In reply to Daniel VetterHi Daniel,
Thank you for the patch.
Quoted 9 lines · On Tuesday 25 Jul 2017 10:01:21 Daniel Vetter wrote:
It's dead code, the core handles all this directly now.
The only special case is nouveau and tda988x which used one function for both legacy modeset code and -nv50 atomic world instead of 2 vtables. But amounts to exactly the same.
v2: Rebase over the panel/brideg refactorings in stm/ltdc.
Signed-off-by Daniel Vetter <[email protected]>
[snip]
Quoted 8 lines
--- drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 1 - drivers/gpu/drm/bridge/dumb-vga-dac.c | 1 - drivers/gpu/drm/bridge/panel.c | 1 - drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 1 - drivers/gpu/drm/drm_atomic_helper.c | 79 ------------------- drivers/gpu/drm/omapdrm/omap_connector.c | 1 - drivers/gpu/drm/rcar-du/rcar_du_lvdscon.c | 1 -
For the above,
Signature · 8 lines
Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 7/8] drm: Nuke drm_atomic_helper_connector_dpms
In reply to Daniel VetterHi Daniel,
Thank you for the patch.
Quoted 9 lines · On Tuesday 25 Jul 2017 10:01:21 Daniel Vetter wrote:
It's dead code, the core handles all this directly now.
The only special case is nouveau and tda988x which used one function for both legacy modeset code and -nv50 atomic world instead of 2 vtables. But amounts to exactly the same.
v2: Rebase over the panel/brideg refactorings in stm/ltdc.
Signed-off-by Daniel Vetter <[email protected]>
[snip]
Quoted 8 lines
--- drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 1 - drivers/gpu/drm/bridge/dumb-vga-dac.c | 1 - drivers/gpu/drm/bridge/panel.c | 1 - drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 1 - drivers/gpu/drm/drm_atomic_helper.c | 79 ------------------- drivers/gpu/drm/omapdrm/omap_connector.c | 1 - drivers/gpu/drm/rcar-du/rcar_du_lvdscon.c | 1 -
For the above,
Signature · 3 lines
Regards, Laurent Pinchart
Re: [PATCH 7/8] drm: Nuke drm_atomic_helper_connector_dpms
In reply to Daniel VetterQuoted 9 lines · Daniel Vetter
It's dead code, the core handles all this directly now.
The only special case is nouveau and tda988x which used one function for both legacy modeset code and -nv50 atomic world instead of 2 vtables. But amounts to exactly the same.
v2: Rebase over the panel/brideg refactorings in stm/ltdc.
Signed-off-by Daniel Vetter <[email protected]>
...
Quoted 3 lines
drivers/gpu/drm/zte/zx_hdmi.c | 1 - drivers/gpu/drm/zte/zx_tvenc.c | 1 - drivers/gpu/drm/zte/zx_vga.c | 1 -
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 7/8] drm: Nuke drm_atomic_helper_connector_dpms
In reply to Daniel VetterQuoted 9 lines · Daniel Vetter
It's dead code, the core handles all this directly now.
The only special case is nouveau and tda988x which used one function for both legacy modeset code and -nv50 atomic world instead of 2 vtables. But amounts to exactly the same.
v2: Rebase over the panel/brideg refactorings in stm/ltdc.
Signed-off-by Daniel Vetter <[email protected]>
...
Quoted 3 lines
drivers/gpu/drm/zte/zx_hdmi.c | 1 - drivers/gpu/drm/zte/zx_tvenc.c | 1 - drivers/gpu/drm/zte/zx_vga.c | 1 -
Re: [PATCH 7/8] drm: Nuke drm_atomic_helper_connector_dpms
In reply to Daniel VetterDen 25.07.2017 10.01, skrev Daniel Vetter:
Quoted 9 lines
It's dead code, the core handles all this directly now.
The only special case is nouveau and tda988x which used one function for both legacy modeset code and -nv50 atomic world instead of 2 vtables. But amounts to exactly the same.
v2: Rebase over the panel/brideg refactorings in stm/ltdc.
Signed-off-by Daniel Vetter <[email protected]>
...
drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c static void tinydrm_connector_destroy(struct drm_connector *connector) · line 76
Quoted 12 lines
drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c +0
-1@@ -71,7 +71,6 @@ static void tinydrm_connector_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs tinydrm_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .reset = drm_atomic_helper_connector_reset, .detect = tinydrm_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes,
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 7/8] drm: Nuke drm_atomic_helper_connector_dpms
In reply to Daniel VetterDen 25.07.2017 10.01, skrev Daniel Vetter:
Quoted 9 lines
It's dead code, the core handles all this directly now.
The only special case is nouveau and tda988x which used one function for both legacy modeset code and -nv50 atomic world instead of 2 vtables. But amounts to exactly the same.
v2: Rebase over the panel/brideg refactorings in stm/ltdc.
Signed-off-by Daniel Vetter <[email protected]>
...
drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c static void tinydrm_connector_destroy(struct drm_connector *connector) · line 76
Quoted 12 lines
drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c +0
-1@@ -71,7 +71,6 @@ static void tinydrm_connector_destroy(struct drm_connector *connector) }static const struct drm_connector_funcs tinydrm_connector_funcs = { - .dpms = drm_atomic_helper_connector_dpms, .reset = drm_atomic_helper_connector_reset, .detect = tinydrm_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes,
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Re: [PATCH 7/8] drm: Nuke drm_atomic_helper_connector_dpms
In reply to Daniel VetterQuoted 9 lines · Daniel Vetter
It's dead code, the core handles all this directly now.
The only special case is nouveau and tda988x which used one function for both legacy modeset code and -nv50 atomic world instead of 2 vtables. But amounts to exactly the same.
v2: Rebase over the panel/brideg refactorings in stm/ltdc.
Signed-off-by Daniel Vetter <[email protected]>
[...]
Quoted 3 lines
drivers/gpu/drm/sti/sti_dvo.c | 1 - drivers/gpu/drm/sti/sti_hda.c | 1 - drivers/gpu/drm/sti/sti_hdmi.c | 1 -
BR
Vincent
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 7/8] drm: Nuke drm_atomic_helper_connector_dpms
In reply to Daniel VetterQuoted 9 lines · Daniel Vetter
It's dead code, the core handles all this directly now.
The only special case is nouveau and tda988x which used one function for both legacy modeset code and -nv50 atomic world instead of 2 vtables. But amounts to exactly the same.
v2: Rebase over the panel/brideg refactorings in stm/ltdc.
Signed-off-by Daniel Vetter <[email protected]>
[...]
Quoted 3 lines
drivers/gpu/drm/sti/sti_dvo.c | 1 - drivers/gpu/drm/sti/sti_hda.c | 1 - drivers/gpu/drm/sti/sti_hdmi.c | 1 -
BR
Vincent
PATCH 8/8 drm: Nuke drm_atomic_legacy_backoff
In reply to Daniel VetterFinally all users are gone!
--- drivers/gpu/drm/drm_atomic.c | 32 -------------------------------- include/drm/drm_atomic.h | 2 -- 2 files changed, 34 deletions(-)
drivers/gpu/drm/drm_atomic.c +0 -32
@@ -1588,38 +1588,6 @@ drm_atomic_add_affected_planes(struct drm_atomic_state *state,EXPORT_SYMBOL (drm_atomic_add_affected_planes);/** -* drm_atomic_legacy_backoff - locking backoff for legacy ioctls -* @state: atomic state -* -* This function should be used by legacy entry points which don't understand -* -EDEADLK semantics. For simplicity this one will grab all modeset locks after -* the slowpath completed. -*/ -void drm_atomic_legacy_backoff (struct drm_atomic_state *state) -{ -struct drm_device *dev = state->dev; -int ret; -bool global = false; - -if (WARN_ON (dev->mode_config.acquire_ctx == state->acquire_ctx)) { - global = true; - - dev->mode_config.acquire_ctx =NULL ; - } - -retry: -drm_modeset_backoff (state->acquire_ctx); - - ret =drm_modeset_lock_all_ctx (dev, state->acquire_ctx); -if (ret) - goto retry; - -if (global) - dev->mode_config.acquire_ctx = state->acquire_ctx; -} -EXPORT_SYMBOL (drm_atomic_legacy_backoff); - -/** * drm_atomic_check_only - check whether a given config would work * @state: atomic configuration to check *
include/drm/drm_atomic.h +0 -2
@@ -545,8 +545,6 @@ int __must_check drm_atomic_add_affected_planes(struct drm_atomic_state *state, struct drm_crtc *crtc); -void drm_atomic_legacy_backoff (struct drm_atomic_state *state); -void drm_atomic_clean_old_fb (struct drm_device *dev,unsigned plane_mask,int ret);
Signature · 6 lines
2.13.3 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [Intel-gfx] [PATCH 8/8] drm: Nuke drm_atomic_legacy_backoff
Op 25-07-17 om 10:01 schreef Daniel Vetter:
Quoted 36 lines
Finally all users are gone!
Signed-off-by Daniel Vetter <[email protected]>--- drivers/gpu/drm/drm_atomic.c | 32 -------------------------------- include/drm/drm_atomic.h | 2 -- 2 files changed, 34 deletions(-)drivers/gpu/drm/drm_atomic.c +0
-20@@ -1588,38 +1588,6 @@ drm_atomic_add_affected_planes(struct drm_atomic_state *state,EXPORT_SYMBOL (drm_atomic_add_affected_planes);/** -* drm_atomic_legacy_backoff - locking backoff for legacy ioctls -* @state: atomic state -* -* This function should be used by legacy entry points which don't understand -* -EDEADLK semantics. For simplicity this one will grab all modeset locks after -* the slowpath completed. -*/ -void drm_atomic_legacy_backoff (struct drm_atomic_state *state) -{ -struct drm_device *dev = state->dev; -int ret; -bool global = false; - -if (WARN_ON (dev->mode_config.acquire_ctx == state->acquire_ctx)) { - global = true; - - dev->mode_config.acquire_ctx =NULL ; - } - -retry:
drivers/gpu/drm/drm_atomic.c drm_atomic_add_affected_planes(struct drm_atomic_state *state, · line 1620
Quoted 10 lines
drivers/gpu/drm/drm_atomic.c +0
-10-drm_modeset_backoff (state->acquire_ctx); - - ret =drm_modeset_lock_all_ctx (dev, state->acquire_ctx); -if (ret) - goto retry; - -if (global) - dev->mode_config.acquire_ctx = state->acquire_ctx; -} -EXPORT_SYMBOL (drm_atomic_legacy_backoff);
You're missing one patch here. We should also mark dev->mode_config.acquire_ctx __private. That way atomic commits will never be able to use lock_all. :)
Though I think it requires fixing vmwgfx_fb.c and i915 first.
Otherwise series looks good, so with review comments addressed.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Patchwork
CI✓ Fi.CI.BAT: success for acquire ctx for everyone!
In reply to Daniel Vetter== Series Details ==
== Series Details ==
Series: acquire ctx for everyone!
URL : https://patchwork.freedesktop.org/series/27835/
State : success
== Summary ==
Series 27835v1 acquire ctx for everyone!
https://patchwork.freedesktop.org/api/1.0/series/27835/revisions/1/mbox/
Test kms_cursor_legacy:
Subgroup basic-busy-flip-before-cursor-atomic:
fail -> PASS (fi-snb-2600) fdo#100215
Test kms_flip:
Subgroup basic-flip-vs-modeset:
pass -> SKIP (fi-skl-x1585l) fdo#101781
Test kms_pipe_crc_basic:
Subgroup hang-read-crc-pipe-a:
pass -> DMESG-WARN (fi-pnv-d510) fdo#101597
Subgroup suspend-read-crc-pipe-b:
pass -> DMESG-WARN (fi-byt-j1900) fdo#101705fdo#100215 https://bugs.freedesktop.org/show_bug.cgi?id=100215
fdo#101781 https://bugs.freedesktop.org/show_bug.cgi?id=101781
fdo#101597 https://bugs.freedesktop.org/show_bug.cgi?id=101597
fdo#101705 https://bugs.freedesktop.org/show_bug.cgi?id=101705
fi-bdw-5557u total:280 pass:269 dwarn:0 dfail:0 fail:0 skip:11 time:444s fi-bdw-gvtdvm total:280 pass:265 dwarn:1 dfail:0 fail:0 skip:14 time:432s fi-blb-e6850 total:280 pass:225 dwarn:1 dfail:0 fail:0 skip:54 time:360s fi-bsw-n3050 total:280 pass:244 dwarn:0 dfail:0 fail:0 skip:36 time:549s fi-bxt-j4205 total:280 pass:261 dwarn:0 dfail:0 fail:0 skip:19 time:514s fi-byt-j1900 total:280 pass:255 dwarn:1 dfail:0 fail:0 skip:24 time:496s fi-byt-n2820 total:280 pass:251 dwarn:1 dfail:0 fail:0 skip:28 time:491s fi-glk-2a total:280 pass:261 dwarn:0 dfail:0 fail:0 skip:19 time:605s fi-hsw-4770 total:280 pass:264 dwarn:0 dfail:0 fail:0 skip:16 time:439s fi-hsw-4770r total:280 pass:264 dwarn:0 dfail:0 fail:0 skip:16 time:419s fi-ilk-650 total:280 pass:230 dwarn:0 dfail:0 fail:0 skip:50 time:411s fi-ivb-3520m total:280 pass:262 dwarn:0 dfail:0 fail:0 skip:18 time:504s fi-ivb-3770 total:280 pass:262 dwarn:0 dfail:0 fail:0 skip:18 time:481s fi-kbl-7500u total:280 pass:262 dwarn:0 dfail:0 fail:0 skip:18 time:467s fi-kbl-7560u total:280 pass:270 dwarn:0 dfail:0 fail:0 skip:10 time:574s fi-kbl-r total:280 pass:262 dwarn:0 dfail:0 fail:0 skip:18 time:583s fi-pnv-d510 total:280 pass:222 dwarn:3 dfail:0 fail:0 skip:55 time:570s fi-skl-6260u total:280 pass:270 dwarn:0 dfail:0 fail:0 skip:10 time:459s fi-skl-6700hq total:280 pass:263 dwarn:0 dfail:0 fail:0 skip:17 time:583s fi-skl-6700k total:280 pass:262 dwarn:0 dfail:0 fail:0 skip:18 time:469s fi-skl-6770hq total:280 pass:270 dwarn:0 dfail:0 fail:0 skip:10 time:475s fi-skl-gvtdvm total:280 pass:266 dwarn:1 dfail:0 fail:0 skip:13 time:435s fi-skl-x1585l total:280 pass:269 dwarn:0 dfail:0 fail:0 skip:11 time:480s fi-snb-2520m total:280 pass:252 dwarn:0 dfail:0 fail:0 skip:28 time:542s fi-snb-2600 total:280 pass:251 dwarn:0 dfail:0 fail:0 skip:29 time:408s
9e377e5fc2f8360c01787ebfe16e1bea778b4d9d drm-tip: 2017y-07m-25d-07h-06m-30s UTC integration manifest 437076108ca9 drm: Nuke drm_atomic_legacy_backoff0c7efbd134b1 drm: Nuke drm_atomic_helper_connector_dpms8533fb10cc2b drm: Nuke drm_atomic_helper_connector_set_property523d704afcad drm: Nuke drm_atomic_helper_plane_set_property3282548927d8 drm: Nuke drm_atomic_helper_crtc_set_property9d112cf69346 drm: Handle properties in the core for atomic driversf0dafa2b3c62 drm: Don't update property values for atomic drivers7ffb9abae902 drm/omap: Simplify the rotation-on-crtc hack
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_5270/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for acquire ctx for everyone! (rev3)
In reply to Daniel Vetter== Series Details ==
== Series Details ==
Series: acquire ctx for everyone! (rev3)
URL : https://patchwork.freedesktop.org/series/27835/
State : failure
== Summary ==
CHK include/config/kernel.release CHK include/generated/uapi/linux/version.h CHK include/generated/utsrelease.h CHK include/generated/bounds.h CHK include/generated/timeconst.h CHK include/generated/asm-offsets.h CALL scripts/checksyscalls.sh CHK scripts/mod/devicetable-offsets.h CHK include/generated/compile.h CHK kernel/config_data.h CC [M] drivers/gpu/drm/i915/intel_hangcheck.o
In file included from drivers/gpu/drm/i915/intel_hangcheck.c:485:0:drivers/gpu/drm/i915/selftests/intel_hangcheck.c: In function ‘igt_render_engine_reset_fallback’:drivers/gpu/drm/i915/selftests/intel_hangcheck.c:845:3: error: too few arguments to function ‘i915_reset’
i915_reset(i915);
^~~~~~~~~~
In file included from drivers/gpu/drm/i915/intel_hangcheck.c:25:0:drivers/gpu/drm/i915/i915_drv.h:3115:13: note: declared here
extern void i915_reset(struct drm_i915_private *i915, unsigned int flags);
^~~~~~~~~~
scripts/Makefile.build:302: recipe for target 'drivers/gpu/drm/i915/intel_hangcheck.o' failed make[4]: *** [drivers/gpu/drm/i915/intel_hangcheck.o] Error 1 scripts/Makefile.build:561: recipe for target 'drivers/gpu/drm/i915' failed make[3]: *** [drivers/gpu/drm/i915] Error 2scripts/Makefile.build:561: recipe for target 'drivers/gpu/drm' failed make[2]: *** [drivers/gpu/drm] Error 2scripts/Makefile.build:561: recipe for target 'drivers/gpu' failed
make[1]: *** [drivers/gpu] Error 2
Makefile:1019: recipe for target 'drivers' failed
make: *** [drivers] Error 2
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx