diff options
author | Imre Deak <imre.deak@intel.com> | 2021-10-20 22:51:29 +0300 |
---|---|---|
committer | Imre Deak <imre.deak@intel.com> | 2021-10-21 21:44:36 +0300 |
commit | 672d07517e728acf15c1e39c3dfb7052000b434e (patch) | |
tree | 3366b7332901912312a75afa913a87420e377635 /drivers/gpu/drm/i915/display/intel_fb.h | |
parent | e2b8329432b880f3821f85e1253a9b6b9d714a86 (diff) | |
download | linux-672d07517e728acf15c1e39c3dfb7052000b434e.tar.gz linux-672d07517e728acf15c1e39c3dfb7052000b434e.tar.bz2 linux-672d07517e728acf15c1e39c3dfb7052000b434e.zip |
drm/i915: Move intel_get_format_info() to intel_fb.c
Move the function retrieving the format override information for a given
format/modifier to intel_fb.c. We can store a pointer to the format list
in each modifier's descriptor instead of the corresponding switch/case
logic, avoiding the listing of the modifiers twice.
v1: Unchanged.
v2: Handle invalid modifiers in intel_fb_get_format_info() passed from
userspace. (CI/igt_kms_addfb_basic/addfb25-bad-modifier)
v3: Move lookup_modifier() to the next patch, where it's first used.
Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211020195138.1841242-3-imre.deak@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_fb.h')
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_fb.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_fb.h b/drivers/gpu/drm/i915/display/intel_fb.h index 0f77e81e69d2..97b31c3a2982 100644 --- a/drivers/gpu/drm/i915/display/intel_fb.h +++ b/drivers/gpu/drm/i915/display/intel_fb.h @@ -36,6 +36,9 @@ u64 *intel_fb_plane_get_modifiers(struct drm_i915_private *i915, enum intel_plane_caps plane_caps); bool intel_fb_plane_supports_modifier(struct intel_plane *plane, u64 modifier); +const struct drm_format_info * +intel_fb_get_format_info(const struct drm_mode_fb_cmd2 *cmd); + bool is_surface_linear(const struct drm_framebuffer *fb, int color_plane); int main_to_ccs_plane(const struct drm_framebuffer *fb, int main_plane); |