* [PATCH] drm: atmel-hlcdc: update the LCDC_ATTRE register in plane atomic_disable
@ 2024-10-14 6:46 Manikandan Muralidharan
2024-10-14 9:44 ` Nicolas Ferre
0 siblings, 1 reply; 4+ messages in thread
From: Manikandan Muralidharan @ 2024-10-14 6:46 UTC (permalink / raw)
To: sam, bbrezillon, maarten.lankhorst, mripard, tzimmermann,
airlied, simona, nicolas.ferre, alexandre.belloni,
claudiu.beznea, dri-devel, linux-arm-kernel, linux-kernel
Cc: Manikandan Muralidharan
update the LCDC_ATTRE register in drm plane atomic_disable to handle
the configuration changes of each layer when a plane is disabled.
Signed-off-by: Manikandan Muralidharan <manikandan.m@microchip.com>
---
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h | 3 ++-
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 17 ++++++++++++++---
2 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h
index e1a0bb24b511..53d47f01db0b 100644
--- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h
+++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h
@@ -378,7 +378,8 @@ struct atmel_lcdc_dc_ops {
void (*lcdc_update_buffers)(struct atmel_hlcdc_plane *plane,
struct atmel_hlcdc_plane_state *state,
u32 sr, int i);
- void (*lcdc_atomic_disable)(struct atmel_hlcdc_plane *plane);
+ void (*lcdc_atomic_disable)(struct atmel_hlcdc_plane *plane,
+ struct atmel_hlcdc_dc *dc);
void (*lcdc_update_general_settings)(struct atmel_hlcdc_plane *plane,
struct atmel_hlcdc_plane_state *state);
void (*lcdc_atomic_update)(struct atmel_hlcdc_plane *plane,
diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
index 4a7ba0918eca..4bcaf2cd7672 100644
--- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
+++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
@@ -816,7 +816,8 @@ static int atmel_hlcdc_plane_atomic_check(struct drm_plane *p,
return 0;
}
-static void atmel_hlcdc_atomic_disable(struct atmel_hlcdc_plane *plane)
+static void atmel_hlcdc_atomic_disable(struct atmel_hlcdc_plane *plane,
+ struct atmel_hlcdc_dc *dc)
{
/* Disable interrupts */
atmel_hlcdc_layer_write_reg(&plane->layer, ATMEL_HLCDC_LAYER_IDR,
@@ -832,7 +833,8 @@ static void atmel_hlcdc_atomic_disable(struct atmel_hlcdc_plane *plane)
atmel_hlcdc_layer_read_reg(&plane->layer, ATMEL_HLCDC_LAYER_ISR);
}
-static void atmel_xlcdc_atomic_disable(struct atmel_hlcdc_plane *plane)
+static void atmel_xlcdc_atomic_disable(struct atmel_hlcdc_plane *plane,
+ struct atmel_hlcdc_dc *dc)
{
/* Disable interrupts */
atmel_hlcdc_layer_write_reg(&plane->layer, ATMEL_XLCDC_LAYER_IDR,
@@ -842,6 +844,15 @@ static void atmel_xlcdc_atomic_disable(struct atmel_hlcdc_plane *plane)
atmel_hlcdc_layer_write_reg(&plane->layer,
ATMEL_XLCDC_LAYER_ENR, 0);
+ /*
+ * Updating XLCDC_xxxCFGx, XLCDC_xxxFBA and XLCDC_xxxEN,
+ * (where xxx indicates each layer) requires writing one to the
+ * Update Attribute field for each layer in LCDC_ATTRE register for SAM9X7.
+ */
+ regmap_write(dc->hlcdc->regmap, ATMEL_XLCDC_ATTRE, ATMEL_XLCDC_BASE_UPDATE |
+ ATMEL_XLCDC_OVR1_UPDATE | ATMEL_XLCDC_OVR3_UPDATE |
+ ATMEL_XLCDC_HEO_UPDATE);
+
/* Clear all pending interrupts */
atmel_hlcdc_layer_read_reg(&plane->layer, ATMEL_XLCDC_LAYER_ISR);
}
@@ -852,7 +863,7 @@ static void atmel_hlcdc_plane_atomic_disable(struct drm_plane *p,
struct atmel_hlcdc_plane *plane = drm_plane_to_atmel_hlcdc_plane(p);
struct atmel_hlcdc_dc *dc = plane->base.dev->dev_private;
- dc->desc->ops->lcdc_atomic_disable(plane);
+ dc->desc->ops->lcdc_atomic_disable(plane, dc);
}
static void atmel_hlcdc_atomic_update(struct atmel_hlcdc_plane *plane,
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] drm: atmel-hlcdc: update the LCDC_ATTRE register in plane atomic_disable
2024-10-14 6:46 [PATCH] drm: atmel-hlcdc: update the LCDC_ATTRE register in plane atomic_disable Manikandan Muralidharan
@ 2024-10-14 9:44 ` Nicolas Ferre
2025-01-28 4:44 ` Manikandan.M
2025-10-14 9:21 ` Manikandan.M
0 siblings, 2 replies; 4+ messages in thread
From: Nicolas Ferre @ 2024-10-14 9:44 UTC (permalink / raw)
To: Manikandan Muralidharan, sam, bbrezillon, maarten.lankhorst,
mripard, tzimmermann, airlied, simona, alexandre.belloni,
claudiu.beznea, dri-devel, linux-arm-kernel, linux-kernel
On 14/10/2024 at 08:46, Manikandan Muralidharan wrote:
> update the LCDC_ATTRE register in drm plane atomic_disable to handle
> the configuration changes of each layer when a plane is disabled.
>
> Signed-off-by: Manikandan Muralidharan <manikandan.m@microchip.com>
Reviewed-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Thanks Mani. Best regards,
Nicolas
> ---
> drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h | 3 ++-
> drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 17 ++++++++++++++---
> 2 files changed, 16 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h
> index e1a0bb24b511..53d47f01db0b 100644
> --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h
> +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h
> @@ -378,7 +378,8 @@ struct atmel_lcdc_dc_ops {
> void (*lcdc_update_buffers)(struct atmel_hlcdc_plane *plane,
> struct atmel_hlcdc_plane_state *state,
> u32 sr, int i);
> - void (*lcdc_atomic_disable)(struct atmel_hlcdc_plane *plane);
> + void (*lcdc_atomic_disable)(struct atmel_hlcdc_plane *plane,
> + struct atmel_hlcdc_dc *dc);
> void (*lcdc_update_general_settings)(struct atmel_hlcdc_plane *plane,
> struct atmel_hlcdc_plane_state *state);
> void (*lcdc_atomic_update)(struct atmel_hlcdc_plane *plane,
> diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
> index 4a7ba0918eca..4bcaf2cd7672 100644
> --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
> +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
> @@ -816,7 +816,8 @@ static int atmel_hlcdc_plane_atomic_check(struct drm_plane *p,
> return 0;
> }
>
> -static void atmel_hlcdc_atomic_disable(struct atmel_hlcdc_plane *plane)
> +static void atmel_hlcdc_atomic_disable(struct atmel_hlcdc_plane *plane,
> + struct atmel_hlcdc_dc *dc)
> {
> /* Disable interrupts */
> atmel_hlcdc_layer_write_reg(&plane->layer, ATMEL_HLCDC_LAYER_IDR,
> @@ -832,7 +833,8 @@ static void atmel_hlcdc_atomic_disable(struct atmel_hlcdc_plane *plane)
> atmel_hlcdc_layer_read_reg(&plane->layer, ATMEL_HLCDC_LAYER_ISR);
> }
>
> -static void atmel_xlcdc_atomic_disable(struct atmel_hlcdc_plane *plane)
> +static void atmel_xlcdc_atomic_disable(struct atmel_hlcdc_plane *plane,
> + struct atmel_hlcdc_dc *dc)
> {
> /* Disable interrupts */
> atmel_hlcdc_layer_write_reg(&plane->layer, ATMEL_XLCDC_LAYER_IDR,
> @@ -842,6 +844,15 @@ static void atmel_xlcdc_atomic_disable(struct atmel_hlcdc_plane *plane)
> atmel_hlcdc_layer_write_reg(&plane->layer,
> ATMEL_XLCDC_LAYER_ENR, 0);
>
> + /*
> + * Updating XLCDC_xxxCFGx, XLCDC_xxxFBA and XLCDC_xxxEN,
> + * (where xxx indicates each layer) requires writing one to the
> + * Update Attribute field for each layer in LCDC_ATTRE register for SAM9X7.
> + */
> + regmap_write(dc->hlcdc->regmap, ATMEL_XLCDC_ATTRE, ATMEL_XLCDC_BASE_UPDATE |
> + ATMEL_XLCDC_OVR1_UPDATE | ATMEL_XLCDC_OVR3_UPDATE |
> + ATMEL_XLCDC_HEO_UPDATE);
> +
> /* Clear all pending interrupts */
> atmel_hlcdc_layer_read_reg(&plane->layer, ATMEL_XLCDC_LAYER_ISR);
> }
> @@ -852,7 +863,7 @@ static void atmel_hlcdc_plane_atomic_disable(struct drm_plane *p,
> struct atmel_hlcdc_plane *plane = drm_plane_to_atmel_hlcdc_plane(p);
> struct atmel_hlcdc_dc *dc = plane->base.dev->dev_private;
>
> - dc->desc->ops->lcdc_atomic_disable(plane);
> + dc->desc->ops->lcdc_atomic_disable(plane, dc);
> }
>
> static void atmel_hlcdc_atomic_update(struct atmel_hlcdc_plane *plane,
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] drm: atmel-hlcdc: update the LCDC_ATTRE register in plane atomic_disable
2024-10-14 9:44 ` Nicolas Ferre
@ 2025-01-28 4:44 ` Manikandan.M
2025-10-14 9:21 ` Manikandan.M
1 sibling, 0 replies; 4+ messages in thread
From: Manikandan.M @ 2025-01-28 4:44 UTC (permalink / raw)
To: Nicolas.Ferre, sam, bbrezillon, maarten.lankhorst, mripard,
tzimmermann, airlied, simona, alexandre.belloni, claudiu.beznea,
dri-devel, linux-arm-kernel, linux-kernel
Hi,
A gentle reminder to merge this patch. Let me know if any further
changes are needed.
On 14/10/24 3:14 pm, Nicolas Ferre wrote:
> On 14/10/2024 at 08:46, Manikandan Muralidharan wrote:
>> update the LCDC_ATTRE register in drm plane atomic_disable to handle
>> the configuration changes of each layer when a plane is disabled.
>>
>> Signed-off-by: Manikandan Muralidharan <manikandan.m@microchip.com>
>
> Reviewed-by: Nicolas Ferre <nicolas.ferre@microchip.com>
>
> Thanks Mani. Best regards,
> Nicolas
>
>> ---
>> drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h | 3 ++-
>> drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 17 ++++++++++++++---
>> 2 files changed, 16 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h
>> b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h
>> index e1a0bb24b511..53d47f01db0b 100644
>> --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h
>> +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h
>> @@ -378,7 +378,8 @@ struct atmel_lcdc_dc_ops {
>> void (*lcdc_update_buffers)(struct atmel_hlcdc_plane *plane,
>> struct atmel_hlcdc_plane_state *state,
>> u32 sr, int i);
>> - void (*lcdc_atomic_disable)(struct atmel_hlcdc_plane *plane);
>> + void (*lcdc_atomic_disable)(struct atmel_hlcdc_plane *plane,
>> + struct atmel_hlcdc_dc *dc);
>> void (*lcdc_update_general_settings)(struct atmel_hlcdc_plane
>> *plane,
>> struct atmel_hlcdc_plane_state *state);
>> void (*lcdc_atomic_update)(struct atmel_hlcdc_plane *plane,
>> diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
>> b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
>> index 4a7ba0918eca..4bcaf2cd7672 100644
>> --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
>> +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
>> @@ -816,7 +816,8 @@ static int atmel_hlcdc_plane_atomic_check(struct
>> drm_plane *p,
>> return 0;
>> }
>> -static void atmel_hlcdc_atomic_disable(struct atmel_hlcdc_plane *plane)
>> +static void atmel_hlcdc_atomic_disable(struct atmel_hlcdc_plane *plane,
>> + struct atmel_hlcdc_dc *dc)
>> {
>> /* Disable interrupts */
>> atmel_hlcdc_layer_write_reg(&plane->layer, ATMEL_HLCDC_LAYER_IDR,
>> @@ -832,7 +833,8 @@ static void atmel_hlcdc_atomic_disable(struct
>> atmel_hlcdc_plane *plane)
>> atmel_hlcdc_layer_read_reg(&plane->layer, ATMEL_HLCDC_LAYER_ISR);
>> }
>> -static void atmel_xlcdc_atomic_disable(struct atmel_hlcdc_plane *plane)
>> +static void atmel_xlcdc_atomic_disable(struct atmel_hlcdc_plane *plane,
>> + struct atmel_hlcdc_dc *dc)
>> {
>> /* Disable interrupts */
>> atmel_hlcdc_layer_write_reg(&plane->layer, ATMEL_XLCDC_LAYER_IDR,
>> @@ -842,6 +844,15 @@ static void atmel_xlcdc_atomic_disable(struct
>> atmel_hlcdc_plane *plane)
>> atmel_hlcdc_layer_write_reg(&plane->layer,
>> ATMEL_XLCDC_LAYER_ENR, 0);
>> + /*
>> + * Updating XLCDC_xxxCFGx, XLCDC_xxxFBA and XLCDC_xxxEN,
>> + * (where xxx indicates each layer) requires writing one to the
>> + * Update Attribute field for each layer in LCDC_ATTRE register
>> for SAM9X7.
>> + */
>> + regmap_write(dc->hlcdc->regmap, ATMEL_XLCDC_ATTRE,
>> ATMEL_XLCDC_BASE_UPDATE |
>> + ATMEL_XLCDC_OVR1_UPDATE | ATMEL_XLCDC_OVR3_UPDATE |
>> + ATMEL_XLCDC_HEO_UPDATE);
>> +
>> /* Clear all pending interrupts */
>> atmel_hlcdc_layer_read_reg(&plane->layer, ATMEL_XLCDC_LAYER_ISR);
>> }
>> @@ -852,7 +863,7 @@ static void
>> atmel_hlcdc_plane_atomic_disable(struct drm_plane *p,
>> struct atmel_hlcdc_plane *plane =
>> drm_plane_to_atmel_hlcdc_plane(p);
>> struct atmel_hlcdc_dc *dc = plane->base.dev->dev_private;
>> - dc->desc->ops->lcdc_atomic_disable(plane);
>> + dc->desc->ops->lcdc_atomic_disable(plane, dc);
>> }
>> static void atmel_hlcdc_atomic_update(struct atmel_hlcdc_plane *plane,
>
--
Thanks and Regards,
Manikandan M.
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] drm: atmel-hlcdc: update the LCDC_ATTRE register in plane atomic_disable
2024-10-14 9:44 ` Nicolas Ferre
2025-01-28 4:44 ` Manikandan.M
@ 2025-10-14 9:21 ` Manikandan.M
1 sibling, 0 replies; 4+ messages in thread
From: Manikandan.M @ 2025-10-14 9:21 UTC (permalink / raw)
To: Nicolas.Ferre, sam, bbrezillon, maarten.lankhorst, mripard,
tzimmermann, airlied, simona, alexandre.belloni, claudiu.beznea,
dri-devel, linux-arm-kernel, linux-kernel
On 14/10/24 3:14 pm, Nicolas Ferre wrote:
> On 14/10/2024 at 08:46, Manikandan Muralidharan wrote:
>> update the LCDC_ATTRE register in drm plane atomic_disable to handle
>> the configuration changes of each layer when a plane is disabled.
>>
>> Signed-off-by: Manikandan Muralidharan <manikandan.m@microchip.com>
>
> Reviewed-by: Nicolas Ferre <nicolas.ferre@microchip.com>
>
> Thanks Mani. Best regards,
> Nicolas
>
Applied to drm-misc-next.
--
Thanks and Regards,
Manikandan M.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-10-14 9:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-14 6:46 [PATCH] drm: atmel-hlcdc: update the LCDC_ATTRE register in plane atomic_disable Manikandan Muralidharan
2024-10-14 9:44 ` Nicolas Ferre
2025-01-28 4:44 ` Manikandan.M
2025-10-14 9:21 ` Manikandan.M
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®