mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
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>
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user