drm/amdgpu: Remove default best_encoder hook from DC
Subsystems (12)
PATCH 1/22 drm/amdgpu: Remove default best_encoder hook from DC
For atomic driver this is the default, no need to reimplement it. We still need to keep the copypasta for not-atomic drivers though, since no one polished the legacy crtc helpers as much as the atomic ones.
v2: amdgpu uses ->best_encoder internally, give it a local copy. It might be a good idea to merge the connector and encoder into one amdgpu_dm_sink structure, that might match DC internals better. At least for non-DPMST outputs. Kudos to Ville for spotting this.
v3: Rebase onto a487411a6481 ("drm/amd/display: Use DRM helper for best_encoder").
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +7 -7
@@ -3189,7 +3189,6 @@ amdgpu_dm_connector_helper_funcs = {*/ .get_modes = get_modes, .mode_valid = amdgpu_dm_connector_mode_valid, - .best_encoder = drm_atomic_helper_best_encoder };static void dm_crtc_helper_disable (struct drm_crtc *crtc)
@@ -3592,14 +3591,17 @@ static int to_drm_connector_type(enum signal_type st) } } +static struct drm_encoder *amdgpu_dm_connector_to_encoder (struct drm_connector *connector) +{ +return drm_encoder_find (connector->dev,NULL , connector->encoder_ids[0 ]); +} +static void amdgpu_dm_get_native_mode (struct drm_connector *connector) { -const struct drm_connector_helper_funcs *helper = - connector->helper_private;struct drm_encoder *encoder;struct amdgpu_encoder *amdgpu_encoder; - encoder = helper->best_encoder (connector); + encoder =amdgpu_dm_connector_to_encoder (connector);if (encoder ==NULL )return ;
@@ -3726,14 +3728,12 @@ static void amdgpu_dm_connector_ddc_get_modes(struct drm_connector *connector,static int amdgpu_dm_connector_get_modes (struct drm_connector *connector) { -const struct drm_connector_helper_funcs *helper = - connector->helper_private;struct amdgpu_dm_connector *amdgpu_dm_connector =to_amdgpu_dm_connector (connector);struct drm_encoder *encoder;struct edid *edid = amdgpu_dm_connector->edid; - encoder = helper->best_encoder (connector); + encoder =amdgpu_dm_connector_to_encoder (connector);if (!edid || !drm_edid_is_valid (edid)) { amdgpu_dm_connector->num_modes =
Signature · 6 lines
2.19.0.rc2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/22 drm/atomic-helper: Unexport drm_atomic_helper_best_encoder
It's the default. The exported version was kinda a transition state, before we made this the default.
To stop new atomic drivers from using it (instead of just relying on the default) let's unexport it.
v2: rename the default implementation to a more fitting name and add a comment (Laurent)
--- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 1 - drivers/gpu/drm/drm_atomic_helper.c | 32 +++++++++-------------- drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 1 - drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 1 - drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 1 - include/drm/drm_atomic_helper.h | 2 -- 6 files changed, 13 insertions(+), 25 deletions(-)
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +0 -1
@@ -1957,7 +1957,6 @@ static const struct drm_connector_funcs dw_hdmi_connector_funcs = {static const struct drm_connector_helper_funcs dw_hdmi_connector_helper_funcs = { .get_modes = dw_hdmi_connector_get_modes, - .best_encoder = drm_atomic_helper_best_encoder, };static int dw_hdmi_bridge_attach (struct drm_bridge *bridge)
drivers/gpu/drm/drm_atomic_helper.c +13 -19
@@ -92,6 +92,17 @@ drm_atomic_helper_plane_changed(struct drm_atomic_state *state, } } +/* +* For connectors that support multiple encoders, either the +* .atomic_best_encoder() or .best_encoder() operation must be implemented. +*/ +static struct drm_encoder * +pick_single_encoder_for_connector (struct drm_connector *connector) +{ +WARN_ON (connector->encoder_ids[1 ]); +return drm_encoder_find (connector->dev,NULL , connector->encoder_ids[0 ]); +} +static int handle_conflicting_encoders (struct drm_atomic_state *state,bool disable_conflicting_encoders) {
@@ -119,7 +130,7 @@ static int handle_conflicting_encoders(struct drm_atomic_state *state,else if (funcs->best_encoder) new_encoder = funcs->best_encoder (connector);else - new_encoder =drm_atomic_helper_best_encoder (connector); + new_encoder =pick_single_encoder_for_connector (connector);if (new_encoder) {if (encoder_mask &drm_encoder_mask (new_encoder)) {
@@ -316,7 +327,7 @@ update_connector_routing(struct drm_atomic_state *state,else if (funcs->best_encoder) new_encoder = funcs->best_encoder (connector);else - new_encoder =drm_atomic_helper_best_encoder (connector); + new_encoder =pick_single_encoder_for_connector (connector);if (!new_encoder) { DRM_DEBUG_ATOMIC("No suitable encoder found for [CONNECTOR:%d:%s]\n",
@@ -3376,23 +3387,6 @@ int drm_atomic_helper_page_flip_target(struct drm_crtc *crtc, }EXPORT_SYMBOL (drm_atomic_helper_page_flip_target); -/** -* drm_atomic_helper_best_encoder - Helper for -* &drm_connector_helper_funcs.best_encoder callback -* @connector: Connector control structure -* -* This is a &drm_connector_helper_funcs.best_encoder callback helper for -* connectors that support exactly 1 encoder, statically determined at driver -* init time. -*/ -struct drm_encoder * -drm_atomic_helper_best_encoder (struct drm_connector *connector) -{ -WARN_ON (connector->encoder_ids[1 ]); -return drm_encoder_find (connector->dev,NULL , connector->encoder_ids[0 ]); -} -EXPORT_SYMBOL (drm_atomic_helper_best_encoder); -/** * DOC: atomic state reset and initialization *
drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c +0 -1
@@ -274,7 +274,6 @@ static const struct drm_connector_funcs vmw_legacy_connector_funcs = {static const struct drm_connector_helper_funcs vmw_ldu_connector_helper_funcs = { - .best_encoder = drm_atomic_helper_best_encoder, };/*
drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c +0 -1
@@ -389,7 +389,6 @@ static const struct drm_connector_funcs vmw_sou_connector_funcs = {static const struct drm_connector_helper_funcs vmw_sou_connector_helper_funcs = { - .best_encoder = drm_atomic_helper_best_encoder, };
drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c +0 -1
@@ -1054,7 +1054,6 @@ static const struct drm_connector_funcs vmw_stdu_connector_funcs = {static const struct drm_connector_helper_funcs vmw_stdu_connector_helper_funcs = { - .best_encoder = drm_atomic_helper_best_encoder, };
include/drm/drm_atomic_helper.h +0 -2
@@ -144,8 +144,6 @@ int drm_atomic_helper_page_flip_target(uint32_t flags, uint32_t target, struct drm_modeset_acquire_ctx *ctx); -struct drm_encoder * -drm_atomic_helper_best_encoder (struct drm_connector *connector);/* default implementations for state handling */ void drm_atomic_helper_crtc_reset (struct drm_crtc *crtc);
Signature · 6 lines
2.19.0.rc2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/22 drm: Extract drm_atomic_state_helper.[hc]
In reply to Daniel VetterWe already have a separate overview doc for this, makes sense to untangle it from the overall atomic helpers.
v2: Rebase
v3: Rebase more.
--- Documentation/gpu/drm-kms-helpers.rst | 19 +- drivers/gpu/drm/Makefile | 3 +- drivers/gpu/drm/drm_atomic_helper.c | 566 -------------------- drivers/gpu/drm/drm_atomic_state_helper.c | 601 ++++++++++++++++++++++ include/drm/drm_atomic_helper.h | 44 +- include/drm/drm_atomic_state_helper.h | 80 +++ 6 files changed, 698 insertions(+), 615 deletions(-) create mode 100644 drivers/gpu/drm/drm_atomic_state_helper.c create mode 100644 include/drm/drm_atomic_state_helper.h
Documentation/gpu/drm-kms-helpers.rst +14 -5
@@ -59,19 +59,28 @@ Implementing Asynchronous Atomic Commit .. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c :doc: implementing nonblocking commit +Helper Functions Reference +-------------------------- + +.. kernel-doc:: include/drm/drm_atomic_helper.h + :internal: + +.. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c + :export: + Atomic State Reset and Initialization ------------------------------------- -.. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c +.. kernel-doc:: drivers/gpu/drm/drm_atomic_state_helper.c :doc: atomic state reset and initialization -Helper Functions Reference --------------------------- +Atomic State Helper Reference +----------------------------- -.. kernel-doc:: include/drm/drm_atomic_helper.h +.. kernel-doc:: include/drm/drm_atomic_state_helper.h :internal: -.. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c +.. kernel-doc:: drivers/gpu/drm/drm_atomic_state_helper.c :export: Simple KMS Helper Reference
drivers/gpu/drm/Makefile +2 -1
@@ -36,7 +36,8 @@ drm_kms_helper-y := drm_crtc_helper.o drm_dp_helper.o drm_probe_helper.o \ drm_plane_helper.o drm_dp_mst_topology.o drm_atomic_helper.o \ drm_kms_helper_common.o drm_dp_dual_mode_helper.o \ drm_simple_kms_helper.o drm_modeset_helper.o \ - drm_scdc_helper.o drm_gem_framebuffer_helper.o + drm_scdc_helper.o drm_gem_framebuffer_helper.o \ + drm_atomic_state_helper.o drm_kms_helper-$(CONFIG_DRM_PANEL_BRIDGE) += bridge/panel.o drm_kms_helper-$(CONFIG_DRM_FBDEV_EMULATION) += drm_fb_helper.o
drivers/gpu/drm/drm_atomic_helper.c +0 -566
569 lines not on this page · raw message
drivers/gpu/drm/drm_atomic_state_helper.c new file +601 -0
601 lines not on this page · raw message
include/drm/drm_atomic_helper.h +1 -43
56 lines not on this page · raw message
include/drm/drm_atomic_state_helper.h new file +80 -0
80 lines not on this page · raw message
Signature · 6 lines
2.19.0.rc2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 4/22 drm/vmwgfx: Don't look at state->allow_modeset
In reply to Daniel VetterThat's purely for the uapi layer to implement the ALLOW_MODESET flag.
Drivers should instead look at the state, e.g. through drm_atomic_crtc_needs_modeset(), which vmwgfx already does. Also remove the confusing comment, since checking allow_modeset is at best a micro optimization.
--- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 8 -------- 1 file changed, 8 deletions(-)
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +0 -8
@@ -1681,14 +1681,6 @@ vmw_kms_atomic_check_modeset(struct drm_device *dev,if (ret)return ret; -if (!state->allow_modeset) -return ret; - -/* -* Legacy path do not set allow_modeset properly like -* @drm_atomic_helper_update_plane, This will result in unnecessary call -* to vmw_kms_check_topology. So extra set of check. -*/ for_each_new_crtc_in_state (state, crtc, crtc_state, i) {if (drm_atomic_crtc_needs_modeset (crtc_state)) need_modeset = true;
Signature · 6 lines
2.19.0.rc2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 5/22 drm/vmwgfx: Remove confused comment from vmw_du_connector_atomic_set_property
In reply to Daniel VetterThe core _does_ the call to drm_atomic_commit for you. That's pretty much the entire point of having the fancy new atomic_set/get_prop callbacks.
--- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +0 -6
@@ -2303,12 +2303,6 @@ vmw_du_connector_atomic_set_property(struct drm_connector *connector,if (property == dev_priv->implicit_placement_property) { vcs->is_implicit = val; - -/* -* We should really be doing a drm_atomic_commit() to -* commit the new state, but since this doesn't cause -* an immedate state change, this is probably ok -*/ du->is_implicit = vcs->is_implicit; }else {return -EINVAL ;
Signature · 6 lines
2.19.0.rc2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 6/22 drm/atomic: Improve docs for drm_atomic_state->allow_modeset
In reply to Daniel VetterMotivated by vmwgfx digging around in core uapi bits it shouldn't dig around in.
--- include/drm/drm_atomic.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
include/drm/drm_atomic.h +9 -1
@@ -254,7 +254,6 @@ struct __drm_private_objs_state {* struct drm_atomic_state - the global state object for atomic updates * @ref: count of all references to this state (will not be freed until zero) * @dev: parent DRM device -* @allow_modeset: allow full modeset * @legacy_cursor_update: hint to enforce legacy cursor IOCTL semantics * @async_update: hint for asynchronous plane update * @planes: pointer to array of structures with per-plane data
@@ -273,6 +272,15 @@ struct drm_atomic_state {struct kref ref;struct drm_device *dev; + +/** +* @allow_modeset: +* +* Allow full modeset. This is used by the ATOMIC IOCTL handler to +* implement the DRM_MODE_ATOMIC_ALLOW_MODESET flag. Drivers should +* never consult this flag, instead looking at the output of +* drm_atomic_crtc_needs_modeset(). +*/ bool allow_modeset : 1; bool legacy_cursor_update : 1; bool async_update : 1;
Signature · 6 lines
2.19.0.rc2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 7/22 drm/vmwgfx: Add FIXME comments for customer page_flip handlers
In reply to Daniel VetterThe idea behind allowing drivers to override legacy ioctls (instead of using the generic implementations unconditionally) is to handle bugs in old driver-specific userspace. Like e.g. vmw_kms_set_config does, to work around some vmwgfx userspace not clearing its ioctl structs properly.
But you can't use it to augment semantics and put in additional checks, since from a correctly working userspace's pov there should not be any difference in behaviour between the legacy and the atomic paths.
vmwgfx seems to be doing some strange things in its page_flip handlers. Since I'm not an expert of this codebase just wrap some FIXME comments around the potentially problematic code.
--- drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 2 ++ drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 1 + 2 files changed, 3 insertions(+)
drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c +2 -0
@@ -326,6 +326,7 @@ static int vmw_sou_crtc_page_flip(struct drm_crtc *crtc,struct vmw_private *dev_priv =vmw_priv (crtc->dev);int ret; +/* FIMXE: This check needs to be moved into ->atomic_check code. */ if (!vmw_kms_crtc_flippable (dev_priv, crtc))return -EINVAL ;
@@ -335,6 +336,7 @@ static int vmw_sou_crtc_page_flip(struct drm_crtc *crtc,return ret; } +/* FIMXE: This code needs to be moved into ->atomic_commit callbacks. */ if (vmw_crtc_to_du (crtc)->is_implicit)vmw_kms_update_implicit_fb (dev_priv, crtc);
drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c +1 -0
@@ -501,6 +501,7 @@ static int vmw_stdu_crtc_page_flip(struct drm_crtc *crtc,struct vmw_screen_target_display_unit *stdu =vmw_crtc_to_stdu (crtc);int ret; +/* FIMXE: This check needs to be moved into ->atomic_check code. */ if (!stdu->defined || !vmw_kms_crtc_flippable (dev_priv, crtc))return -EINVAL ;
Signature · 6 lines
2.19.0.rc2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 8/22 drm/arcpgu: Drop transitional hooks
In reply to Daniel VetterThese do absolutely nothing for atomic drivers.
--- drivers/gpu/drm/arc/arcpgu_crtc.c | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/arc/arcpgu_crtc.c +0 -2
@@ -158,8 +158,6 @@ static void arc_pgu_crtc_atomic_begin(struct drm_crtc *crtc,static const struct drm_crtc_helper_funcs arc_pgu_crtc_helper_funcs = { .mode_valid = arc_pgu_crtc_mode_valid, - .mode_set = drm_helper_crtc_mode_set, - .mode_set_base = drm_helper_crtc_mode_set_base, .mode_set_nofb = arc_pgu_crtc_mode_set_nofb, .atomic_begin = arc_pgu_crtc_atomic_begin, .atomic_enable = arc_pgu_crtc_atomic_enable,
Signature · 6 lines
2.19.0.rc2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 9/22 drm/atmel: Drop transitional hooks
In reply to Daniel VetterThese do absolutely nothing for atomic drivers.
--- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c +0 -2
@@ -364,9 +364,7 @@ static void atmel_hlcdc_crtc_atomic_flush(struct drm_crtc *crtc,static const struct drm_crtc_helper_funcs lcdc_crtc_helper_funcs = { .mode_valid = atmel_hlcdc_crtc_mode_valid, - .mode_set = drm_helper_crtc_mode_set, .mode_set_nofb = atmel_hlcdc_crtc_mode_set_nofb, - .mode_set_base = drm_helper_crtc_mode_set_base, .atomic_check = atmel_hlcdc_crtc_atomic_check, .atomic_begin = atmel_hlcdc_crtc_atomic_begin, .atomic_flush = atmel_hlcdc_crtc_atomic_flush,
Signature · 6 lines
2.19.0.rc2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 10/22 drm/arcpgu: Use drm_atomic_helper_shutdown
In reply to Daniel Vetterdrm_plane_helper_disable is a non-atomic drivers only function, and will blow up (since no one passes the locking context it needs).
Atomic drivers which want to quiescent their hw on unload should use drm_atomic_helper_shutdown() instead.
--- drivers/gpu/drm/arc/arcpgu_crtc.c | 1 - drivers/gpu/drm/arc/arcpgu_drv.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/arc/arcpgu_crtc.c +0 -1
@@ -184,7 +184,6 @@ static const struct drm_plane_helper_funcs arc_pgu_plane_helper_funcs = {static void arc_pgu_plane_destroy (struct drm_plane *plane) { -drm_plane_helper_disable (plane,NULL );drm_plane_cleanup (plane); }
drivers/gpu/drm/arc/arcpgu_drv.c +1 -0
@@ -134,6 +134,7 @@ static int arcpgu_unload(struct drm_device *drm) arcpgu->fbdev =NULL ; }drm_kms_helper_poll_fini (drm); +drm_atomic_helper_shutdown (drm);drm_mode_config_cleanup (drm);return 0 ;
Signature · 6 lines
2.19.0.rc2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 11/22 drm/msm: Use drm_atomic_helper_shutdown
In reply to Daniel Vetterdrm_plane_helper_disable is a non-atomic drivers only function, and will blow up (since no one passes the locking context it needs).
Atomic drivers which want to quiescent their hw on unload should use drm_atomic_helper_shutdown() instead.
--- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 2 -- drivers/gpu/drm/msm/disp/mdp4/mdp4_plane.c | 1 - drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c | 1 - drivers/gpu/drm/msm/msm_drv.c | 1 + 4 files changed, 1 insertion(+), 4 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +0 -2
@@ -1482,8 +1482,6 @@ static void dpu_plane_destroy(struct drm_plane *plane)mutex_destroy (&pdpu->lock); -drm_plane_helper_disable (plane,NULL ); -/* this will destroy the states as well */ drm_plane_cleanup (plane);
drivers/gpu/drm/msm/disp/mdp4/mdp4_plane.c +0 -1
@@ -68,7 +68,6 @@ static void mdp4_plane_destroy(struct drm_plane *plane) {struct mdp4_plane *mdp4_plane =to_mdp4_plane (plane); -drm_plane_helper_disable (plane,NULL );drm_plane_cleanup (plane);kfree (mdp4_plane);
drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c +0 -1
@@ -46,7 +46,6 @@ static void mdp5_plane_destroy(struct drm_plane *plane) {struct mdp5_plane *mdp5_plane =to_mdp5_plane (plane); -drm_plane_helper_disable (plane,NULL );drm_plane_cleanup (plane);kfree (mdp5_plane);
drivers/gpu/drm/msm/msm_drv.c +1 -0
@@ -312,6 +312,7 @@ static int msm_drm_uninit(struct device *dev)if (fbdev && priv->fbdev)msm_fbdev_free (ddev);#endif +drm_atomic_helper_shutdown (ddev);drm_mode_config_cleanup (ddev);pm_runtime_get_sync (dev);
Signature · 6 lines
2.19.0.rc2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 12/22 drm/sti: Use drm_atomic_helper_shutdown
In reply to Daniel Vetterdrm_plane_helper_disable is a non-atomic drivers only function, and will blow up (since no one passes the locking context it needs).
Atomic drivers which want to quiescent their hw on unload should use drm_atomic_helper_shutdown() instead.
The sti cleanup code seems supremely confused:
- In the load error path it calls drm_mode_config_cleanup before it stops various kms services like poll worker or fbdev emulation. That's going to oops.
- The actual unload code doesn't even bother with the cleanup and just leaks.
Try to fix this while at it.
--- drivers/gpu/drm/sti/sti_cursor.c | 1 - drivers/gpu/drm/sti/sti_drv.c | 6 +++--- drivers/gpu/drm/sti/sti_gdp.c | 1 - drivers/gpu/drm/sti/sti_hqvdp.c | 1 - 4 files changed, 3 insertions(+), 6 deletions(-)
drivers/gpu/drm/sti/sti_cursor.c +0 -1
@@ -332,7 +332,6 @@ static void sti_cursor_destroy(struct drm_plane *drm_plane) {DRM_DEBUG_DRIVER ("\n" ); -drm_plane_helper_disable (drm_plane,NULL );drm_plane_cleanup (drm_plane); }
drivers/gpu/drm/sti/sti_drv.c +3 -3
@@ -206,6 +206,8 @@ static void sti_cleanup(struct drm_device *ddev)struct sti_private *private = ddev->dev_private;drm_kms_helper_poll_fini (ddev); +drm_atomic_helper_shutdown (ddev); +drm_mode_config_cleanup (ddev);component_unbind_all (ddev->dev, ddev);kfree (private); ddev->dev_private =NULL ;
@@ -230,7 +232,7 @@ static int sti_bind(struct device *dev) ret =drm_dev_register (ddev,0 );if (ret) - goto err_register; + goto err_cleanup;drm_mode_config_reset (ddev);
@@ -238,8 +240,6 @@ static int sti_bind(struct device *dev)return 0 ; -err_register: -drm_mode_config_cleanup (ddev); err_cleanup:sti_cleanup (ddev); err_drm_dev_put:
drivers/gpu/drm/sti/sti_gdp.c +0 -1
@@ -883,7 +883,6 @@ static void sti_gdp_destroy(struct drm_plane *drm_plane) {DRM_DEBUG_DRIVER ("\n" ); -drm_plane_helper_disable (drm_plane,NULL );drm_plane_cleanup (drm_plane); }
drivers/gpu/drm/sti/sti_hqvdp.c +0 -1
@@ -1260,7 +1260,6 @@ static void sti_hqvdp_destroy(struct drm_plane *drm_plane) {DRM_DEBUG_DRIVER ("\n" ); -drm_plane_helper_disable (drm_plane,NULL );drm_plane_cleanup (drm_plane); }
Signature · 6 lines
2.19.0.rc2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 13/22 drm/vc4: Use drm_atomic_helper_shutdown
In reply to Daniel Vetterdrm_plane_helper_disable is a non-atomic drivers only function, and will blow up (since no one passes the locking context it needs).
Atomic drivers which want to quiescent their hw on unload should use drm_atomic_helper_shutdown() instead.
v2: Rebase.
--- drivers/gpu/drm/vc4/vc4_drv.c | 3 +++ drivers/gpu/drm/vc4/vc4_plane.c | 1 - 2 files changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/vc4/vc4_drv.c +3 -0
@@ -33,6 +33,7 @@#include <linux/pm_runtime.h> #include <drm/drm_fb_cma_helper.h> #include <drm/drm_fb_helper.h> +#include <drm/drm_atomic_helper.h> #include "uapi/drm/vc4_drm.h" #include "vc4_drv.h"
@@ -308,6 +309,8 @@ static void vc4_drm_unbind(struct device *dev)drm_dev_unregister (drm); +drm_atomic_helper_shutdown (drm); +drm_mode_config_cleanup (drm);drm_atomic_private_obj_fini (&vc4->ctm_manager);
drivers/gpu/drm/vc4/vc4_plane.c +0 -1
@@ -903,7 +903,6 @@ static const struct drm_plane_helper_funcs vc4_plane_helper_funcs = {static void vc4_plane_destroy (struct drm_plane *plane) { -drm_plane_helper_disable (plane,NULL );drm_plane_cleanup (plane); }
Signature · 6 lines
2.19.0.rc2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 14/22 drm/zte: Use drm_atomic_helper_shutdown
In reply to Daniel Vetterdrm_plane_helper_disable is a non-atomic drivers only function, and will blow up (since no one passes the locking context it needs).
Atomic drivers which want to quiescent their hw on unload should use drm_atomic_helper_shutdown() instead.
--- drivers/gpu/drm/zte/zx_drm_drv.c | 1 + drivers/gpu/drm/zte/zx_plane.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/zte/zx_drm_drv.c +1 -0
@@ -124,6 +124,7 @@ static void zx_drm_unbind(struct device *dev)drm_dev_unregister (drm);drm_kms_helper_poll_fini (drm); +drm_atomic_helper_shutdown (drm);drm_mode_config_cleanup (drm);component_unbind_all (dev, drm);dev_set_drvdata (dev,NULL );
drivers/gpu/drm/zte/zx_plane.c +0 -1
@@ -446,7 +446,6 @@ static const struct drm_plane_helper_funcs zx_gl_plane_helper_funcs = {static void zx_plane_destroy (struct drm_plane *plane) { -drm_plane_helper_disable (plane,NULL );drm_plane_cleanup (plane); }
Signature · 6 lines
2.19.0.rc2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 15/22 drm: Remove transitional helpers
In reply to Daniel VetterWith armada the last bigger driver that realistically needed these to convert from legacy kms to atomic is converted. These helpers have been broken more often than not the past 2 years, and as this little patch series shows, tricked a bunch of people into using the wrong helpers for their functions.
Aside: I think a lot more drivers should be using the device-level drm_atomic_helper_shutdown/suspend/resume helpers and related functions. In almost all the cases they get things exactly right.
--- drivers/gpu/drm/drm_crtc_helper.c | 115 ----------------- drivers/gpu/drm/drm_plane_helper.c | 197 ----------------------------- include/drm/drm_crtc_helper.h | 6 - include/drm/drm_plane_helper.h | 14 -- 4 files changed, 332 deletions(-)
drivers/gpu/drm/drm_crtc_helper.c +0 -115
@@ -984,118 +984,3 @@ void drm_helper_resume_force_mode(struct drm_device *dev)drm_modeset_unlock_all (dev); }EXPORT_SYMBOL (drm_helper_resume_force_mode); - -/** -* drm_helper_crtc_mode_set - mode_set implementation for atomic plane helpers -* @crtc: DRM CRTC -* @mode: DRM display mode which userspace requested -* @adjusted_mode: DRM display mode adjusted by ->mode_fixup callbacks -* @x: x offset of the CRTC scanout area on the underlying framebuffer -* @y: y offset of the CRTC scanout area on the underlying framebuffer -* @old_fb: previous framebuffer -* -* This function implements a callback useable as the ->mode_set callback -* required by the CRTC helpers. Besides the atomic plane helper functions for -* the primary plane the driver must also provide the ->mode_set_nofb callback -* to set up the CRTC. -* -* This is a transitional helper useful for converting drivers to the atomic -* interfaces. -*/ -int drm_helper_crtc_mode_set (struct drm_crtc *crtc,struct drm_display_mode *mode, -struct drm_display_mode *adjusted_mode,int x,int y, -struct drm_framebuffer *old_fb) -{ -struct drm_crtc_state *crtc_state; -const struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private; -int ret; - -if (crtc->funcs->atomic_duplicate_state) - crtc_state = crtc->funcs->atomic_duplicate_state (crtc); -else { -if (!crtc->state) -drm_atomic_helper_crtc_reset (crtc); - - crtc_state =drm_atomic_helper_crtc_duplicate_state (crtc); - } - -if (!crtc_state) -return -ENOMEM ; - - crtc_state->planes_changed = true; - crtc_state->mode_changed = true; - ret =drm_atomic_set_mode_for_crtc (crtc_state, mode); -if (ret) - goto out; -drm_mode_copy (&crtc_state->adjusted_mode, adjusted_mode); - -if (crtc_funcs->atomic_check) { - ret = crtc_funcs->atomic_check (crtc, crtc_state); -if (ret) - goto out; - } - -swap (crtc->state, crtc_state); - - crtc_funcs->mode_set_nofb (crtc); - - ret =drm_helper_crtc_mode_set_base (crtc, x, y, old_fb); - -out: -if (crtc_state) { -if (crtc->funcs->atomic_destroy_state) - crtc->funcs->atomic_destroy_state (crtc, crtc_state); -else -drm_atomic_helper_crtc_destroy_state (crtc, crtc_state); - } - -return ret; -} -EXPORT_SYMBOL (drm_helper_crtc_mode_set); - -/** -* drm_helper_crtc_mode_set_base - mode_set_base implementation for atomic plane helpers -* @crtc: DRM CRTC -* @x: x offset of the CRTC scanout area on the underlying framebuffer -* @y: y offset of the CRTC scanout area on the underlying framebuffer -* @old_fb: previous framebuffer -* -* This function implements a callback useable as the ->mode_set_base used -* required by the CRTC helpers. The driver must provide the atomic plane helper -* functions for the primary plane. -* -* This is a transitional helper useful for converting drivers to the atomic -* interfaces. -*/ -int drm_helper_crtc_mode_set_base (struct drm_crtc *crtc,int x,int y, -struct drm_framebuffer *old_fb) -{ -struct drm_plane_state *plane_state; -struct drm_plane *plane = crtc->primary; - -if (plane->funcs->atomic_duplicate_state) - plane_state = plane->funcs->atomic_duplicate_state (plane); -else { -if (!plane->state) -drm_atomic_helper_plane_reset (plane); - - plane_state =drm_atomic_helper_plane_duplicate_state (plane); - } -if (!plane_state) -return -ENOMEM ; - plane_state->plane = plane; - - plane_state->crtc = crtc; -drm_atomic_set_fb_for_plane (plane_state, crtc->primary->fb); - plane_state->crtc_x =0 ; - plane_state->crtc_y =0 ; - plane_state->crtc_h = crtc->mode.vdisplay; - plane_state->crtc_w = crtc->mode.hdisplay; - plane_state->src_x = x <<16 ; - plane_state->src_y = y <<16 ; - plane_state->src_h = crtc->mode.vdisplay <<16 ; - plane_state->src_w = crtc->mode.hdisplay <<16 ; - -return drm_plane_helper_commit (plane, plane_state, old_fb); -} -EXPORT_SYMBOL (drm_helper_crtc_mode_set_base);
drivers/gpu/drm/drm_plane_helper.c +0 -197
200 lines not on this page · raw message
include/drm/drm_crtc_helper.h +0 -6
@@ -57,12 +57,6 @@ int drm_helper_connector_dpms(struct drm_connector *connector, int mode);void drm_helper_resume_force_mode (struct drm_device *dev); -int drm_helper_crtc_mode_set (struct drm_crtc *crtc,struct drm_display_mode *mode, -struct drm_display_mode *adjusted_mode,int x,int y, -struct drm_framebuffer *old_fb); -int drm_helper_crtc_mode_set_base (struct drm_crtc *crtc,int x,int y, -struct drm_framebuffer *old_fb); -/* drm_probe_helper.c */ int drm_helper_probe_single_connector_modes(struct drm_connector *connector, uint32_t maxX,
include/drm/drm_plane_helper.h +0 -14
@@ -62,18 +62,4 @@ int drm_primary_helper_disable(struct drm_plane *plane,void drm_primary_helper_destroy (struct drm_plane *plane);extern const struct drm_plane_funcs drm_primary_helper_funcs; -int drm_plane_helper_update (struct drm_plane *plane,struct drm_crtc *crtc, -struct drm_framebuffer *fb, -int crtc_x,int crtc_y, -unsigned int crtc_w,unsigned int crtc_h, -uint32_t src_x,uint32_t src_y, -uint32_t src_w,uint32_t src_h, -struct drm_modeset_acquire_ctx *ctx); -int drm_plane_helper_disable (struct drm_plane *plane, -struct drm_modeset_acquire_ctx *ctx); - -/* For use by drm_crtc_helper.c */ -int drm_plane_helper_commit (struct drm_plane *plane, -struct drm_plane_state *plane_state, -struct drm_framebuffer *old_fb);#endif
Signature · 6 lines
2.19.0.rc2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 16/22 drm/vmwgfx: Fix vmw_du_cursor_plane_atomic_check
In reply to Daniel VetterFrom: Thomas Hellstrom <[email protected]>
Use the correct helper and also return early on helper success rather than on helper failure.
Also explicitly return 0 in the case of no fb.
v2: Check for !fb after updating state->visible (Ville).
--- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-)
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +12 -12
@@ -493,24 +493,24 @@ int vmw_du_cursor_plane_atomic_check(struct drm_plane *plane, struct drm_plane_state *new_state) {int ret =0 ; +struct drm_crtc_state *crtc_state =NULL ;struct vmw_surface *surface =NULL ;struct drm_framebuffer *fb = new_state->fb; -struct drm_rect src =drm_plane_state_src (new_state); -struct drm_rect dest =drm_plane_state_dest (new_state); +if (new_state->crtc) + crtc_state =drm_atomic_get_new_crtc_state (new_state->state, + new_state->crtc); -/* Turning off */ -if (!fb) + ret =drm_atomic_helper_check_plane_state (new_state, crtc_state, +DRM_PLANE_HELPER_NO_SCALING , +DRM_PLANE_HELPER_NO_SCALING , + true, true); +if (ret)return ret; - ret =drm_plane_helper_check_update (plane, new_state->crtc, fb, - &src, &dest, -DRM_MODE_ROTATE_0 , -DRM_PLANE_HELPER_NO_SCALING , -DRM_PLANE_HELPER_NO_SCALING , - true, true, &new_state->visible); -if (!ret) -return ret; +/* Turning off */ +if (!fb) +return 0 ;/* A lot of the code assumes this */ if (new_state->crtc_w !=64 || new_state->crtc_h !=64 ) {
Signature · 6 lines
2.19.0.rc2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 17/22 drm: Unexport drm_plane_helper_check_update
In reply to Daniel VetterIt's for legacy drivers only (atomic ones should use drm_atomic_helper_check_plane_state() instead), and there's no users left except the one in the primary plane helpers.
--- drivers/gpu/drm/drm_plane_helper.c | 49 +++++++----------------------- include/drm/drm_plane_helper.h | 11 ------- 2 files changed, 11 insertions(+), 49 deletions(-)
drivers/gpu/drm/drm_plane_helper.c +11 -38
@@ -100,43 +100,17 @@ static int get_connectors_for_crtc(struct drm_crtc *crtc,return count; } -/** -* drm_plane_helper_check_update() - Check plane update for validity -* @plane: plane object to update -* @crtc: owning CRTC of owning plane -* @fb: framebuffer to flip onto plane -* @src: source coordinates in 16.16 fixed point -* @dst: integer destination coordinates -* @rotation: plane rotation -* @min_scale: minimum @src:@dest scaling factor in 16.16 fixed point -* @max_scale: maximum @src:@dest scaling factor in 16.16 fixed point -* @can_position: is it legal to position the plane such that it -* doesn't cover the entire crtc? This will generally -* only be false for primary planes. -* @can_update_disabled: can the plane be updated while the crtc -* is disabled? -* @visible: output parameter indicating whether plane is still visible after -* clipping -* -* Checks that a desired plane update is valid. Drivers that provide -* their own plane handling rather than helper-provided implementations may -* still wish to call this function to avoid duplication of error checking -* code. -* -* RETURNS: -* Zero if update appears valid, error code on failure -*/ -int drm_plane_helper_check_update (struct drm_plane *plane, -struct drm_crtc *crtc, -struct drm_framebuffer *fb, -struct drm_rect *src, -struct drm_rect *dst, -unsigned int rotation, -int min_scale, -int max_scale, -bool can_position, -bool can_update_disabled, -bool *visible) +static int drm_plane_helper_check_update (struct drm_plane *plane, +struct drm_crtc *crtc, +struct drm_framebuffer *fb, +struct drm_rect *src, +struct drm_rect *dst, +unsigned int rotation, +int min_scale, +int max_scale, +bool can_position, +bool can_update_disabled, +bool *visible) {struct drm_plane_state plane_state = { .plane = plane,
@@ -173,7 +147,6 @@ int drm_plane_helper_check_update(struct drm_plane *plane,return 0 ; } -EXPORT_SYMBOL (drm_plane_helper_check_update);/** * drm_primary_helper_update() - Helper for primary plane update
include/drm/drm_plane_helper.h +0 -11
@@ -38,17 +38,6 @@*/ #define DRM_PLANE_HELPER_NO_SCALING (1<<16) -int drm_plane_helper_check_update (struct drm_plane *plane, -struct drm_crtc *crtc, -struct drm_framebuffer *fb, -struct drm_rect *src, -struct drm_rect *dest, -unsigned int rotation, -int min_scale, -int max_scale, -bool can_position, -bool can_update_disabled, -bool *visible); int drm_primary_helper_update(struct drm_plane *plane, struct drm_crtc *crtc, struct drm_framebuffer *fb,
Signature · 6 lines
2.19.0.rc2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 18/22 drm: Unexport primary plane helpers
In reply to Daniel VetterWell except the destroy helper, which isn't really a primary helper but generally useful, if mislabelled.
v2: Keep some of the nice comments about the limitations of the primarmy plane helpers, and put them into the kerneldoc for drm_crtc_init() (Sam).
--- drivers/gpu/drm/drm_modeset_helper.c | 15 +++++ drivers/gpu/drm/drm_plane_helper.c | 85 ++++------------------------ include/drm/drm_plane_helper.h | 10 ---- 3 files changed, 26 insertions(+), 84 deletions(-)
drivers/gpu/drm/drm_modeset_helper.c +15 -0
@@ -146,6 +146,21 @@ static struct drm_plane *create_primary_plane(struct drm_device *dev)* Initialize a CRTC object with a default helper-provided primary plane and no * cursor plane. * +* Note that we make some assumptions about hardware limitations that may not be +* true for all hardware: +* +* 1. Primary plane cannot be repositioned. +* 2. Primary plane cannot be scaled. +* 3. Primary plane must cover the entire CRTC. +* 4. Subpixel positioning is not supported. +* 5. The primary plane must always be on if the CRTC is enabled. +* +* This is purely a backwards compatibility helper for old drivers. Drivers +* should instead implement their own primary plane. Atomic drivers must do so. +* Drivers with the above hardware restriction can look into using &struct +* drm_simple_display_pipe, which encapsulates the above limitations into a nice +* interface. +* * Returns: * Zero on success, error code on failure. */
drivers/gpu/drm/drm_plane_helper.c +11 -74
107 lines not on this page · raw message
include/drm/drm_plane_helper.h +0 -10
@@ -38,16 +38,6 @@*/ #define DRM_PLANE_HELPER_NO_SCALING (1<<16) -int drm_primary_helper_update (struct drm_plane *plane, -struct drm_crtc *crtc, -struct drm_framebuffer *fb, -int crtc_x,int crtc_y, -unsigned int crtc_w,unsigned int crtc_h, -uint32_t src_x,uint32_t src_y, -uint32_t src_w,uint32_t src_h, -struct drm_modeset_acquire_ctx *ctx); -int drm_primary_helper_disable (struct drm_plane *plane, -struct drm_modeset_acquire_ctx *ctx);void drm_primary_helper_destroy (struct drm_plane *plane);extern const struct drm_plane_funcs drm_primary_helper_funcs;
Signature · 6 lines
2.19.0.rc2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 19/22 drm/doc: fix drm_driver_legacy_fb_format
In reply to Daniel VetterDidn't get updated in a rework of the original patch.
--- drivers/gpu/drm/drm_fourcc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/drm_fourcc.c +3 -3
@@ -97,14 +97,14 @@ EXPORT_SYMBOL(drm_mode_legacy_fb_format);/** * drm_driver_legacy_fb_format - compute drm fourcc code from legacy description +* @dev: DRM device * @bpp: bits per pixels * @depth: bit depth per pixel -* @native: use host native byte order * * Computes a drm fourcc pixel format code for the given @bpp/@depth values. * Unlike drm_mode_legacy_fb_format() this looks at the drivers mode_config, -* and depending on the quirk_addfb_prefer_host_byte_order flag it returns -* little endian byte order or host byte order framebuffer formats. +* and depending on the &drm_mode_config.quirk_addfb_prefer_host_byte_order flag +* it returns little endian byte order or host byte order framebuffer formats. */ uint32_t drm_driver_legacy_fb_format (struct drm_device *dev,uint32_t bpp,uint32_t depth)
Signature · 6 lines
2.19.0.rc2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 20/22 drm/todo: Add some cleanup tasks
In reply to Daniel VetterMotivated by review comments from Ville&Sean.
--- Documentation/gpu/todo.rst | 10 ++++++++++ 1 file changed, 10 insertions(+)
Documentation/gpu/todo.rst +10 -0
@@ -339,6 +339,16 @@ Some of these date from the very introduction of KMS in 2008 ... leftovers from older (never merged into upstream) KMS designs where modes where set using their ID, including support to add/remove modes. +- Make ->funcs and ->helper_private vtables optional. There's a bunch of empty + function tables in drivers, but before we can remove them we need to make sure + that all the users in helpers and drivers do correctly check for a NULL + vtable. + +- Cleanup up the various ->destroy callbacks. A lot of them just wrapt the + drm_*_cleanup implementations and can be removed. Some tack a kfree() at the + end, for which we could add drm_*_cleanup_kfree(). And then there's the (for + historical reasons) misnamed drm_primary_helper_destroy() function. + Better Testing ==============
Signature · 6 lines
2.19.0.rc2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 21/22 drm/doc: kerneldoc for quirk_addfb_prefer_xbgr_30bpp
In reply to Daniel VetterShuts up warning noise.
--- include/drm/drm_mode_config.h | 7 +++++++ 1 file changed, 7 insertions(+)
include/drm/drm_mode_config.h +7 -0
@@ -809,6 +809,13 @@ struct drm_mode_config {/* dumb ioctl parameters */ uint32_t preferred_depth, prefer_shadow; + +/** +* @quirk_addfb_prefer_xbgr_30bpp: +* +* Special hack for legacy ADDFB to keep nouveau userspace happy. Should +* only ever be set by the nouveau kernel driver. +*/ bool quirk_addfb_prefer_xbgr_30bpp;/**
Signature · 6 lines
2.19.0.rc2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 22/22 drm/vblank: Remove old-style comments
In reply to Daniel VetterSomehow I forgot a few when typing all the shiny new kerneldoc. Drop them.
--- include/drm/drm_vblank.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
include/drm/drm_vblank.h +4 -4
@@ -95,7 +95,7 @@ struct drm_vblank_crtc {/** * @queue: Wait queue for vblank waiters. */ -wait_queue_head_t queue;/**< VBLANK wait queue */ +wait_queue_head_t queue;/** * @disable_timer: Disable timer for the delayed vblank disabling * hysteresis logic. Vblank disabling is controlled through the
@@ -107,7 +107,7 @@ struct drm_vblank_crtc {/** * @seqlock: Protect vblank count and time. */ -seqlock_t seqlock;/* protects vblank count and time */ +seqlock_t seqlock;/** * @count: Current software vblank counter.
@@ -123,7 +123,7 @@ struct drm_vblank_crtc {* this refcount reaches 0 can the hardware interrupt be disabled using * @disable_timer. */ -atomic_t refcount;/* number of users of vblank interruptsper crtc */ +atomic_t refcount;/** * @last: Protected by &drm_device.vbl_lock, used for wraparound handling. */
@@ -136,7 +136,7 @@ struct drm_vblank_crtc {* call drm_crtc_vblank_off() and drm_crtc_vblank_on(), which explicitly * save and restore the vblank count. */ -unsigned int inmodeset;/* Display driver is setting mode */ +unsigned int inmodeset;/** * @pipe: drm_crtc_index() of the &drm_crtc corresponding to this * structure.
Signature · 6 lines
2.19.0.rc2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.CHECKPATCH: warning for series starting with [FOR,CI,01/22] drm/amdgpu: Remove default best_encoder hook from DC
In reply to Daniel Vetter== Series Details ==
== Series Details ==
Series: series starting with [FOR,CI,01/22] drm/amdgpu: Remove default best_encoder hook from DC
URL : https://patchwork.freedesktop.org/series/50604/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip
e8d0c0e620ed drm/amdgpu: Remove default best_encoder hook from DC
-:18: ERROR:GIT_COMMIT_ID: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit a487411a6481 ("drm/amd/display: Use DRM helper for best_encoder")'
#18:
v3: Rebase onto a487411a6481 ("drm/amd/display: Use DRM helper for-:78: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <[email protected]>'
total: 1 errors, 1 warnings, 0 checks, 42 lines checked285fb9b7ff45 drm/atomic-helper: Unexport drm_atomic_helper_best_encoder
-:159: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <[email protected]>'
total: 0 errors, 1 warnings, 0 checks, 92 lines checkedb7beb6fe0d52 drm: Extract drm_atomic_state_helper.[hc]
-:646: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #646:
new file mode 100644
-:651: WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier tag in line 1 #651: FILE: drivers/gpu/drm/drm_atomic_state_helper.c:1:
+/*
-:963: WARNING:TYPO_SPELLING: 'conector' may be misspelled - perhaps 'connector'? #963: FILE: drivers/gpu/drm/drm_atomic_state_helper.c:313:
+ * the &drm_conector->state pointer of @connector, usually required when
-:1011: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #1011: FILE: drivers/gpu/drm/drm_atomic_state_helper.c:361:
+__drm_atomic_helper_connector_duplicate_state(struct drm_connector *connector,
+ struct drm_connector_state *state)
-:1161: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #1161: FILE: drivers/gpu/drm/drm_atomic_state_helper.c:511:
+void drm_atomic_helper_connector_destroy_state(struct drm_connector *connector,
+ struct drm_connector_state *state)
-:1320: WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier tag in line 1 #1320: FILE: include/drm/drm_atomic_state_helper.h:1:
+/*
-:1377: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #1377: FILE: include/drm/drm_atomic_state_helper.h:58:
+void drm_atomic_helper_plane_destroy_state(struct drm_plane *plane,
+ struct drm_plane_state *state);
-:1384: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #1384: FILE: include/drm/drm_atomic_state_helper.h:65:
+__drm_atomic_helper_connector_duplicate_state(struct drm_connector *connector,
+ struct drm_connector_state *state);
-:1393: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #1393: FILE: include/drm/drm_atomic_state_helper.h:74:
+void drm_atomic_helper_connector_destroy_state(struct drm_connector *connector,
+ struct drm_connector_state *state);
-:1399: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <[email protected]>'
total: 0 errors, 5 warnings, 5 checks, 782 lines checked3c6e0f6a4a7f drm/vmwgfx: Don't look at state->allow_modeset9658b1ed42e9 drm/vmwgfx: Remove confused comment from vmw_du_connector_atomic_set_property53071d9610f4 drm/atomic: Improve docs for drm_atomic_state->allow_modeset
-:42: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <[email protected]>'
total: 0 errors, 1 warnings, 0 checks, 22 lines checked93a299e75ced drm/vmwgfx: Add FIXME comments for customer page_flip handlers
-:58: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <[email protected]>'
total: 0 errors, 1 warnings, 0 checks, 21 lines checked5b070d3755f6 drm/arcpgu: Drop transitional hooks3ecfbb0954b7 drm/atmel: Drop transitional hooksc35d7c9a9980 drm/arcpgu: Use drm_atomic_helper_shutdowne3b717f6f73e drm/msm: Use drm_atomic_helper_shutdown0a7b3fe081aa drm/sti: Use drm_atomic_helper_shutdownaa8d1a2e05b1 drm/vc4: Use drm_atomic_helper_shutdownb6c1e7c113f6 drm/zte: Use drm_atomic_helper_shutdown6d3a3aa6bda4 drm: Remove transitional helpers
-:389: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <[email protected]>'
total: 0 errors, 1 warnings, 0 checks, 36 lines checkedb9b24a725014 drm/vmwgfx: Fix vmw_du_cursor_plane_atomic_check08032aca2ce1 drm: Unexport drm_plane_helper_check_update
-:100: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <[email protected]>'
total: 0 errors, 1 warnings, 0 checks, 78 lines checked5b69315a7d2a drm: Unexport primary plane helpers
-:181: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <[email protected]>'
total: 0 errors, 1 warnings, 0 checks, 144 lines checked0ec5d3edbff5 drm/doc: fix drm_driver_legacy_fb_formatbab2a18fc3d7 drm/todo: Add some cleanup tasks
-:35: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <[email protected]>'
total: 0 errors, 1 warnings, 0 checks, 16 lines checkedb03d5f016d18 drm/doc: kerneldoc for quirk_addfb_prefer_xbgr_30bpp
-:27: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <[email protected]>'
total: 0 errors, 1 warnings, 0 checks, 13 lines checked36d5a8ee32c8 drm/vblank: Remove old-style comments
-:50: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <[email protected]>'
total: 0 errors, 1 warnings, 0 checks, 32 lines checked
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.SPARSE: warning for series starting with [FOR,CI,01/22] drm/amdgpu: Remove default best_encoder hook from DC
In reply to Daniel Vetter== Series Details ==
== Series Details ==
Series: series starting with [FOR,CI,01/22] drm/amdgpu: Remove default best_encoder hook from DC
URL : https://patchwork.freedesktop.org/series/50604/
State : warning
== Summary ==
$ dim sparse origin/drm-tip Sparse version: v0.5.2 Commit: drm/amdgpu: Remove default best_encoder hook from DC -drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3290:6: warning: symbol 'dm_drm_plane_destroy_state' was not declared. Should it be static? +drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3289:6: warning: symbol 'dm_drm_plane_destroy_state' was not declared. Should it be static?
Commit: drm/atomic-helper: Unexport drm_atomic_helper_best_encoder Okay!
Commit: drm: Extract drm_atomic_state_helper.[hc]
Okay!
Commit: drm/vmwgfx: Don't look at state->allow_modeset Okay!
Commit: drm/vmwgfx: Remove confused comment from vmw_du_connector_atomic_set_property Okay!
Commit: drm/atomic: Improve docs for drm_atomic_state->allow_modeset Okay!
Commit: drm/vmwgfx: Add FIXME comments for customer page_flip handlers Okay!
Commit: drm/arcpgu: Drop transitional hooks
Okay!
Commit: drm/atmel: Drop transitional hooks
Okay!
Commit: drm/arcpgu: Use drm_atomic_helper_shutdown Okay!
Commit: drm/msm: Use drm_atomic_helper_shutdown
Okay!
Commit: drm/sti: Use drm_atomic_helper_shutdown
Okay!
Commit: drm/vc4: Use drm_atomic_helper_shutdown
Okay!
Commit: drm/zte: Use drm_atomic_helper_shutdown
Okay!
Commit: drm: Remove transitional helpers
Okay!
Commit: drm/vmwgfx: Fix vmw_du_cursor_plane_atomic_check Okay!
Commit: drm: Unexport drm_plane_helper_check_update Okay!
Commit: drm: Unexport primary plane helpers
Okay!
Commit: drm/doc: fix drm_driver_legacy_fb_format
Okay!
Commit: drm/todo: Add some cleanup tasks
Okay!
Commit: drm/doc: kerneldoc for quirk_addfb_prefer_xbgr_30bpp Okay!
Commit: drm/vblank: Remove old-style comments
Okay!
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for series starting with [FOR,CI,01/22] drm/amdgpu: Remove default best_encoder hook from DC
In reply to Daniel Vetter== Series Details ==
== Series Details ==
Series: series starting with [FOR,CI,01/22] drm/amdgpu: Remove default best_encoder hook from DC
URL : https://patchwork.freedesktop.org/series/50604/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4933 -> Patchwork_10374 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/50604/revisions/1/mbox/
== Known issues ==
Here are the changes found in Patchwork_10374 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_pipe_crc_basic@hang-read-crc-pipe-b:
fi-skl-guc: PASS -> FAIL (fdo#103191) +1
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
fi-bdw-samus: NOTRUN -> INCOMPLETE (fdo#107773) fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#107773 https://bugs.freedesktop.org/show_bug.cgi?id=107773
== Participating hosts (44 -> 40) ==
Additional (3): fi-glk-j4005 fi-bdw-samus fi-snb-2520m
Missing (7): fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-icl-u2 fi-ctg-p8600 fi-byt-clapper fi-kbl-r
== Build changes ==
* Linux: CI_DRM_4933 -> Patchwork_10374
CI_DRM_4933: 6b7a44d1597791524f46d7ea17620db54dffdc8c @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4669: 5f40e617cd9c1e089f4a2d79c53a417d891e3e3c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10374: 36d5a8ee32c8cf94336d7fce873eceb6239a4f4b @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
36d5a8ee32c8 drm/vblank: Remove old-style commentsb03d5f016d18 drm/doc: kerneldoc for quirk_addfb_prefer_xbgr_30bpp bab2a18fc3d7 drm/todo: Add some cleanup tasks0ec5d3edbff5 drm/doc: fix drm_driver_legacy_fb_format5b69315a7d2a drm: Unexport primary plane helpers08032aca2ce1 drm: Unexport drm_plane_helper_check_updateb9b24a725014 drm/vmwgfx: Fix vmw_du_cursor_plane_atomic_check6d3a3aa6bda4 drm: Remove transitional helpersb6c1e7c113f6 drm/zte: Use drm_atomic_helper_shutdownaa8d1a2e05b1 drm/vc4: Use drm_atomic_helper_shutdown0a7b3fe081aa drm/sti: Use drm_atomic_helper_shutdowne3b717f6f73e drm/msm: Use drm_atomic_helper_shutdownc35d7c9a9980 drm/arcpgu: Use drm_atomic_helper_shutdown3ecfbb0954b7 drm/atmel: Drop transitional hooks5b070d3755f6 drm/arcpgu: Drop transitional hooks93a299e75ced drm/vmwgfx: Add FIXME comments for customer page_flip handlers 53071d9610f4 drm/atomic: Improve docs for drm_atomic_state->allow_modeset 9658b1ed42e9 drm/vmwgfx: Remove confused comment from vmw_du_connector_atomic_set_property 3c6e0f6a4a7f drm/vmwgfx: Don't look at state->allow_modesetb7beb6fe0d52 drm: Extract drm_atomic_state_helper.[hc]285fb9b7ff45 drm/atomic-helper: Unexport drm_atomic_helper_best_encoder e8d0c0e620ed drm/amdgpu: Remove default best_encoder hook from DC
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10374/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for series starting with [FOR,CI,01/22] drm/amdgpu: Remove default best_encoder hook from DC
In reply to Daniel Vetter== Series Details ==
== Series Details ==
Series: series starting with [FOR,CI,01/22] drm/amdgpu: Remove default best_encoder hook from DC
URL : https://patchwork.freedesktop.org/series/50604/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4933_full -> Patchwork_10374_full =
== Summary - SUCCESS ==
No regressions found.
== Known issues ==
Here are the changes found in Patchwork_10374_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_ppgtt@blt-vs-render-ctxn:
shard-skl: NOTRUN -> TIMEOUT (fdo#108039)
igt@gem_softpin@noreloc-s3:
shard-skl: PASS -> INCOMPLETE (fdo#104108, fdo#107773)
igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-a:
shard-skl: NOTRUN -> DMESG-WARN (fdo#107956)
igt@kms_busy@extended-pageflip-hang-newfb-render-a:
shard-apl: PASS -> DMESG-WARN (fdo#107956)
igt@kms_color@pipe-a-ctm-max:
shard-apl: PASS -> FAIL (fdo#108147)
igt@kms_cursor_crc@cursor-256x256-onscreen:
shard-glk: PASS -> FAIL (fdo#103232)
igt@kms_cursor_crc@cursor-256x85-sliding:
shard-apl: PASS -> FAIL (fdo#103232) +1
igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy:
shard-hsw: PASS -> FAIL (fdo#105767)
igt@kms_draw_crc@draw-method-xrgb8888-render-untiled:
shard-skl: PASS -> FAIL (fdo#103184)
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-mmap-gtt:
shard-apl: PASS -> FAIL (fdo#103167)
igt@kms_frontbuffer_tracking@fbc-tilingchange:
shard-glk: PASS -> FAIL (fdo#103167)
igt@kms_frontbuffer_tracking@fbcpsr-rgb565-draw-mmap-gtt:
shard-skl: PASS -> FAIL (fdo#103167)
{igt@kms_plane_alpha_blend@pipe-a-alpha-transparant-fb}:
shard-skl: NOTRUN -> FAIL (fdo#108145) +1
igt@kms_plane_multiple@atomic-pipe-b-tiling-yf:
shard-apl: PASS -> FAIL (fdo#103166) +1
igt@kms_rotation_crc@exhaust-fences:
shard-skl: NOTRUN -> DMESG-WARN (fdo#105748)
igt@kms_setmode@basic:
shard-kbl: PASS -> FAIL (fdo#99912)
igt@kms_sysfs_edid_timing:
shard-skl: NOTRUN -> FAIL (fdo#100047)
igt@pm_rpm@fences:
shard-skl: PASS -> INCOMPLETE (fdo#107807)
==== Possible fixes ====
igt@gem_cpu_reloc@full:
shard-skl: INCOMPLETE (fdo#108073) -> PASS
igt@kms_busy@extended-pageflip-hang-newfb-render-b:
shard-glk: DMESG-WARN (fdo#107956) -> PASS
igt@kms_cursor_crc@cursor-128x128-suspend:
shard-glk: FAIL (fdo#103232) -> PASS +1
shard-apl: FAIL (fdo#103191, fdo#103232) -> PASS
igt@kms_cursor_crc@cursor-256x256-sliding:
shard-apl: FAIL (fdo#103232) -> PASS
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-wc:
shard-glk: FAIL (fdo#103167) -> PASS
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-move:
shard-apl: FAIL (fdo#103167) -> PASS
igt@kms_plane@plane-position-covered-pipe-b-planes:
shard-apl: FAIL (fdo#103166) -> PASS
igt@kms_plane_multiple@atomic-pipe-a-tiling-x:
shard-glk: DMESG-WARN (fdo#105763, fdo#106538) -> PASS +3
igt@pm_rpm@pm-tiling:
shard-skl: INCOMPLETE (fdo#107807) -> PASS
==== Warnings ====
igt@pm_backlight@fade_with_suspend:
shard-skl: FAIL (fdo#107847) -> INCOMPLETE (fdo#107773) {name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047
fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103184 https://bugs.freedesktop.org/show_bug.cgi?id=103184
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#103232 https://bugs.freedesktop.org/show_bug.cgi?id=103232
fdo#104108 https://bugs.freedesktop.org/show_bug.cgi?id=104108
fdo#105748 https://bugs.freedesktop.org/show_bug.cgi?id=105748
fdo#105763 https://bugs.freedesktop.org/show_bug.cgi?id=105763
fdo#105767 https://bugs.freedesktop.org/show_bug.cgi?id=105767
fdo#106538 https://bugs.freedesktop.org/show_bug.cgi?id=106538
fdo#107773 https://bugs.freedesktop.org/show_bug.cgi?id=107773
fdo#107807 https://bugs.freedesktop.org/show_bug.cgi?id=107807
fdo#107847 https://bugs.freedesktop.org/show_bug.cgi?id=107847
fdo#107956 https://bugs.freedesktop.org/show_bug.cgi?id=107956
fdo#108039 https://bugs.freedesktop.org/show_bug.cgi?id=108039
fdo#108073 https://bugs.freedesktop.org/show_bug.cgi?id=108073
fdo#108145 https://bugs.freedesktop.org/show_bug.cgi?id=108145
fdo#108147 https://bugs.freedesktop.org/show_bug.cgi?id=108147
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
== Participating hosts (6 -> 6) ==
No changes in participating hosts
== Build changes ==
* Linux: CI_DRM_4933 -> Patchwork_10374
CI_DRM_4933: 6b7a44d1597791524f46d7ea17620db54dffdc8c @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4669: 5f40e617cd9c1e089f4a2d79c53a417d891e3e3c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10374: 36d5a8ee32c8cf94336d7fce873eceb6239a4f4b @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10374/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx