Skip to content

Commit 4ea50e9

Browse files
committed
drm: Simplify drm_for_each_legacy_plane arguments
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 <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
1 parent e0548f1 commit 4ea50e9

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

drivers/gpu/drm/i915/intel_pm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2356,7 +2356,7 @@ static void ilk_compute_wm_parameters(struct drm_crtc *crtc,
23562356
p->pri.horiz_pixels = intel_crtc->config->pipe_src_w;
23572357
p->cur.horiz_pixels = intel_crtc->base.cursor->state->crtc_w;
23582358

2359-
drm_for_each_legacy_plane(plane, &dev->mode_config.plane_list) {
2359+
drm_for_each_legacy_plane(plane, dev) {
23602360
struct intel_plane *intel_plane = to_intel_plane(plane);
23612361

23622362
if (intel_plane->pipe == pipe) {

drivers/gpu/drm/shmobile/shmob_drm_crtc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ static void shmob_drm_crtc_start(struct shmob_drm_crtc *scrtc)
248248
lcdc_write(sdev, LDDDSR, value);
249249

250250
/* Setup planes. */
251-
drm_for_each_legacy_plane(plane, &dev->mode_config.plane_list) {
251+
drm_for_each_legacy_plane(plane, dev) {
252252
if (plane->crtc == crtc)
253253
shmob_drm_plane_setup(plane);
254254
}

include/drm/drm_crtc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1579,8 +1579,8 @@ static inline struct drm_property *drm_property_find(struct drm_device *dev,
15791579
}
15801580

15811581
/* Plane list iterator for legacy (overlay only) planes. */
1582-
#define drm_for_each_legacy_plane(plane, planelist) \
1583-
list_for_each_entry(plane, planelist, head) \
1582+
#define drm_for_each_legacy_plane(plane, dev) \
1583+
list_for_each_entry(plane, &(dev)->mode_config.plane_list, head) \
15841584
if (plane->type == DRM_PLANE_TYPE_OVERLAY)
15851585

15861586
#endif /* __DRM_CRTC_H__ */

0 commit comments

Comments
 (0)