Skip to content

Commit f709c06

Browse files
committed
drm/i915: s/planar_slave/is_y_plane/
Bspec talks about Y planes, not planar slaves. Switch to using the same terminology to make life a bit less confusing. v2: Adjust some comments too (Maarten) Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250212164330.16891-5-ville.syrjala@linux.intel.com
1 parent 00c8e0d commit f709c06

6 files changed

Lines changed: 17 additions & 25 deletions

File tree

drivers/gpu/drm/i915/display/intel_atomic_plane.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,7 @@ void intel_crtc_planes_update_noarm(struct intel_dsb *dsb,
841841

842842
/* TODO: for mailbox updates this should be skipped */
843843
if (new_plane_state->uapi.visible ||
844-
new_plane_state->planar_slave)
844+
new_plane_state->is_y_plane)
845845
intel_plane_update_noarm(dsb, plane,
846846
new_crtc_state, new_plane_state);
847847
}
@@ -874,7 +874,7 @@ static void skl_crtc_planes_update_arm(struct intel_dsb *dsb,
874874
* would have to be called here as well.
875875
*/
876876
if (new_plane_state->uapi.visible ||
877-
new_plane_state->planar_slave)
877+
new_plane_state->is_y_plane)
878878
intel_plane_update_arm(dsb, plane, new_crtc_state, new_plane_state);
879879
else
880880
intel_plane_disable_arm(dsb, plane, new_crtc_state);

drivers/gpu/drm/i915/display/intel_display.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4420,23 +4420,23 @@ static int icl_check_nv12_planes(struct intel_atomic_state *state,
44204420
return 0;
44214421

44224422
/*
4423-
* Destroy all old plane links and make the slave plane invisible
4423+
* Destroy all old plane links and make the Y plane invisible
44244424
* in the crtc_state->active_planes mask.
44254425
*/
44264426
for_each_new_intel_plane_in_state(state, plane, plane_state, i) {
44274427
if (plane->pipe != crtc->pipe || !plane_state->planar_linked_plane)
44284428
continue;
44294429

44304430
plane_state->planar_linked_plane = NULL;
4431-
if (plane_state->planar_slave && !plane_state->uapi.visible) {
4431+
if (plane_state->is_y_plane && !plane_state->uapi.visible) {
44324432
crtc_state->enabled_planes &= ~BIT(plane->id);
44334433
crtc_state->active_planes &= ~BIT(plane->id);
44344434
crtc_state->update_planes |= BIT(plane->id);
44354435
crtc_state->data_rate[plane->id] = 0;
44364436
crtc_state->rel_data_rate[plane->id] = 0;
44374437
}
44384438

4439-
plane_state->planar_slave = false;
4439+
plane_state->is_y_plane = false;
44404440
}
44414441

44424442
if (!crtc_state->nv12_planes)
@@ -4473,7 +4473,7 @@ static int icl_check_nv12_planes(struct intel_atomic_state *state,
44734473

44744474
plane_state->planar_linked_plane = linked;
44754475

4476-
linked_state->planar_slave = true;
4476+
linked_state->is_y_plane = true;
44774477
linked_state->planar_linked_plane = plane;
44784478
crtc_state->enabled_planes |= BIT(linked->id);
44794479
crtc_state->active_planes |= BIT(linked->id);
@@ -4486,7 +4486,7 @@ static int icl_check_nv12_planes(struct intel_atomic_state *state,
44864486
plane->base.base.id, plane->base.name,
44874487
linked->base.base.id, linked->base.name);
44884488

4489-
/* Copy parameters to slave plane */
4489+
/* Copy parameters to Y plane */
44904490
linked_state->ctl = plane_state->ctl | PLANE_CTL_YUV420_Y_PLANE;
44914491
linked_state->color_ctl = plane_state->color_ctl;
44924492
linked_state->view = plane_state->view;
@@ -5820,7 +5820,7 @@ intel_verify_planes(struct intel_atomic_state *state)
58205820

58215821
for_each_new_intel_plane_in_state(state, plane,
58225822
plane_state, i)
5823-
assert_plane(plane, plane_state->planar_slave ||
5823+
assert_plane(plane, plane_state->is_y_plane ||
58245824
plane_state->uapi.visible);
58255825
}
58265826

drivers/gpu/drm/i915/display/intel_display_debugfs.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,8 @@ static const char *plane_visibility(const struct intel_plane_state *plane_state)
330330
if (plane_state->uapi.visible)
331331
return "visible";
332332

333-
if (plane_state->planar_slave)
334-
return "planar-slave";
333+
if (plane_state->is_y_plane)
334+
return "Y plane";
335335

336336
return "hidden";
337337
}
@@ -364,7 +364,7 @@ static void intel_plane_uapi_info(struct seq_file *m, struct intel_plane *plane)
364364
if (plane_state->planar_linked_plane)
365365
seq_printf(m, "\t\tplanar: Linked to [PLANE:%d:%s] as a %s\n",
366366
plane_state->planar_linked_plane->base.base.id, plane_state->planar_linked_plane->base.name,
367-
plane_state->planar_slave ? "slave" : "master");
367+
plane_state->is_y_plane ? "Y plane" : "UV plane");
368368
}
369369

370370
static void intel_plane_hw_info(struct seq_file *m, struct intel_plane *plane)

drivers/gpu/drm/i915/display/intel_display_types.h

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,9 @@ struct intel_plane_state {
640640
/* Plane state to display black pixels when pxp is borked */
641641
bool force_black;
642642

643+
/* Acting as Y plane for another UV plane? */
644+
bool is_y_plane;
645+
643646
/* plane control register */
644647
u32 ctl;
645648

@@ -679,16 +682,6 @@ struct intel_plane_state {
679682
*/
680683
struct intel_plane *planar_linked_plane;
681684

682-
/*
683-
* planar_slave:
684-
* If set don't update use the linked plane's state for updating
685-
* this plane during atomic commit with the update_slave() callback.
686-
*
687-
* It's also used by the watermark code to ignore wm calculations on
688-
* this plane. They're calculated by the linked plane's wm code.
689-
*/
690-
u32 planar_slave;
691-
692685
struct drm_intel_sprite_colorkey ckey;
693686

694687
struct drm_rect psr2_sel_fetch_area;

drivers/gpu/drm/i915/display/skl_universal_plane.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1375,8 +1375,7 @@ static void icl_plane_csc_load_black(struct intel_dsb *dsb,
13751375

13761376
static int icl_plane_color_plane(const struct intel_plane_state *plane_state)
13771377
{
1378-
/* Program the UV plane on planar master */
1379-
if (plane_state->planar_linked_plane && !plane_state->planar_slave)
1378+
if (plane_state->planar_linked_plane && !plane_state->is_y_plane)
13801379
return 1;
13811380
else
13821381
return 0;

drivers/gpu/drm/i915/display/skl_watermark.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2260,8 +2260,8 @@ static int icl_build_plane_wm(struct intel_crtc_state *crtc_state,
22602260
struct skl_plane_wm *wm = &crtc_state->wm.skl.raw.planes[plane_id];
22612261
int ret;
22622262

2263-
/* Watermarks calculated in master */
2264-
if (plane_state->planar_slave)
2263+
/* Watermarks calculated on UV plane */
2264+
if (plane_state->is_y_plane)
22652265
return 0;
22662266

22672267
memset(wm, 0, sizeof(*wm));

0 commit comments

Comments
 (0)