Skip to content

Commit 73206a7

Browse files
committed
drm/i915: Populate fb->format accurately in BIOS FB readout
Use drm_get_format_info() instead of drm_format_info() to populate fb->format during the BIOS FB readout. The difference being that drm_get_format_info() knows about compressed formats whereas drm_format_info() doesn't. This doesn't actually matter in practice since the BIOS FB should never be compressed, but no reason we shouldn't use the more accurate function here anyway. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patch.msgid.link/20251107181126.5743-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com>
1 parent 95357b6 commit 73206a7

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1203,7 +1203,8 @@ i9xx_get_initial_plane_config(struct intel_crtc *crtc,
12031203

12041204
pixel_format = val & DISP_FORMAT_MASK;
12051205
fourcc = i9xx_format_to_fourcc(pixel_format);
1206-
fb->format = drm_format_info(fourcc);
1206+
1207+
fb->format = drm_get_format_info(display->drm, fourcc, fb->modifier);
12071208

12081209
if (display->platform.haswell || display->platform.broadwell) {
12091210
offset = intel_de_read(display,

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3083,7 +3083,6 @@ skl_get_initial_plane_config(struct intel_crtc *crtc,
30833083

30843084
fourcc = skl_format_to_fourcc(pixel_format,
30853085
val & PLANE_CTL_ORDER_RGBX, alpha);
3086-
fb->format = drm_format_info(fourcc);
30873086

30883087
tiling = val & PLANE_CTL_TILED_MASK;
30893088
switch (tiling) {
@@ -3136,6 +3135,8 @@ skl_get_initial_plane_config(struct intel_crtc *crtc,
31363135
goto error;
31373136
}
31383137

3138+
fb->format = drm_get_format_info(display->drm, fourcc, fb->modifier);
3139+
31393140
if (!display->params.enable_dpt &&
31403141
intel_fb_modifier_uses_dpt(display, fb->modifier)) {
31413142
drm_dbg_kms(display->drm, "DPT disabled, skipping initial FB\n");

0 commit comments

Comments
 (0)