Patch "clk: qcom: mmcc-msm8998: fix venus clock issue" has been added to the 5.10-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

    clk: qcom: mmcc-msm8998: fix venus clock issue

to the 5.10-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:
     clk-qcom-mmcc-msm8998-fix-venus-clock-issue.patch
and it can be found in the queue-5.10 subdirectory.

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



commit f840e1efe0a52a46682630c3419c67531d12072f
Author: Marc Gonzalez <mgonzalez@xxxxxxxxxx>
Date:   Thu Apr 25 17:07:07 2024 +0200

    clk: qcom: mmcc-msm8998: fix venus clock issue
    
    [ Upstream commit e20ae5ae9f0c843aded4f06f3d1cab7384789e92 ]
    
    Right now, msm8998 video decoder (venus) is non-functional:
    
    $ time mpv --hwdec=v4l2m2m-copy --vd-lavc-software-fallback=no --vo=null --no-audio --untimed --length=30 --quiet demo-480.webm
     (+) Video --vid=1 (*) (vp9 854x480 29.970fps)
         Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz)
    [ffmpeg/video] vp9_v4l2m2m: output VIDIOC_REQBUFS failed: Connection timed out
    [ffmpeg/video] vp9_v4l2m2m: no v4l2 output context's buffers
    [ffmpeg/video] vp9_v4l2m2m: can't configure decoder
    Could not open codec.
    Software decoding fallback is disabled.
    Exiting... (Quit)
    
    Bryan O'Donoghue suggested the proper fix:
    - Set required register offsets in venus GDSC structs.
    - Set HW_CTRL flag.
    
    $ time mpv --hwdec=v4l2m2m-copy --vd-lavc-software-fallback=no --vo=null --no-audio --untimed --length=30 --quiet demo-480.webm
     (+) Video --vid=1 (*) (vp9 854x480 29.970fps)
         Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz)
    [ffmpeg/video] vp9_v4l2m2m: VIDIOC_G_FMT ioctl
    [ffmpeg/video] vp9_v4l2m2m: VIDIOC_G_FMT ioctl
    ...
    Using hardware decoding (v4l2m2m-copy).
    VO: [null] 854x480 nv12
    Exiting... (End of file)
    real    0m3.315s
    user    0m1.277s
    sys     0m0.453s
    
    NOTES:
    
    GDSC = Globally Distributed Switch Controller
    
    Use same code as mmcc-msm8996 with:
    s/venus_gdsc/video_top_gdsc/
    s/venus_core0_gdsc/video_subcore0_gdsc/
    s/venus_core1_gdsc/video_subcore1_gdsc/
    
    https://git.codelinaro.org/clo/la/kernel/msm-4.4/-/blob/caf_migration/kernel.lnx.4.4.r38-rel/include/dt-bindings/clock/msm-clocks-hwio-8996.h
    https://git.codelinaro.org/clo/la/kernel/msm-4.4/-/blob/caf_migration/kernel.lnx.4.4.r38-rel/include/dt-bindings/clock/msm-clocks-hwio-8998.h
    
    0x1024 = MMSS_VIDEO GDSCR (undocumented)
    0x1028 = MMSS_VIDEO_CORE_CBCR
    0x1030 = MMSS_VIDEO_AHB_CBCR
    0x1034 = MMSS_VIDEO_AXI_CBCR
    0x1038 = MMSS_VIDEO_MAXI_CBCR
    0x1040 = MMSS_VIDEO_SUBCORE0 GDSCR (undocumented)
    0x1044 = MMSS_VIDEO_SUBCORE1 GDSCR (undocumented)
    0x1048 = MMSS_VIDEO_SUBCORE0_CBCR
    0x104c = MMSS_VIDEO_SUBCORE1_CBCR
    
    Fixes: d14b15b5931c2b ("clk: qcom: Add MSM8998 Multimedia Clock Controller (MMCC) driver")
    Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@xxxxxxxxxx>
    Signed-off-by: Marc Gonzalez <mgonzalez@xxxxxxxxxx>
    Reviewed-by: Jeffrey Hugo <quic_jhugo@xxxxxxxxxxx>
    Link: https://lore.kernel.org/r/ff4e2e34-a677-4c39-8c29-83655c5512ae@xxxxxxxxxx
    Signed-off-by: Bjorn Andersson <andersson@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/clk/qcom/mmcc-msm8998.c b/drivers/clk/qcom/mmcc-msm8998.c
index a68764cfb7930..5e2e60c1c2283 100644
--- a/drivers/clk/qcom/mmcc-msm8998.c
+++ b/drivers/clk/qcom/mmcc-msm8998.c
@@ -2587,6 +2587,8 @@ static struct clk_hw *mmcc_msm8998_hws[] = {
 
 static struct gdsc video_top_gdsc = {
 	.gdscr = 0x1024,
+	.cxcs = (unsigned int []){ 0x1028, 0x1034, 0x1038 },
+	.cxc_count = 3,
 	.pd = {
 		.name = "video_top",
 	},
@@ -2595,20 +2597,26 @@ static struct gdsc video_top_gdsc = {
 
 static struct gdsc video_subcore0_gdsc = {
 	.gdscr = 0x1040,
+	.cxcs = (unsigned int []){ 0x1048 },
+	.cxc_count = 1,
 	.pd = {
 		.name = "video_subcore0",
 	},
 	.parent = &video_top_gdsc.pd,
 	.pwrsts = PWRSTS_OFF_ON,
+	.flags = HW_CTRL,
 };
 
 static struct gdsc video_subcore1_gdsc = {
 	.gdscr = 0x1044,
+	.cxcs = (unsigned int []){ 0x104c },
+	.cxc_count = 1,
 	.pd = {
 		.name = "video_subcore1",
 	},
 	.parent = &video_top_gdsc.pd,
 	.pwrsts = PWRSTS_OFF_ON,
+	.flags = HW_CTRL,
 };
 
 static struct gdsc mdss_gdsc = {




[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