Skip to content

Commit

Permalink
WIP: drm/meson: overlay: fix OSD position during scaling on GXL/GXM
Browse files Browse the repository at this point in the history
Playing media with a resolution smaller than the crtc size requires the
media to be scaled for output. Current calculations scale correctly but
position the media incorrectly resulting in solid pink 1px line on the
bottom of the media. Fix the overlay calculations to correctly position
media and eliminate the line.

Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
  • Loading branch information
chewitt committed Feb 28, 2023
1 parent 3f6c183 commit 3d98470
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/gpu/drm/meson/meson_overlay.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,10 +323,10 @@ static void meson_overlay_setup_scaler_params(struct meson_drm *priv,
}

vsc_startp = max_t(int, start,
max_t(int, 0, video_top));
max_t(int, 0, video_top + 1));
vsc_endp = min_t(int, end,
min_t(int, crtc_height - 1,
video_top + video_height - 1));
min_t(int, crtc_height,
video_top + video_height + 1));

DRM_DEBUG("vsc startp %d endp %d start_lines %d end_lines %d\n",
vsc_startp, vsc_endp, vd_start_lines, vd_end_lines);
Expand Down

0 comments on commit 3d98470

Please sign in to comment.