drm/i915/vdsc: Fix first_line_bpg_offset calculation
authorSuraj Kandpal <suraj.kandpal@intel.com>
Fri, 4 Aug 2023 08:37:37 +0000 (14:07 +0530)
committerAnkit Nautiyal <ankit.k.nautiyal@intel.com>
Mon, 14 Aug 2023 04:48:54 +0000 (10:18 +0530)
commit58554dbf0991da6a2847b3159594f6306bff978b
tree0dc4fd110b8024483e1be27d965581de1fd09de7
parent4bed08d99c681f1564e4a633b33d8a6d0446c706
drm/i915/vdsc: Fix first_line_bpg_offset calculation

On checking DSC1.1 Errata and DSC 1.2 spec the current formula
we were using was incorrect to calculate first_line_bpg_offset.
The new fixed formula is derived from C model.

--v2
-Use clamp function in linux/minmax.h [Ankit]

--v3
-remove linux/minmax.h header

Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230804083737.3844575-1-suraj.kandpal@intel.com
drivers/gpu/drm/i915/display/intel_vdsc.c