linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 00/10] drm/msm: Fix math issues in MSM DSC implementation
@ 2022-10-09 18:48 Marijn Suijten
  2022-10-09 18:48 ` [PATCH v3 01/10] drm/msm/dsi: Remove useless math in DSC calculations Marijn Suijten
                   ` (10 more replies)
  0 siblings, 11 replies; 35+ messages in thread
From: Marijn Suijten @ 2022-10-09 18:48 UTC (permalink / raw)
  To: phone-devel, Rob Clark, Abhinav Kumar, Dmitry Baryshkov, Vinod Koul
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Konrad Dybcio, Martin Botka, Jami Kettunen, Marijn Suijten,
	Sean Paul, David Airlie, Daniel Vetter, Douglas Anderson,
	Vladimir Lypak, linux-arm-msm, dri-devel, freedreno,
	linux-kernel

Various removals of complex yet unnecessary math, fixing all uses of
drm_dsc_config::bits_per_pixel to deal with the fact that this field
includes four fractional bits, and finally making sure that
range_bpg_offset contains values 6-bits wide to prevent overflows in
drm_dsc_pps_payload_pack().

Altogether this series is responsible for solving _all_ Display Stream
Compression issues and artifacts on the Sony Tama (sdm845) Akatsuki
smartphone (2880x1440p).

Changes since v2:
- Generalize mux_word_size setting depending on bits_per_component;
- Migrate DSI's DSC calculations to drm_dsc_compute_rc_parameters(),
  implicitly addressing existing math issues;
- Disallow any bits_per_component other than 8, until hardcoded values
  are updated and tested to support such cases.

v2: https://lore.kernel.org/linux-arm-msm/20221005181657.784375-1-marijn.suijten@somainline.org/T/#u

Changes since v1:

- Propagate r-b's, except (obviously) in patches that were (heavily)
  modified;
- Remove accidental debug code in dsi_cmd_dma_add;
- Move Range BPG Offset masking out of DCS PPS packing, back into the
  DSI driver when it is assigned to drm_dsc_config (this series is now
  strictly focusing on drm/msm again);
- Replace modulo-check resulting in conditional increment with
  DIV_ROUND_UP;
- Remove repeated calculation of slice_chunk_size;
- Use u16 instead of int when handling bits_per_pixel;
- Use DRM_DEV_ERROR instead of pr_err in DSI code;
- Also remove redundant target_bpp_x16 variable.

v1: https://lore.kernel.org/linux-arm-msm/20221001190807.358691-1-marijn.suijten@somainline.org/T/#u

Marijn Suijten (10):
  drm/msm/dsi: Remove useless math in DSC calculations
  drm/msm/dsi: Remove repeated calculation of slice_per_intf
  drm/msm/dsi: Use DIV_ROUND_UP instead of conditional increment on
    modulo
  drm/msm/dsi: Reuse earlier computed dsc->slice_chunk_size
  drm/msm/dsi: Appropriately set dsc->mux_word_size based on bpc
  drm/msm/dsi: Migrate to drm_dsc_compute_rc_parameters()
  drm/msm/dsi: Disallow 8 BPC DSC configuration for alternative BPC
    values
  drm/msm/dsi: Account for DSC's bits_per_pixel having 4 fractional bits
  drm/msm/dpu1: Account for DSC's bits_per_pixel having 4 fractional
    bits
  drm/msm/dsi: Prevent signed BPG offsets from bleeding into adjacent
    bits

 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.c |  11 +-
 drivers/gpu/drm/msm/dsi/dsi_host.c         | 121 ++++++---------------
 2 files changed, 37 insertions(+), 95 deletions(-)

--
2.38.0


^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2022-10-17 16:29 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-09 18:48 [PATCH v3 00/10] drm/msm: Fix math issues in MSM DSC implementation Marijn Suijten
2022-10-09 18:48 ` [PATCH v3 01/10] drm/msm/dsi: Remove useless math in DSC calculations Marijn Suijten
2022-10-09 18:52   ` Dmitry Baryshkov
2022-10-09 18:48 ` [PATCH v3 02/10] drm/msm/dsi: Remove repeated calculation of slice_per_intf Marijn Suijten
2022-10-09 18:53   ` Dmitry Baryshkov
2022-10-09 18:48 ` [PATCH v3 03/10] drm/msm/dsi: Use DIV_ROUND_UP instead of conditional increment on modulo Marijn Suijten
2022-10-09 18:53   ` Dmitry Baryshkov
2022-10-09 18:48 ` [PATCH v3 04/10] drm/msm/dsi: Reuse earlier computed dsc->slice_chunk_size Marijn Suijten
2022-10-09 18:54   ` Dmitry Baryshkov
2022-10-09 18:48 ` [PATCH v3 05/10] drm/msm/dsi: Appropriately set dsc->mux_word_size based on bpc Marijn Suijten
2022-10-09 18:55   ` Dmitry Baryshkov
2022-10-12 22:53   ` Abhinav Kumar
2022-10-09 18:48 ` [PATCH v3 06/10] drm/msm/dsi: Migrate to drm_dsc_compute_rc_parameters() Marijn Suijten
2022-10-09 18:56   ` Dmitry Baryshkov
2022-10-09 18:50 ` Marijn Suijten
2022-10-09 18:58   ` Marijn Suijten
2022-10-12 23:03   ` [Freedreno] " Abhinav Kumar
2022-10-13  9:36     ` Marijn Suijten
2022-10-13 16:02       ` Abhinav Kumar
2022-10-17  8:59         ` Marijn Suijten
2022-10-17 13:37           ` Caleb Connolly
2022-10-17 16:28             ` Abhinav Kumar
2022-10-09 18:51 ` [PATCH v3 07/10] drm/msm/dsi: Disallow 8 BPC DSC configuration for alternative BPC values Marijn Suijten
2022-10-09 18:57   ` Dmitry Baryshkov
2022-10-09 23:53   ` kernel test robot
2022-10-12 23:08   ` Abhinav Kumar
2022-10-13  9:27     ` Marijn Suijten
2022-10-09 18:53 ` [PATCH v3 08/10] drm/msm/dsi: Account for DSC's bits_per_pixel having 4 fractional bits Marijn Suijten
2022-10-09 19:24   ` Dmitry Baryshkov
2022-10-12 23:25   ` Abhinav Kumar
2022-10-09 18:53 ` [PATCH v3 09/10] drm/msm/dpu1: " Marijn Suijten
2022-10-09 18:53 ` [PATCH v3 10/10] drm/msm/dsi: Prevent signed BPG offsets from bleeding into adjacent bits Marijn Suijten
2022-10-09 19:14   ` Dmitry Baryshkov
2022-10-11  7:51     ` Marijn Suijten
2022-10-12 23:26   ` Abhinav Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).