Patch "drm/i915/dsc: Fix the macro that calculates DSCC_/DSCA_ PPS reg address" has been added to the 6.7-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/dsc: Fix the macro that calculates DSCC_/DSCA_ PPS reg address

to the 6.7-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-dsc-fix-the-macro-that-calculates-dscc_-dsc.patch
and it can be found in the queue-6.7 subdirectory.

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



commit fbb006338ac2465e888a4c11725c5d09bb222260
Author: Manasi Navare <navaremanasi@xxxxxxxxxxxx>
Date:   Mon Feb 5 20:46:19 2024 +0000

    drm/i915/dsc: Fix the macro that calculates DSCC_/DSCA_ PPS reg address
    
    [ Upstream commit 962ac2dce56bb3aad1f82a4bbe3ada57a020287c ]
    
    Commit bd077259d0a9 ("drm/i915/vdsc: Add function to read any PPS
    register") defines a new macro to calculate the DSC PPS register
    addresses with PPS number as an input. This macro correctly calculates
    the addresses till PPS 11 since the addresses increment by 4. So in that
    case the following macro works correctly to give correct register
    address:
    
    _MMIO(_DSCA_PPS_0 + (pps) * 4)
    
    However after PPS 11, the register address for PPS 12 increments by 12
    because of RC Buffer memory allocation in between. Because of this
    discontinuity in the address space, the macro calculates wrong addresses
    for PPS 12 - 16 resulting into incorrect DSC PPS parameter value
    read/writes causing DSC corruption.
    
    This fixes it by correcting this macro to add the offset of 12 for PPS
    >=12.
    
    v3: Add correct paranthesis for pps argument (Jani Nikula)
    
    Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/10172
    Fixes: bd077259d0a9 ("drm/i915/vdsc: Add function to read any PPS register")
    Cc: Suraj Kandpal <suraj.kandpal@xxxxxxxxx>
    Cc: Ankit Nautiyal <ankit.k.nautiyal@xxxxxxxxx>
    Cc: Animesh Manna <animesh.manna@xxxxxxxxx>
    Cc: Jani Nikula <jani.nikula@xxxxxxxxxxxxxxx>
    Cc: Sean Paul <sean@xxxxxxxxxx>
    Cc: Drew Davenport <ddavenport@xxxxxxxxxxxx>
    Signed-off-by: Manasi Navare <navaremanasi@xxxxxxxxxxxx>
    Reviewed-by: Jani Nikula <jani.nikula@xxxxxxxxx>
    Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20240205204619.1991673-1-navaremanasi@xxxxxxxxxxxx
    (cherry picked from commit 6074be620c31dc2ae11af96a1a5ea95580976fb5)
    Signed-off-by: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/i915/display/intel_vdsc_regs.h b/drivers/gpu/drm/i915/display/intel_vdsc_regs.h
index 64f440fdc22b..8b21dc8e26d5 100644
--- a/drivers/gpu/drm/i915/display/intel_vdsc_regs.h
+++ b/drivers/gpu/drm/i915/display/intel_vdsc_regs.h
@@ -51,8 +51,8 @@
 #define DSCC_PICTURE_PARAMETER_SET_0		_MMIO(0x6BA00)
 #define _DSCA_PPS_0				0x6B200
 #define _DSCC_PPS_0				0x6BA00
-#define DSCA_PPS(pps)				_MMIO(_DSCA_PPS_0 + (pps) * 4)
-#define DSCC_PPS(pps)				_MMIO(_DSCC_PPS_0 + (pps) * 4)
+#define DSCA_PPS(pps)				_MMIO(_DSCA_PPS_0 + ((pps) < 12 ? (pps) : (pps) + 12) * 4)
+#define DSCC_PPS(pps)				_MMIO(_DSCC_PPS_0 + ((pps) < 12 ? (pps) : (pps) + 12) * 4)
 #define _ICL_DSC0_PICTURE_PARAMETER_SET_0_PB	0x78270
 #define _ICL_DSC1_PICTURE_PARAMETER_SET_0_PB	0x78370
 #define _ICL_DSC0_PICTURE_PARAMETER_SET_0_PC	0x78470




[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