Commit 449490fd authored by Dave Airlie's avatar Dave Airlie

Merge branch 'for-upstream/malidp-fixes' of git://linux-arm.org/linux-ld into drm-fixes

Misc set of malidp fixes.
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180622144444.GD2037@e110455-lin.cambridge.arm.com
parents 7daf201d c6cf387e
...@@ -278,7 +278,6 @@ static int malidp_init(struct drm_device *drm) ...@@ -278,7 +278,6 @@ static int malidp_init(struct drm_device *drm)
static void malidp_fini(struct drm_device *drm) static void malidp_fini(struct drm_device *drm)
{ {
drm_atomic_helper_shutdown(drm);
drm_mode_config_cleanup(drm); drm_mode_config_cleanup(drm);
} }
...@@ -646,6 +645,7 @@ static int malidp_bind(struct device *dev) ...@@ -646,6 +645,7 @@ static int malidp_bind(struct device *dev)
malidp_de_irq_fini(drm); malidp_de_irq_fini(drm);
drm->irq_enabled = false; drm->irq_enabled = false;
irq_init_fail: irq_init_fail:
drm_atomic_helper_shutdown(drm);
component_unbind_all(dev, drm); component_unbind_all(dev, drm);
bind_fail: bind_fail:
of_node_put(malidp->crtc.port); of_node_put(malidp->crtc.port);
...@@ -681,6 +681,7 @@ static void malidp_unbind(struct device *dev) ...@@ -681,6 +681,7 @@ static void malidp_unbind(struct device *dev)
malidp_se_irq_fini(drm); malidp_se_irq_fini(drm);
malidp_de_irq_fini(drm); malidp_de_irq_fini(drm);
drm->irq_enabled = false; drm->irq_enabled = false;
drm_atomic_helper_shutdown(drm);
component_unbind_all(dev, drm); component_unbind_all(dev, drm);
of_node_put(malidp->crtc.port); of_node_put(malidp->crtc.port);
malidp->crtc.port = NULL; malidp->crtc.port = NULL;
......
...@@ -634,7 +634,8 @@ const struct malidp_hw malidp_device[MALIDP_MAX_DEVICES] = { ...@@ -634,7 +634,8 @@ const struct malidp_hw malidp_device[MALIDP_MAX_DEVICES] = {
.vsync_irq = MALIDP500_DE_IRQ_VSYNC, .vsync_irq = MALIDP500_DE_IRQ_VSYNC,
}, },
.se_irq_map = { .se_irq_map = {
.irq_mask = MALIDP500_SE_IRQ_CONF_MODE, .irq_mask = MALIDP500_SE_IRQ_CONF_MODE |
MALIDP500_SE_IRQ_GLOBAL,
.vsync_irq = 0, .vsync_irq = 0,
}, },
.dc_irq_map = { .dc_irq_map = {
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
/* Layer specific register offsets */ /* Layer specific register offsets */
#define MALIDP_LAYER_FORMAT 0x000 #define MALIDP_LAYER_FORMAT 0x000
#define LAYER_FORMAT_MASK 0x3f
#define MALIDP_LAYER_CONTROL 0x004 #define MALIDP_LAYER_CONTROL 0x004
#define LAYER_ENABLE (1 << 0) #define LAYER_ENABLE (1 << 0)
#define LAYER_FLOWCFG_MASK 7 #define LAYER_FLOWCFG_MASK 7
...@@ -235,8 +236,8 @@ static int malidp_de_plane_check(struct drm_plane *plane, ...@@ -235,8 +236,8 @@ static int malidp_de_plane_check(struct drm_plane *plane,
if (state->rotation & MALIDP_ROTATED_MASK) { if (state->rotation & MALIDP_ROTATED_MASK) {
int val; int val;
val = mp->hwdev->hw->rotmem_required(mp->hwdev, state->crtc_h, val = mp->hwdev->hw->rotmem_required(mp->hwdev, state->crtc_w,
state->crtc_w, state->crtc_h,
fb->format->format); fb->format->format);
if (val < 0) if (val < 0)
return val; return val;
...@@ -337,7 +338,9 @@ static void malidp_de_plane_update(struct drm_plane *plane, ...@@ -337,7 +338,9 @@ static void malidp_de_plane_update(struct drm_plane *plane,
dest_w = plane->state->crtc_w; dest_w = plane->state->crtc_w;
dest_h = plane->state->crtc_h; dest_h = plane->state->crtc_h;
malidp_hw_write(mp->hwdev, ms->format, mp->layer->base); val = malidp_hw_read(mp->hwdev, mp->layer->base);
val = (val & ~LAYER_FORMAT_MASK) | ms->format;
malidp_hw_write(mp->hwdev, val, mp->layer->base);
for (i = 0; i < ms->n_planes; i++) { for (i = 0; i < ms->n_planes; i++) {
/* calculate the offset for the layer's plane registers */ /* calculate the offset for the layer's plane registers */
......
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