Commit d3c8f278 authored by Paul Cercueil's avatar Paul Cercueil

drm/ingenic: Fix bad revert

Fix a badly reverted commit. The revert commit was cherry-picked from
drm-misc-next to drm-misc-next-fixes, and in the process some unrelated
code was added.

Fixes: a3fb64c0 ("Revert "gpu/drm: ingenic: Add option to mmap GEM buffers cached"")
Signed-off-by: default avatarPaul Cercueil <paul@crapouillou.net>
Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20201012102509.10690-1-paul@crapouillou.net
parent c2df75ad
...@@ -440,20 +440,6 @@ void ingenic_drm_plane_config(struct device *dev, ...@@ -440,20 +440,6 @@ void ingenic_drm_plane_config(struct device *dev,
} }
} }
static void ingenic_drm_update_palette(struct ingenic_drm *priv,
const struct drm_color_lut *lut)
{
unsigned int i;
for (i = 0; i < ARRAY_SIZE(priv->dma_hwdescs->palette); i++) {
u16 color = drm_color_lut_extract(lut[i].red, 5) << 11
| drm_color_lut_extract(lut[i].green, 6) << 5
| drm_color_lut_extract(lut[i].blue, 5);
priv->dma_hwdescs->palette[i] = color;
}
}
static void ingenic_drm_plane_atomic_update(struct drm_plane *plane, static void ingenic_drm_plane_atomic_update(struct drm_plane *plane,
struct drm_plane_state *oldstate) struct drm_plane_state *oldstate)
{ {
...@@ -464,8 +450,6 @@ static void ingenic_drm_plane_atomic_update(struct drm_plane *plane, ...@@ -464,8 +450,6 @@ static void ingenic_drm_plane_atomic_update(struct drm_plane *plane,
dma_addr_t addr; dma_addr_t addr;
if (state && state->fb) { if (state && state->fb) {
crtc_state = state->crtc->state;
addr = drm_fb_cma_get_gem_addr(state->fb, state, 0); addr = drm_fb_cma_get_gem_addr(state->fb, state, 0);
width = state->src_w >> 16; width = state->src_w >> 16;
height = state->src_h >> 16; height = state->src_h >> 16;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment