diff options
author | Ankit Nautiyal <ankit.k.nautiyal@intel.com> | 2023-11-10 15:40:11 +0530 |
---|---|---|
committer | Ankit Nautiyal <ankit.k.nautiyal@intel.com> | 2023-11-14 15:05:20 +0530 |
commit | 59a266f068b4f9f54c58e4066ac9ee9023ad9232 (patch) | |
tree | 0cd9d84aff149ca6a2c8958f4b31ac98b4476af7 /drivers/gpu/drm/i915/display/intel_link_bw.c | |
parent | 0c2287c9652150cf659408b66c1789830822132f (diff) | |
download | linux-59a266f068b4f9f54c58e4066ac9ee9023ad9232.tar.gz linux-59a266f068b4f9f54c58e4066ac9ee9023ad9232.tar.bz2 linux-59a266f068b4f9f54c58e4066ac9ee9023ad9232.zip |
drm/i915/display: Store compressed bpp in U6.4 format
DSC parameter bits_per_pixel is stored in U6.4 format.
The 4 bits represent the fractional part of the bpp.
Currently we use compressed_bpp member of dsc structure to store
only the integral part of the bits_per_pixel.
To store the full bits_per_pixel along with the fractional part,
compressed_bpp is changed to store bpp in U6.4 formats. Intergral
part is retrieved by simply right shifting the member compressed_bpp by 4.
v2:
-Use to_bpp_int, to_bpp_frac_dec, to_bpp_x16 helpers while dealing
with compressed bpp. (Suraj)
-Fix comment styling. (Suraj)
v3:
-Add separate file for 6.4 fixed point helper(Jani, Nikula)
-Add comment for magic values(Suraj)
v4:
-Fix checkpatch warnings caused by renaming(Suraj)
v5:
-Rebase.
-Use existing helpers for conversion of bpp_int to bpp_x16
and vice versa.
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Sui Jingfeng <suijingfeng@loongson.cn>
Link: https://patchwork.freedesktop.org/patch/msgid/20231110101020.4067342-3-ankit.k.nautiyal@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_link_bw.c')
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_link_bw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_link_bw.c b/drivers/gpu/drm/i915/display/intel_link_bw.c index 390db5c0c24a..02a0af2aa5ba 100644 --- a/drivers/gpu/drm/i915/display/intel_link_bw.c +++ b/drivers/gpu/drm/i915/display/intel_link_bw.c @@ -70,7 +70,7 @@ int intel_link_bw_reduce_bpp(struct intel_atomic_state *state, return PTR_ERR(crtc_state); if (crtc_state->dsc.compression_enable) - link_bpp = crtc_state->dsc.compressed_bpp; + link_bpp = crtc_state->dsc.compressed_bpp_x16; else /* * TODO: for YUV420 the actual link bpp is only half |