From: claudiu beznea <claudiu.beznea@tuxon.dev>
To: Manikandan Muralidharan <manikandan.m@microchip.com>,
sam@ravnborg.org, bbrezillon@kernel.org, airlied@gmail.com,
daniel@ffwll.ch, nicolas.ferre@microchip.com,
alexandre.belloni@bootlin.com, lee@kernel.org,
dri-devel@lists.freedesktop.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Cc: Hari.PrasathGE@microchip.com,
Balamanikandan.Gunasundar@microchip.com,
Durai.ManickamKR@microchip.com, Nayabbasha.Sayed@microchip.com,
Dharma.B@microchip.com, Varshini.Rajendran@microchip.com,
Balakrishnan.S@microchip.com
Subject: Re: [PATCH RESEND v7 1/7] drm: atmel-hlcdc: add flag and driver ops to differentiate XLCDC and HLCDC IP
Date: Sat, 3 Feb 2024 15:00:28 +0200 [thread overview]
Message-ID: <397c97ce-2912-42c1-823a-7ad151d73307@tuxon.dev> (raw)
In-Reply-To: <20240129092319.199365-2-manikandan.m@microchip.com>
Hi, Manikandan,
On 29.01.2024 11:23, Manikandan Muralidharan wrote:
> Add is_xlcdc flag and LCD IP specific ops in driver data to differentiate
> XLCDC and HLCDC code within the atmel-hlcdc driver files.
I would first prepare the current code base for the addition of XLCDC by
first adding the struct atmel_lcdc_dc_ops, update current code to use it
and after that add XLCDC.
>
> Signed-off-by: Manikandan Muralidharan <manikandan.m@microchip.com>
> ---
> drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h | 37 ++++++++++++++++++++
> 1 file changed, 37 insertions(+)
>
> diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h
> index 5b5c774e0edf..d5e01ff8c7f9 100644
> --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h
> +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h
> @@ -177,6 +177,9 @@ struct atmel_hlcdc_layer_cfg_layout {
> int csc;
> };
>
> +struct atmel_hlcdc_plane_state;
You can move this forward declaration close the the structure that needs it
(struct atmel_lcdc_dc_ops).
> +struct atmel_hlcdc_dc;
And you can get rid if this one if you move struct atmel_lcdc_dc_ops after
struct atmel_hlcdc_dc definition.
> +
> /**
> * Atmel HLCDC DMA descriptor structure
> *
> @@ -288,6 +291,36 @@ atmel_hlcdc_layer_to_plane(struct atmel_hlcdc_layer *layer)
> return container_of(layer, struct atmel_hlcdc_plane, layer);
> }
>
> +/**
> + * struct atmel_lcdc_dc_ops - describes atmel_lcdc ops group
> + * to differentiate HLCDC and XLCDC IP code support.
> + * @plane_setup_scaler: update the vertical and horizontal scaling factors
> + * @update_lcdc_buffers: update the each LCDC layers DMA registers.
> + * @lcdc_atomic_disable: disable LCDC interrupts and layers
> + * @lcdc_update_general_settings: update each LCDC layers general
> + * confiugration register.
s/confiugration/configuration
> + * @lcdc_atomic_update: enable the LCDC layers and interrupts.
You may want to keep consistency by adding or not '.' at the end of the
documentation statement (I consider '.' is useless)
> + * @lcdc_csc_init: update the color space conversion co-efficient of
> + * High-end overlay register.
> + * @lcdc_irq_dbg: to raise alert incase of interrupt overrun in any LCDC layer.
s/incase/in case
> + */
> +struct atmel_lcdc_dc_ops {
> + void (*plane_setup_scaler)(struct atmel_hlcdc_plane *plane,
> + struct atmel_hlcdc_plane_state *state);
> + void (*update_lcdc_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_update_general_settings)(struct atmel_hlcdc_plane *plane,
> + struct atmel_hlcdc_plane_state *state);
> + void (*lcdc_atomic_update)(struct atmel_hlcdc_plane *plane,
> + struct atmel_hlcdc_dc *dc);
> + void (*lcdc_csc_init)(struct atmel_hlcdc_plane *plane,
> + const struct atmel_hlcdc_layer_desc *desc);
> + void (*lcdc_irq_dbg)(struct atmel_hlcdc_plane *plane,
> + const struct atmel_hlcdc_layer_desc *desc);
> +};
> +
> /**
> * Atmel HLCDC Display Controller description structure.
> *
> @@ -304,8 +337,10 @@ atmel_hlcdc_layer_to_plane(struct atmel_hlcdc_layer *layer)
> * @conflicting_output_formats: true if RGBXXX output formats conflict with
> * each other.
> * @fixed_clksrc: true if clock source is fixed
> + * @is_xlcdc: true if XLCDC IP is supported
> * @layers: a layer description table describing available layers
> * @nlayers: layer description table size
> + * @ops: atmel lcdc dc ops
> */
> struct atmel_hlcdc_dc_desc {
> int min_width;
> @@ -317,8 +352,10 @@ struct atmel_hlcdc_dc_desc {
> int max_hpw;
> bool conflicting_output_formats;
> bool fixed_clksrc;
> + bool is_xlcdc;
> const struct atmel_hlcdc_layer_desc *layers;
> int nlayers;
> + const struct atmel_lcdc_dc_ops *ops;
> };
>
> /**
next prev parent reply other threads:[~2024-02-03 13:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-29 9:23 [PATCH RESEND v7 0/7] Add support for XLCDC to sam9x7 SoC family Manikandan Muralidharan
2024-01-29 9:23 ` [PATCH RESEND v7 1/7] drm: atmel-hlcdc: add flag and driver ops to differentiate XLCDC and HLCDC IP Manikandan Muralidharan
2024-02-03 13:00 ` claudiu beznea [this message]
2024-01-29 9:23 ` [PATCH RESEND v7 2/7] drm: atmel-hlcdc: add LCD controller layer definition for sam9x75 Manikandan Muralidharan
2024-02-03 13:00 ` claudiu beznea
2024-01-29 9:23 ` [PATCH RESEND v7 3/7] drm: atmel-hlcdc: Define SAM9X7 SoC XLCDC specific registers Manikandan Muralidharan
2024-01-31 8:43 ` Lee Jones
2024-01-29 9:23 ` [PATCH RESEND v7 4/7] drm: atmel_hlcdc: Add support for XLCDC in atmel LCD driver Manikandan Muralidharan
2024-02-03 13:00 ` claudiu beznea
2024-01-29 9:23 ` [PATCH RESEND v7 5/7] drm: atmel-hlcdc: add DPI mode support for XLCDC Manikandan Muralidharan
2024-01-29 9:23 ` [PATCH RESEND v7 6/7] drm: atmel-hlcdc: add vertical and horizontal scaling " Manikandan Muralidharan
2024-01-29 9:23 ` [PATCH RESEND v7 7/7] drm: atmel-hlcdc: add support for DSI output formats Manikandan Muralidharan
2024-02-03 13:00 ` claudiu beznea
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=397c97ce-2912-42c1-823a-7ad151d73307@tuxon.dev \
--to=claudiu.beznea@tuxon.dev \
--cc=Balakrishnan.S@microchip.com \
--cc=Balamanikandan.Gunasundar@microchip.com \
--cc=Dharma.B@microchip.com \
--cc=Durai.ManickamKR@microchip.com \
--cc=Hari.PrasathGE@microchip.com \
--cc=Nayabbasha.Sayed@microchip.com \
--cc=Varshini.Rajendran@microchip.com \
--cc=airlied@gmail.com \
--cc=alexandre.belloni@bootlin.com \
--cc=bbrezillon@kernel.org \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=lee@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manikandan.m@microchip.com \
--cc=nicolas.ferre@microchip.com \
--cc=sam@ravnborg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).