drm: Simplify drm_for_each_legacy_plane arguments
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 9 Jul 2015 21:44:24 +0000 (23:44 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 22 Jul 2015 14:25:45 +0000 (16:25 +0200)
No need to pass the planelist when everyone just uses
dev->mode_config.plane_list anyway.

I want to add a pile more of iterators with unified (obj, dev)
arguments. This is just prep.

Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
drivers/gpu/drm/i915/intel_pm.c
drivers/gpu/drm/shmobile/shmob_drm_crtc.c
include/drm/drm_crtc.h

index 0d3e01434860faf9904814369e1e881a230f90f6..5004c4a46a9e30aac110ba61a7116e983e74ba01 100644 (file)
@@ -2356,7 +2356,7 @@ static void ilk_compute_wm_parameters(struct drm_crtc *crtc,
        p->pri.horiz_pixels = intel_crtc->config->pipe_src_w;
        p->cur.horiz_pixels = intel_crtc->base.cursor->state->crtc_w;
 
-       drm_for_each_legacy_plane(plane, &dev->mode_config.plane_list) {
+       drm_for_each_legacy_plane(plane, dev) {
                struct intel_plane *intel_plane = to_intel_plane(plane);
 
                if (intel_plane->pipe == pipe) {
index 859ccb658601e9ca476bbc6e1c5db50c4bbc8160..e9272b0a859246970d62c69b8c7132e20f799d68 100644 (file)
@@ -248,7 +248,7 @@ static void shmob_drm_crtc_start(struct shmob_drm_crtc *scrtc)
        lcdc_write(sdev, LDDDSR, value);
 
        /* Setup planes. */
-       drm_for_each_legacy_plane(plane, &dev->mode_config.plane_list) {
+       drm_for_each_legacy_plane(plane, dev) {
                if (plane->crtc == crtc)
                        shmob_drm_plane_setup(plane);
        }
index 57ca8cc383a615344498202384b1b814911bc766..5cf0e6c3fc41d95583eb220654eb79f902fa06fe 100644 (file)
@@ -1579,8 +1579,8 @@ static inline struct drm_property *drm_property_find(struct drm_device *dev,
 }
 
 /* Plane list iterator for legacy (overlay only) planes. */
-#define drm_for_each_legacy_plane(plane, planelist) \
-       list_for_each_entry(plane, planelist, head) \
+#define drm_for_each_legacy_plane(plane, dev) \
+       list_for_each_entry(plane, &(dev)->mode_config.plane_list, head) \
                if (plane->type == DRM_PLANE_TYPE_OVERLAY)
 
 #endif /* __DRM_CRTC_H__ */