Skip to content

Commit

Permalink
Merge branch 'for-upstream/malidp-fixes' of git://linux-arm.org/linux…
Browse files Browse the repository at this point in the history
…-ld into drm-fixes

Misc set of malidp fixes.

Signed-off-by: Dave Airlie <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
airlied committed Jun 28, 2018
2 parents 7daf201 + c6cf387 commit 449490f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/arm/malidp_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,6 @@ static int malidp_init(struct drm_device *drm)

static void malidp_fini(struct drm_device *drm)
{
drm_atomic_helper_shutdown(drm);
drm_mode_config_cleanup(drm);
}

Expand Down Expand Up @@ -646,6 +645,7 @@ static int malidp_bind(struct device *dev)
malidp_de_irq_fini(drm);
drm->irq_enabled = false;
irq_init_fail:
drm_atomic_helper_shutdown(drm);
component_unbind_all(dev, drm);
bind_fail:
of_node_put(malidp->crtc.port);
Expand Down Expand Up @@ -681,6 +681,7 @@ static void malidp_unbind(struct device *dev)
malidp_se_irq_fini(drm);
malidp_de_irq_fini(drm);
drm->irq_enabled = false;
drm_atomic_helper_shutdown(drm);
component_unbind_all(dev, drm);
of_node_put(malidp->crtc.port);
malidp->crtc.port = NULL;
Expand Down
3 changes: 2 additions & 1 deletion drivers/gpu/drm/arm/malidp_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,8 @@ const struct malidp_hw malidp_device[MALIDP_MAX_DEVICES] = {
.vsync_irq = MALIDP500_DE_IRQ_VSYNC,
},
.se_irq_map = {
.irq_mask = MALIDP500_SE_IRQ_CONF_MODE,
.irq_mask = MALIDP500_SE_IRQ_CONF_MODE |
MALIDP500_SE_IRQ_GLOBAL,
.vsync_irq = 0,
},
.dc_irq_map = {
Expand Down
9 changes: 6 additions & 3 deletions drivers/gpu/drm/arm/malidp_planes.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

/* Layer specific register offsets */
#define MALIDP_LAYER_FORMAT 0x000
#define LAYER_FORMAT_MASK 0x3f
#define MALIDP_LAYER_CONTROL 0x004
#define LAYER_ENABLE (1 << 0)
#define LAYER_FLOWCFG_MASK 7
Expand Down Expand Up @@ -235,8 +236,8 @@ static int malidp_de_plane_check(struct drm_plane *plane,
if (state->rotation & MALIDP_ROTATED_MASK) {
int val;

val = mp->hwdev->hw->rotmem_required(mp->hwdev, state->crtc_h,
state->crtc_w,
val = mp->hwdev->hw->rotmem_required(mp->hwdev, state->crtc_w,
state->crtc_h,
fb->format->format);
if (val < 0)
return val;
Expand Down Expand Up @@ -337,7 +338,9 @@ static void malidp_de_plane_update(struct drm_plane *plane,
dest_w = plane->state->crtc_w;
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++) {
/* calculate the offset for the layer's plane registers */
Expand Down

0 comments on commit 449490f

Please sign in to comment.