mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 18:43:33 +02:00
Short summary of fixes pull (less than what git shortlog provides):
* drm/vc4: Fix LBM size calculation; Fix high resolutions for hvs5 -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEchf7rIzpz2NEoWjlaA3BHVMLeiMFAmARHGsACgkQaA3BHVML eiMwGgf+O+MQgxYdG9Y7HT1Wr9lrQAgbMCyo6HNK9TZvjN0eGJgZuE2FQ1v/jp9S 2zbgZl0tum6ZJ/bRQgObpTZqg0VD2sxx3tNsGHOD2xjYM0bs4yegftXnh/1pS6BM /ny9PgjPAjK0cbZGmSWEsPIC0X7KsTmlvb1ym794znSUqFkR9JLU2IxKDqV6mlD5 jcQ8yn0QnxAmYmXWQzP74IPkN2LcehhdMGt8qVKhLtwkCgxcWTNIg4f47zzBoRd0 vc4iP4dpRpxf3g/6aLjc2F65KqF5iUhZE3g8A7FYhB02lnueC0nhc/uTNgRgg1ft 5XZFfxNv06F4nXBWNmhOte7Ep3Zg0Q== =AFpd -----END PGP SIGNATURE----- Merge tag 'drm-misc-fixes-2021-01-27' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Short summary of fixes pull (less than what git shortlog provides): * drm/vc4: Fix LBM size calculation; Fix high resolutions for hvs5 Signed-off-by: Dave Airlie <airlied@redhat.com> From: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/YBEco1Vxeny8U/ca@linux-uq9g
This commit is contained in:
commit
fb62b7b986
|
|
@ -620,11 +620,11 @@ static int vc4_hvs_bind(struct device *dev, struct device *master, void *data)
|
|||
* for now we just allocate globally.
|
||||
*/
|
||||
if (!hvs->hvs5)
|
||||
/* 96kB */
|
||||
drm_mm_init(&hvs->lbm_mm, 0, 96 * 1024);
|
||||
/* 48k words of 2x12-bit pixels */
|
||||
drm_mm_init(&hvs->lbm_mm, 0, 48 * 1024);
|
||||
else
|
||||
/* 70k words */
|
||||
drm_mm_init(&hvs->lbm_mm, 0, 70 * 2 * 1024);
|
||||
/* 60k words of 4x12-bit pixels */
|
||||
drm_mm_init(&hvs->lbm_mm, 0, 60 * 1024);
|
||||
|
||||
/* Upload filter kernels. We only have the one for now, so we
|
||||
* keep it around for the lifetime of the driver.
|
||||
|
|
|
|||
|
|
@ -437,6 +437,7 @@ static void vc4_write_ppf(struct vc4_plane_state *vc4_state, u32 src, u32 dst)
|
|||
static u32 vc4_lbm_size(struct drm_plane_state *state)
|
||||
{
|
||||
struct vc4_plane_state *vc4_state = to_vc4_plane_state(state);
|
||||
struct vc4_dev *vc4 = to_vc4_dev(state->plane->dev);
|
||||
u32 pix_per_line;
|
||||
u32 lbm;
|
||||
|
||||
|
|
@ -472,7 +473,11 @@ static u32 vc4_lbm_size(struct drm_plane_state *state)
|
|||
lbm = pix_per_line * 16;
|
||||
}
|
||||
|
||||
lbm = roundup(lbm, 32);
|
||||
/* Align it to 64 or 128 (hvs5) bytes */
|
||||
lbm = roundup(lbm, vc4->hvs->hvs5 ? 128 : 64);
|
||||
|
||||
/* Each "word" of the LBM memory contains 2 or 4 (hvs5) pixels */
|
||||
lbm /= vc4->hvs->hvs5 ? 4 : 2;
|
||||
|
||||
return lbm;
|
||||
}
|
||||
|
|
@ -912,9 +917,9 @@ static int vc4_plane_mode_set(struct drm_plane *plane,
|
|||
if (!vc4_state->is_unity) {
|
||||
vc4_dlist_write(vc4_state,
|
||||
VC4_SET_FIELD(vc4_state->crtc_w,
|
||||
SCALER_POS1_SCL_WIDTH) |
|
||||
SCALER5_POS1_SCL_WIDTH) |
|
||||
VC4_SET_FIELD(vc4_state->crtc_h,
|
||||
SCALER_POS1_SCL_HEIGHT));
|
||||
SCALER5_POS1_SCL_HEIGHT));
|
||||
}
|
||||
|
||||
/* Position Word 2: Source Image Size */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user