diff options
author | Simon Glass <sjg@chromium.org> | 2018-11-29 15:08:52 -0700 |
---|---|---|
committer | Anatolij Gustschin <agust@denx.de> | 2018-12-03 19:09:44 +0100 |
commit | 06696ebe674de7f65d4f5046a8639b358c6b358c (patch) | |
tree | 50631d977226b27f04dfeb9dbf777afd03d8e0ea /drivers/video/video-uclass.c | |
parent | 8f5bfb7615e82ffccebf79530b08034f81e56268 (diff) |
video: Allow driver to specify the line length
At present line_length is always calculated in video_post_probe(). But
some hardware may use a different line length, e.g. with a 1366-wide
display.
Allow the driver to set this value if needed.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
Diffstat (limited to 'drivers/video/video-uclass.c')
-rw-r--r-- | drivers/video/video-uclass.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index b6551b69d3..f307cf243b 100644 --- a/drivers/video/video-uclass.c +++ b/drivers/video/video-uclass.c @@ -226,7 +226,9 @@ static int video_post_probe(struct udevice *dev) /* Set up the line and display size */ priv->fb = map_sysmem(plat->base, plat->size); - priv->line_length = priv->xsize * VNBYTES(priv->bpix); + if (!priv->line_length) + priv->line_length = priv->xsize * VNBYTES(priv->bpix); + priv->fb_size = priv->line_length * priv->ysize; /* Set up colors */ |