Re: [PATCH 5/5] drm/dsc: Prevent negative BPG offsets from shadowing adjacent bitfields

2022-10-05 Thread Marijn Suijten
On 2022-10-05 08:33:23, Abhinav Kumar wrote: [..] > hmm downstream seems to have the & just before the reg write > > https://git.codelinaro.org/clo/la/platform/vendor/opensource/display-drivers/-/blob/DISPLAY.LA.2.0.r1-08000-WAIPIO.0/msm/sde/sde_hw_dsc_1_2.c#L310

Re: [PATCH 5/5] drm/dsc: Prevent negative BPG offsets from shadowing adjacent bitfields

2022-10-05 Thread Abhinav Kumar
On 10/4/2022 3:39 PM, Marijn Suijten wrote: On 2022-10-04 15:31:10, Abhinav Kumar wrote: On 10/4/2022 2:57 PM, Marijn Suijten wrote: [..] Alas, as explained in the cover letter I opted to perform the masking in the PPS packing code as the DSC block code also reads these values, and would

Re: [PATCH 5/5] drm/dsc: Prevent negative BPG offsets from shadowing adjacent bitfields

2022-10-04 Thread Marijn Suijten
On 2022-10-04 15:31:10, Abhinav Kumar wrote: > > > On 10/4/2022 2:57 PM, Marijn Suijten wrote: > > [..] > > Alas, as explained in the cover letter I opted to perform the masking in > > the PPS packing code as the DSC block code also reads these values, and > > would suddenly write 6-bit intead

Re: [PATCH 5/5] drm/dsc: Prevent negative BPG offsets from shadowing adjacent bitfields

2022-10-04 Thread Abhinav Kumar
On 10/4/2022 2:57 PM, Marijn Suijten wrote: On 2022-10-04 13:22:25, Abhinav Kumar wrote: On 10/1/2022 12:08 PM, Marijn Suijten wrote: msm's dsi_host specifies negative BPG offsets which fill the full 8 bits of a char thanks to two's complement: this however results in those bits bleeding

Re: [PATCH 5/5] drm/dsc: Prevent negative BPG offsets from shadowing adjacent bitfields

2022-10-04 Thread Marijn Suijten
On 2022-10-04 13:22:25, Abhinav Kumar wrote: > > On 10/1/2022 12:08 PM, Marijn Suijten wrote: > > msm's dsi_host specifies negative BPG offsets which fill the full 8 bits > > of a char thanks to two's complement: this however results in those bits > > bleeding into the next parameter when the

Re: [PATCH 5/5] drm/dsc: Prevent negative BPG offsets from shadowing adjacent bitfields

2022-10-04 Thread Marijn Suijten
On 2022-10-04 17:41:07, Dmitry Baryshkov wrote: > On Sat, 1 Oct 2022 at 23:23, Marijn Suijten > wrote: > [..] > > Pre-empting the reviews: I was contemplating whether to use FIELD_PREP > > here, given that it's not yet used anywhere else in this file. For that > > I'd remove the existing _SHIFT

Re: [PATCH 5/5] drm/dsc: Prevent negative BPG offsets from shadowing adjacent bitfields

2022-10-04 Thread Abhinav Kumar
On 10/1/2022 12:08 PM, Marijn Suijten wrote: msm's dsi_host specifies negative BPG offsets which fill the full 8 bits of a char thanks to two's complement: this however results in those bits bleeding into the next parameter when the field is only expected to contain 6-bit wide values. As a

Re: [PATCH 5/5] drm/dsc: Prevent negative BPG offsets from shadowing adjacent bitfields

2022-10-04 Thread Dmitry Baryshkov
On Sat, 1 Oct 2022 at 23:23, Marijn Suijten wrote: > > On 2022-10-01 21:08:07, Marijn Suijten wrote: > > msm's dsi_host specifies negative BPG offsets which fill the full 8 bits > > of a char thanks to two's complement: this however results in those bits > > bleeding into the next parameter when

Re: [PATCH 5/5] drm/dsc: Prevent negative BPG offsets from shadowing adjacent bitfields

2022-10-01 Thread Marijn Suijten
On 2022-10-01 21:08:07, Marijn Suijten wrote: > msm's dsi_host specifies negative BPG offsets which fill the full 8 bits > of a char thanks to two's complement: this however results in those bits > bleeding into the next parameter when the field is only expected to > contain 6-bit wide values. >

[PATCH 5/5] drm/dsc: Prevent negative BPG offsets from shadowing adjacent bitfields

2022-10-01 Thread Marijn Suijten
msm's dsi_host specifies negative BPG offsets which fill the full 8 bits of a char thanks to two's complement: this however results in those bits bleeding into the next parameter when the field is only expected to contain 6-bit wide values. As a consequence random slices appear corrupted on-screen