Patch "drm/msm/dsi: Use DIV_ROUND_UP instead of conditional increment on modulo" has been added to the 6.1-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/msm/dsi: Use DIV_ROUND_UP instead of conditional increment on modulo

to the 6.1-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-msm-dsi-use-div_round_up-instead-of-conditional-.patch
and it can be found in the queue-6.1 subdirectory.

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



commit 9fe662851917018074d242c5e8fb9341540d3896
Author: Marijn Suijten <marijn.suijten@xxxxxxxxxxxxxx>
Date:   Wed Oct 26 20:28:17 2022 +0200

    drm/msm/dsi: Use DIV_ROUND_UP instead of conditional increment on modulo
    
    [ Upstream commit 1e8196103bd02a396b45c8f6188541634a47fce2 ]
    
    This exact same math is used to compute bytes_in_slice above in
    dsi_update_dsc_timing(), also used to fill slice_chunk_size.
    
    Fixes: b9080324d6ca ("drm/msm/dsi: add support for dsc data")
    Reviewed-by: Abhinav Kumar <quic_abhinavk@xxxxxxxxxxx>
    Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
    Signed-off-by: Marijn Suijten <marijn.suijten@xxxxxxxxxxxxxx>
    Patchwork: https://patchwork.freedesktop.org/patch/508935/
    Link: https://lore.kernel.org/r/20221026182824.876933-4-marijn.suijten@xxxxxxxxxxxxxx
    Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
index d94832504d0f..88c8aa5c6b80 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
@@ -1807,9 +1807,7 @@ static int dsi_populate_dsc_params(struct drm_dsc_config *dsc)
 	 * params are calculated
 	 */
 	groups_per_line = DIV_ROUND_UP(dsc->slice_width, 3);
-	dsc->slice_chunk_size = dsc->slice_width * dsc->bits_per_pixel / 8;
-	if ((dsc->slice_width * dsc->bits_per_pixel) % 8)
-		dsc->slice_chunk_size++;
+	dsc->slice_chunk_size = DIV_ROUND_UP(dsc->slice_width * dsc->bits_per_pixel, 8);
 
 	/* rbs-min */
 	min_rate_buffer_size =  dsc->rc_model_size - dsc->initial_offset +



[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