drm: Add a plane->reset hook
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 29 Jul 2014 13:32:37 +0000 (15:32 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 11 Aug 2014 12:24:44 +0000 (14:24 +0200)
In general having this can't hurt, and the atomic helpers will need
it to be able to reset the state objects properly. The overall idea
is to reset in the order pixels flow, so planes -> crtcs ->
encoders -> connectors.

v2: Squash in fixup from Ville to correctly deference struct drm_plane
instead of drm_crtc when walking the plane list. Fixes an oops in
driver init and resume.

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_crtc.c
include/drm/drm_crtc.h

index cacb460a714570b4de225152e84c59ccab30ed0c..285e62a134b28036328d21519a734144de6056c7 100644 (file)
@@ -4663,9 +4663,14 @@ out:
 void drm_mode_config_reset(struct drm_device *dev)
 {
        struct drm_crtc *crtc;
+       struct drm_plane *plane;
        struct drm_encoder *encoder;
        struct drm_connector *connector;
 
+       list_for_each_entry(plane, &dev->mode_config.plane_list, head)
+               if (plane->funcs->reset)
+                       plane->funcs->reset(plane);
+
        list_for_each_entry(crtc, &dev->mode_config.crtc_list, head)
                if (crtc->funcs->reset)
                        crtc->funcs->reset(crtc);
index 279565aa0c33e4fb589c94266baf25dd1b731acc..2c1f58d6957ad22f30c9283a5e73bd8196727b28 100644 (file)
@@ -581,6 +581,7 @@ struct drm_plane_funcs {
                            uint32_t src_w, uint32_t src_h);
        int (*disable_plane)(struct drm_plane *plane);
        void (*destroy)(struct drm_plane *plane);
+       void (*reset)(struct drm_plane *plane);
 
        int (*set_property)(struct drm_plane *plane,
                            struct drm_property *property, uint64_t val);
This page took 0.030498 seconds and 5 git commands to generate.