mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 15:12:13 +02:00
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
This commit is contained in:
parent
00c8e0dd3d
commit
f709c06af8
|
|
@ -841,7 +841,7 @@ void intel_crtc_planes_update_noarm(struct intel_dsb *dsb,
|
|||
|
||||
/* TODO: for mailbox updates this should be skipped */
|
||||
if (new_plane_state->uapi.visible ||
|
||||
new_plane_state->planar_slave)
|
||||
new_plane_state->is_y_plane)
|
||||
intel_plane_update_noarm(dsb, plane,
|
||||
new_crtc_state, new_plane_state);
|
||||
}
|
||||
|
|
@ -874,7 +874,7 @@ static void skl_crtc_planes_update_arm(struct intel_dsb *dsb,
|
|||
* would have to be called here as well.
|
||||
*/
|
||||
if (new_plane_state->uapi.visible ||
|
||||
new_plane_state->planar_slave)
|
||||
new_plane_state->is_y_plane)
|
||||
intel_plane_update_arm(dsb, plane, new_crtc_state, new_plane_state);
|
||||
else
|
||||
intel_plane_disable_arm(dsb, plane, new_crtc_state);
|
||||
|
|
|
|||
|
|
@ -4420,7 +4420,7 @@ static int icl_check_nv12_planes(struct intel_atomic_state *state,
|
|||
return 0;
|
||||
|
||||
/*
|
||||
* Destroy all old plane links and make the slave plane invisible
|
||||
* Destroy all old plane links and make the Y plane invisible
|
||||
* in the crtc_state->active_planes mask.
|
||||
*/
|
||||
for_each_new_intel_plane_in_state(state, plane, plane_state, i) {
|
||||
|
|
@ -4428,7 +4428,7 @@ static int icl_check_nv12_planes(struct intel_atomic_state *state,
|
|||
continue;
|
||||
|
||||
plane_state->planar_linked_plane = NULL;
|
||||
if (plane_state->planar_slave && !plane_state->uapi.visible) {
|
||||
if (plane_state->is_y_plane && !plane_state->uapi.visible) {
|
||||
crtc_state->enabled_planes &= ~BIT(plane->id);
|
||||
crtc_state->active_planes &= ~BIT(plane->id);
|
||||
crtc_state->update_planes |= BIT(plane->id);
|
||||
|
|
@ -4436,7 +4436,7 @@ static int icl_check_nv12_planes(struct intel_atomic_state *state,
|
|||
crtc_state->rel_data_rate[plane->id] = 0;
|
||||
}
|
||||
|
||||
plane_state->planar_slave = false;
|
||||
plane_state->is_y_plane = false;
|
||||
}
|
||||
|
||||
if (!crtc_state->nv12_planes)
|
||||
|
|
@ -4473,7 +4473,7 @@ static int icl_check_nv12_planes(struct intel_atomic_state *state,
|
|||
|
||||
plane_state->planar_linked_plane = linked;
|
||||
|
||||
linked_state->planar_slave = true;
|
||||
linked_state->is_y_plane = true;
|
||||
linked_state->planar_linked_plane = plane;
|
||||
crtc_state->enabled_planes |= BIT(linked->id);
|
||||
crtc_state->active_planes |= BIT(linked->id);
|
||||
|
|
@ -4486,7 +4486,7 @@ static int icl_check_nv12_planes(struct intel_atomic_state *state,
|
|||
plane->base.base.id, plane->base.name,
|
||||
linked->base.base.id, linked->base.name);
|
||||
|
||||
/* Copy parameters to slave plane */
|
||||
/* Copy parameters to Y plane */
|
||||
linked_state->ctl = plane_state->ctl | PLANE_CTL_YUV420_Y_PLANE;
|
||||
linked_state->color_ctl = plane_state->color_ctl;
|
||||
linked_state->view = plane_state->view;
|
||||
|
|
@ -5820,7 +5820,7 @@ intel_verify_planes(struct intel_atomic_state *state)
|
|||
|
||||
for_each_new_intel_plane_in_state(state, plane,
|
||||
plane_state, i)
|
||||
assert_plane(plane, plane_state->planar_slave ||
|
||||
assert_plane(plane, plane_state->is_y_plane ||
|
||||
plane_state->uapi.visible);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -330,8 +330,8 @@ static const char *plane_visibility(const struct intel_plane_state *plane_state)
|
|||
if (plane_state->uapi.visible)
|
||||
return "visible";
|
||||
|
||||
if (plane_state->planar_slave)
|
||||
return "planar-slave";
|
||||
if (plane_state->is_y_plane)
|
||||
return "Y plane";
|
||||
|
||||
return "hidden";
|
||||
}
|
||||
|
|
@ -364,7 +364,7 @@ static void intel_plane_uapi_info(struct seq_file *m, struct intel_plane *plane)
|
|||
if (plane_state->planar_linked_plane)
|
||||
seq_printf(m, "\t\tplanar: Linked to [PLANE:%d:%s] as a %s\n",
|
||||
plane_state->planar_linked_plane->base.base.id, plane_state->planar_linked_plane->base.name,
|
||||
plane_state->planar_slave ? "slave" : "master");
|
||||
plane_state->is_y_plane ? "Y plane" : "UV plane");
|
||||
}
|
||||
|
||||
static void intel_plane_hw_info(struct seq_file *m, struct intel_plane *plane)
|
||||
|
|
|
|||
|
|
@ -640,6 +640,9 @@ struct intel_plane_state {
|
|||
/* Plane state to display black pixels when pxp is borked */
|
||||
bool force_black;
|
||||
|
||||
/* Acting as Y plane for another UV plane? */
|
||||
bool is_y_plane;
|
||||
|
||||
/* plane control register */
|
||||
u32 ctl;
|
||||
|
||||
|
|
@ -679,16 +682,6 @@ struct intel_plane_state {
|
|||
*/
|
||||
struct intel_plane *planar_linked_plane;
|
||||
|
||||
/*
|
||||
* planar_slave:
|
||||
* If set don't update use the linked plane's state for updating
|
||||
* this plane during atomic commit with the update_slave() callback.
|
||||
*
|
||||
* It's also used by the watermark code to ignore wm calculations on
|
||||
* this plane. They're calculated by the linked plane's wm code.
|
||||
*/
|
||||
u32 planar_slave;
|
||||
|
||||
struct drm_intel_sprite_colorkey ckey;
|
||||
|
||||
struct drm_rect psr2_sel_fetch_area;
|
||||
|
|
|
|||
|
|
@ -1375,8 +1375,7 @@ static void icl_plane_csc_load_black(struct intel_dsb *dsb,
|
|||
|
||||
static int icl_plane_color_plane(const struct intel_plane_state *plane_state)
|
||||
{
|
||||
/* Program the UV plane on planar master */
|
||||
if (plane_state->planar_linked_plane && !plane_state->planar_slave)
|
||||
if (plane_state->planar_linked_plane && !plane_state->is_y_plane)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -2260,8 +2260,8 @@ static int icl_build_plane_wm(struct intel_crtc_state *crtc_state,
|
|||
struct skl_plane_wm *wm = &crtc_state->wm.skl.raw.planes[plane_id];
|
||||
int ret;
|
||||
|
||||
/* Watermarks calculated in master */
|
||||
if (plane_state->planar_slave)
|
||||
/* Watermarks calculated on UV plane */
|
||||
if (plane_state->is_y_plane)
|
||||
return 0;
|
||||
|
||||
memset(wm, 0, sizeof(*wm));
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user