rockchip_ebc: clamp y to [0, height]
This shouldn't happen under normal circumstances, but this shouldn't hurt.
This commit is contained in:
parent
ba93d50d29
commit
a99b1a4503
2 changed files with 7 additions and 4 deletions
|
@ -1517,6 +1517,9 @@ static void rockchip_ebc_plane_atomic_update(struct drm_plane *plane,
|
|||
max(0, min(src_clip.x1 & ~15, (int)ebc->pixel_pitch - 16));
|
||||
src_clip.x2 = min((src_clip.x2 + 15) & ~15, (int)ebc->pixel_pitch);
|
||||
|
||||
src_clip.y1 = max(0, src_clip.y1);
|
||||
src_clip.y2 = min((int) ebc->height, src_clip.y2);
|
||||
|
||||
// This is the buffer we are allowed to modify, as it's not being read by the refresh thread
|
||||
int idx_update = ctx->update_index;
|
||||
|
||||
|
|
|
@ -67,8 +67,8 @@ void rockchip_ebc_schedule_advance_fast_neon(
|
|||
uint16x4_t q16s_maxs = vdup_n_u16(0);
|
||||
uint64x1_t q64s_0x00 = vdup_n_u64(0);
|
||||
|
||||
for (unsigned int y = clip_ongoing_or_waiting->y1;
|
||||
y < clip_ongoing_or_waiting->y2; ++y) {
|
||||
for (unsigned int y = max(0, clip_ongoing_or_waiting->y1);
|
||||
y < min((int) ebc->height, clip_ongoing_or_waiting->y2); ++y) {
|
||||
int offset = y * pixel_pitch + x_start;
|
||||
u8 *packed_inner_outer_nextprev_line = ebc->packed_inner_outer_nextprev + offset * 3;
|
||||
u8 *phases_line =
|
||||
|
@ -313,8 +313,8 @@ void rockchip_ebc_schedule_advance_neon(
|
|||
uint16x4_t q16s_maxs = vdup_n_u16(0);
|
||||
uint64x1_t q64s_0x00 = vdup_n_u64(0);
|
||||
|
||||
for (unsigned int y = clip_ongoing_or_waiting->y1;
|
||||
y < clip_ongoing_or_waiting->y2; ++y) {
|
||||
for (unsigned int y = max(0, clip_ongoing_or_waiting->y1);
|
||||
y < min((int) ebc->height, clip_ongoing_or_waiting->y2); ++y) {
|
||||
int offset = y * pixel_pitch + x_start;
|
||||
u8 *packed_inner_outer_nextprev_line = ebc->packed_inner_outer_nextprev + offset * 3;
|
||||
u8 *phases_line = phase_buffer + y * phase_pitch +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue