Patch "drm/i915/gen9+: Fix initial readout for Y tiled framebuffers" has been added to the 4.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/i915/gen9+: Fix initial readout for Y tiled framebuffers

to the 4.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-i915-gen9-fix-initial-readout-for-y-tiled-frameb.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit fb801c80078b0d9e8740a6824a46d5cc5b6132fe
Author: Imre Deak <imre.deak@xxxxxxxxx>
Date:   Tue Oct 16 19:00:11 2018 +0300

    drm/i915/gen9+: Fix initial readout for Y tiled framebuffers
    
    [ Upstream commit 914a4fd8cd28016038ce749a818a836124a8d270 ]
    
    If BIOS configured a Y tiled FB we failed to set up the backing object
    tiling accordingly, leading to a lack of GT fence installed and a
    garbled console.
    
    The problem was bisected to
    commit 011f22eb545a ("drm/i915: Do NOT skip the first 4k of stolen memory for pre-allocated buffers v2")
    but it just revealed a pre-existing issue.
    
    Kudos to Ville who suspected a missing fence looking at the corruption
    on the screen.
    
    Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
    Cc: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>
    Cc: Hans de Goede <hdegoede@xxxxxxxxxx>
    Cc: <ronald@xxxxxxxxxxxxx>
    Cc: <stable@xxxxxxxxxxxxxxx>
    Reported-by: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>
    Reported-by: <ronald@xxxxxxxxxxxxx>
    Tested-by: <ronald@xxxxxxxxxxxxx>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108264
    Fixes: bc8d7dffacb1 ("drm/i915/skl: Provide a Skylake version of get_plane_config()")
    Signed-off-by: Imre Deak <imre.deak@xxxxxxxxx>
    Reviewed-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20181016160011.28347-1-imre.deak@xxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index f5367bdc04049..2622dfc7d2d9a 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2712,6 +2712,17 @@ intel_alloc_initial_plane_obj(struct intel_crtc *crtc,
 	if (size_aligned * 2 > dev_priv->stolen_usable_size)
 		return false;
 
+	switch (fb->modifier) {
+	case DRM_FORMAT_MOD_LINEAR:
+	case I915_FORMAT_MOD_X_TILED:
+	case I915_FORMAT_MOD_Y_TILED:
+		break;
+	default:
+		DRM_DEBUG_DRIVER("Unsupported modifier for initial FB: 0x%llx\n",
+				 fb->modifier);
+		return false;
+	}
+
 	mutex_lock(&dev->struct_mutex);
 	obj = i915_gem_object_create_stolen_for_preallocated(dev_priv,
 							     base_aligned,
@@ -2721,8 +2732,17 @@ intel_alloc_initial_plane_obj(struct intel_crtc *crtc,
 	if (!obj)
 		return false;
 
-	if (plane_config->tiling == I915_TILING_X)
-		obj->tiling_and_stride = fb->pitches[0] | I915_TILING_X;
+	switch (plane_config->tiling) {
+	case I915_TILING_NONE:
+		break;
+	case I915_TILING_X:
+	case I915_TILING_Y:
+		obj->tiling_and_stride = fb->pitches[0] | plane_config->tiling;
+		break;
+	default:
+		MISSING_CASE(plane_config->tiling);
+		return false;
+	}
 
 	mode_cmd.pixel_format = fb->format->format;
 	mode_cmd.width = fb->width;
@@ -8812,6 +8832,7 @@ skylake_get_initial_plane_config(struct intel_crtc *crtc,
 		fb->modifier = I915_FORMAT_MOD_X_TILED;
 		break;
 	case PLANE_CTL_TILED_Y:
+		plane_config->tiling = I915_TILING_Y;
 		if (val & PLANE_CTL_RENDER_DECOMPRESSION_ENABLE)
 			fb->modifier = I915_FORMAT_MOD_Y_TILED_CCS;
 		else



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux