diff options
| author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2025-10-10 00:13:11 +0300 |
|---|---|---|
| committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2025-10-29 00:23:20 +0300 |
| commit | 744b861b37043f7ddec214e3fb648ea4fac707cb (patch) | |
| tree | af4187b72329abc3dbb92908cecde380a3d86100 | |
| parent | 50e6b6ad48066df6d7847ccc17fe77f400b39d79 (diff) | |
| download | linux-744b861b37043f7ddec214e3fb648ea4fac707cb.tar.xz | |
drm/i915: Extract glk_plane_has_planar()
Extract glk_plane_has_planar() out from skl_plane_has_planar()
to make the logic a bit less convoluted.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20251009211313.30234-8-ville.syrjala@linux.intel.com
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
| -rw-r--r-- | drivers/gpu/drm/i915/display/skl_universal_plane.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/gpu/drm/i915/display/skl_universal_plane.c index 3d5ed1581cb5..2cc9ed49a191 100644 --- a/drivers/gpu/drm/i915/display/skl_universal_plane.c +++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c @@ -2425,7 +2425,7 @@ static bool skl_plane_has_planar(struct intel_display *display, if (display->platform.skylake || display->platform.broxton) return false; - if (DISPLAY_VER(display) == 9 && pipe == PIPE_C) + if (pipe == PIPE_C) return false; if (plane_id != PLANE_1 && plane_id != PLANE_2) @@ -2447,11 +2447,20 @@ static const u32 *skl_get_plane_formats(struct intel_display *display, } } +static bool glk_plane_has_planar(struct intel_display *display, + enum pipe pipe, enum plane_id plane_id) +{ + if (plane_id != PLANE_1 && plane_id != PLANE_2) + return false; + + return true; +} + static const u32 *glk_get_plane_formats(struct intel_display *display, enum pipe pipe, enum plane_id plane_id, int *num_formats) { - if (skl_plane_has_planar(display, pipe, plane_id)) { + if (glk_plane_has_planar(display, pipe, plane_id)) { *num_formats = ARRAY_SIZE(glk_planar_formats); return glk_planar_formats; } else { |
