mirror of https://gitee.com/openkylin/linux.git
drm/malidp: Fix smart layer when doing pm_suspend/resume
Smart layer enable rectangles is set to 1 when the driver is probed, however when doing pm_suspend the value is lost and it's not set again making the SMART_LAYER unusable, fix that by initializing the number of rectangles everytime we do a plane update. Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com> Acked-by: Liviu Dudau <liviu.dudau@arm.com> Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
This commit is contained in:
parent
b11507815d
commit
791d54fa05
|
@ -366,10 +366,17 @@ static void malidp_de_plane_update(struct drm_plane *plane,
|
||||||
LAYER_V_VAL(plane->state->crtc_y),
|
LAYER_V_VAL(plane->state->crtc_y),
|
||||||
mp->layer->base + MALIDP_LAYER_OFFSET);
|
mp->layer->base + MALIDP_LAYER_OFFSET);
|
||||||
|
|
||||||
if (mp->layer->id == DE_SMART)
|
if (mp->layer->id == DE_SMART) {
|
||||||
|
/*
|
||||||
|
* Enable the first rectangle in the SMART layer to be
|
||||||
|
* able to use it as a drm plane.
|
||||||
|
*/
|
||||||
|
malidp_hw_write(mp->hwdev, 1,
|
||||||
|
mp->layer->base + MALIDP550_LS_ENABLE);
|
||||||
malidp_hw_write(mp->hwdev,
|
malidp_hw_write(mp->hwdev,
|
||||||
LAYER_H_VAL(src_w) | LAYER_V_VAL(src_h),
|
LAYER_H_VAL(src_w) | LAYER_V_VAL(src_h),
|
||||||
mp->layer->base + MALIDP550_LS_R1_IN_SIZE);
|
mp->layer->base + MALIDP550_LS_R1_IN_SIZE);
|
||||||
|
}
|
||||||
|
|
||||||
/* first clear the rotation bits */
|
/* first clear the rotation bits */
|
||||||
val = malidp_hw_read(mp->hwdev, mp->layer->base + MALIDP_LAYER_CONTROL);
|
val = malidp_hw_read(mp->hwdev, mp->layer->base + MALIDP_LAYER_CONTROL);
|
||||||
|
@ -484,12 +491,6 @@ int malidp_de_planes_init(struct drm_device *drm)
|
||||||
plane->layer = &map->layers[i];
|
plane->layer = &map->layers[i];
|
||||||
|
|
||||||
if (id == DE_SMART) {
|
if (id == DE_SMART) {
|
||||||
/*
|
|
||||||
* Enable the first rectangle in the SMART layer to be
|
|
||||||
* able to use it as a drm plane.
|
|
||||||
*/
|
|
||||||
malidp_hw_write(malidp->dev, 1,
|
|
||||||
plane->layer->base + MALIDP550_LS_ENABLE);
|
|
||||||
/* Skip the features which the SMART layer doesn't have. */
|
/* Skip the features which the SMART layer doesn't have. */
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue