mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 00:39:48 +00:00
drm/amd/display: Fix ODM policy implementation
[WHY] Only the leftmost ODM pipe should be offset when scaling. A previous code change was intended to implement this policy, but a section of code was overlooked. Signed-off-by: Wesley Chalmers <Wesley.Chalmers@amd.com> Reviewed-by: Aric Cyr <Aric.Cyr@amd.com> Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: <stable@vger.kernel.org>
This commit is contained in:
parent
099303e9a9
commit
25b3158172
1 changed files with 6 additions and 5 deletions
|
@ -785,14 +785,15 @@ static void calculate_recout(struct pipe_ctx *pipe_ctx)
|
|||
/*
|
||||
* Only the leftmost ODM pipe should be offset by a nonzero distance
|
||||
*/
|
||||
if (!pipe_ctx->prev_odm_pipe)
|
||||
if (!pipe_ctx->prev_odm_pipe) {
|
||||
data->recout.x = stream->dst.x;
|
||||
else
|
||||
data->recout.x = 0;
|
||||
if (stream->src.x < surf_clip.x)
|
||||
data->recout.x += (surf_clip.x - stream->src.x) * stream->dst.width
|
||||
if (stream->src.x < surf_clip.x)
|
||||
data->recout.x += (surf_clip.x - stream->src.x) * stream->dst.width
|
||||
/ stream->src.width;
|
||||
|
||||
} else
|
||||
data->recout.x = 0;
|
||||
|
||||
data->recout.width = surf_clip.width * stream->dst.width / stream->src.width;
|
||||
if (data->recout.width + data->recout.x > stream->dst.x + stream->dst.width)
|
||||
data->recout.width = stream->dst.x + stream->dst.width - data->recout.x;
|
||||
|
|
Loading…
Reference in a new issue