Patch "drm/bridge: samsung-dsim: Set P divider based on min/max of fin pll" has been added to the 6.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

    drm/bridge: samsung-dsim: Set P divider based on min/max of fin pll

to the 6.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:
     drm-bridge-samsung-dsim-set-p-divider-based-on-min-m.patch
and it can be found in the queue-6.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 16a6f851359cff65b446aeb8c2859f9316039a42
Author: Adam Ford <aford173@xxxxxxxxx>
Date:   Sat Jun 1 09:41:01 2024 -0500

    drm/bridge: samsung-dsim: Set P divider based on min/max of fin pll
    
    [ Upstream commit 78c4c0011bb577a29906d8ca135795af2293c49e ]
    
    The P divider should be set based on the min and max values of
    the fin pll which may vary between different platforms.
    These ranges are defined per platform, but hard-coded values
    were used instead which resulted in a smaller range available
    on the i.MX8M[MNP] than what was possible.
    
    As noted by Frieder, there are descripencies between the reference
    manuals of the Mini, Nano and Plus, so I reached out to my NXP
    rep and got the following response regarding the varing notes
    in the documentation.
    
    "Yes it is definitely wrong, the one that is part of the NOTE in
    MIPI_DPHY_M_PLLPMS register table against PMS_P, PMS_M and PMS_S is
    not correct. I will report this to Doc team, the one customer should
    be take into account is the Table 13-40 DPHY PLL Parameters and the
    Note above."
    
    With this patch, the clock rates now match the values used in NXP's
    downstream kernel.
    
    Fixes: 846307185f0f ("drm/bridge: samsung-dsim: update PLL reference clock")
    Signed-off-by: Adam Ford <aford173@xxxxxxxxx>
    Reviewed-by: Frieder Schrempf <frieder.schrempf@xxxxxxxxxx>
    Tested-by: Frieder Schrempf <frieder.schrempf@xxxxxxxxxx>
    Reviewed-by: Marek Vasut <marex@xxxxxxx>
    Tested-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
    Signed-off-by: Robert Foss <rfoss@xxxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20240601144103.198299-1-aford173@xxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge/samsung-dsim.c
index 95fedc68b0ae5..8476650c477c2 100644
--- a/drivers/gpu/drm/bridge/samsung-dsim.c
+++ b/drivers/gpu/drm/bridge/samsung-dsim.c
@@ -574,8 +574,8 @@ static unsigned long samsung_dsim_pll_find_pms(struct samsung_dsim *dsi,
 	u16 _m, best_m;
 	u8 _s, best_s;
 
-	p_min = DIV_ROUND_UP(fin, (12 * MHZ));
-	p_max = fin / (6 * MHZ);
+	p_min = DIV_ROUND_UP(fin, (driver_data->pll_fin_max * MHZ));
+	p_max = fin / (driver_data->pll_fin_min * MHZ);
 
 	for (_p = p_min; _p <= p_max; ++_p) {
 		for (_s = 0; _s <= 5; ++_s) {




[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