All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Biju Das <biju.das.jz@bp.renesas.com>
Cc: David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
	DRI Development <dri-devel@lists.freedesktop.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	Chris Paterson <Chris.Paterson2@renesas.com>,
	Biju Das <biju.das@bp.renesas.com>,
	Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>
Subject: Re: [PATCH v5 04/10] drm: rcar-du: Add rcar_du_lib_fb_create()
Date: Thu, 18 Aug 2022 11:29:32 +0200	[thread overview]
Message-ID: <CAMuHMdU8V9=w-uTt7Lx264wtz+TopHUD+W9H66y68tNMOG7P8w@mail.gmail.com> (raw)
In-Reply-To: <20220727160753.1774761-5-biju.das.jz@bp.renesas.com>

Hi Biju,

On Wed, Jul 27, 2022 at 6:08 PM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> Move the common code from rcar_du_fb_create->rcar_du_lib_fb_create,
> so that rzg2l_du_fb_create() can reuse the common code.
>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
> v5:
>  * New patch

Thanks for your patch!

> --- a/drivers/gpu/drm/rcar-du/rcar_du_kms_lib.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_kms_lib.c
> @@ -392,3 +392,72 @@ int rcar_du_dumb_create(struct drm_file *file, struct drm_device *dev,
>
>         return drm_gem_cma_dumb_create_internal(file, dev, args);
>  }
> +
> +struct drm_framebuffer *
> +rcar_du_lib_fb_create(struct drm_device *dev, struct drm_file *file_priv,
> +                     const struct drm_mode_fb_cmd2 *mode_cmd)
> +{
> +       struct rcar_du_device *rcdu = to_rcar_du_device(dev);
> +       const struct rcar_du_format_info *format;
> +       unsigned int chroma_pitch;
> +       unsigned int max_pitch;
> +       unsigned int align;
> +       unsigned int i;
> +
> +       format = rcar_du_format_info(mode_cmd->pixel_format);
> +       if (format == NULL) {
> +               dev_dbg(dev->dev, "unsupported pixel format %08x\n",

I know you're just moving code, but nowadays we do have "%p4cc",
which takes a pointer to the fourcc value.

> +                       mode_cmd->pixel_format);
> +               return ERR_PTR(-EINVAL);
> +       }

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

WARNING: multiple messages have this Message-ID (diff)
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Biju Das <biju.das.jz@bp.renesas.com>
Cc: Chris Paterson <Chris.Paterson2@renesas.com>,
	David Airlie <airlied@linux.ie>,
	Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	DRI Development <dri-devel@lists.freedesktop.org>,
	Biju Das <biju.das@bp.renesas.com>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Subject: Re: [PATCH v5 04/10] drm: rcar-du: Add rcar_du_lib_fb_create()
Date: Thu, 18 Aug 2022 11:29:32 +0200	[thread overview]
Message-ID: <CAMuHMdU8V9=w-uTt7Lx264wtz+TopHUD+W9H66y68tNMOG7P8w@mail.gmail.com> (raw)
In-Reply-To: <20220727160753.1774761-5-biju.das.jz@bp.renesas.com>

Hi Biju,

On Wed, Jul 27, 2022 at 6:08 PM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> Move the common code from rcar_du_fb_create->rcar_du_lib_fb_create,
> so that rzg2l_du_fb_create() can reuse the common code.
>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
> v5:
>  * New patch

Thanks for your patch!

> --- a/drivers/gpu/drm/rcar-du/rcar_du_kms_lib.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_kms_lib.c
> @@ -392,3 +392,72 @@ int rcar_du_dumb_create(struct drm_file *file, struct drm_device *dev,
>
>         return drm_gem_cma_dumb_create_internal(file, dev, args);
>  }
> +
> +struct drm_framebuffer *
> +rcar_du_lib_fb_create(struct drm_device *dev, struct drm_file *file_priv,
> +                     const struct drm_mode_fb_cmd2 *mode_cmd)
> +{
> +       struct rcar_du_device *rcdu = to_rcar_du_device(dev);
> +       const struct rcar_du_format_info *format;
> +       unsigned int chroma_pitch;
> +       unsigned int max_pitch;
> +       unsigned int align;
> +       unsigned int i;
> +
> +       format = rcar_du_format_info(mode_cmd->pixel_format);
> +       if (format == NULL) {
> +               dev_dbg(dev->dev, "unsupported pixel format %08x\n",

I know you're just moving code, but nowadays we do have "%p4cc",
which takes a pointer to the fourcc value.

> +                       mode_cmd->pixel_format);
> +               return ERR_PTR(-EINVAL);
> +       }

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply	other threads:[~2022-08-18  9:29 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-27 16:07 [PATCH v5 00/10] Add RZ/G2L Display support Biju Das
2022-07-27 16:07 ` Biju Das
2022-07-27 16:07 ` [PATCH v5 01/10] drm: rcar-du: Move rcar_du_vsp_plane_prepare_fb() Biju Das
2022-07-27 16:07   ` Biju Das
2022-07-27 16:07 ` [PATCH v5 02/10] drm: rcar-du: Move rcar_du_vsp_plane_cleanup_fb() Biju Das
2022-07-27 16:07   ` Biju Das
2022-07-27 16:07 ` [PATCH v5 03/10] drm: rcar-du: Move rcar_du_vsp_plane_atomic_update() Biju Das
2022-07-27 16:07   ` Biju Das
2022-07-27 16:07 ` [PATCH v5 04/10] drm: rcar-du: Add rcar_du_lib_fb_create() Biju Das
2022-07-27 16:07   ` Biju Das
2022-08-18  9:29   ` Geert Uytterhoeven [this message]
2022-08-18  9:29     ` Geert Uytterhoeven
2022-08-24  8:57     ` Biju Das
2022-08-24  8:57       ` Biju Das
2022-07-27 16:07 ` [PATCH v5 05/10] drm: rcar-du: Add rcar_du_lib_mode_cfg_helper_fns() Biju Das
2022-07-27 16:07   ` Biju Das
2022-07-27 16:07 ` [PATCH v5 06/10] drm: rcar-du: Move rcar_du_encoders_init() Biju Das
2022-07-27 16:07   ` Biju Das
2022-07-27 16:07 ` [PATCH v5 07/10] drm: rcar-du: Move rcar_du_properties_init() Biju Das
2022-07-27 16:07   ` Biju Das
2022-07-27 16:07 ` [PATCH v5 08/10] drm: rcar-du: Add rcar_du_lib_vsps_init() Biju Das
2022-07-27 16:07   ` Biju Das
2022-07-27 16:07 ` [PATCH v5 09/10] dt-bindings: display: Document Renesas RZ/G2L DU bindings Biju Das
2022-07-27 16:07   ` Biju Das
2022-07-27 16:07 ` [PATCH v5 10/10] drm: rcar-du: Add RZ/G2L DU Support Biju Das
2022-07-27 16:07   ` Biju Das

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='CAMuHMdU8V9=w-uTt7Lx264wtz+TopHUD+W9H66y68tNMOG7P8w@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=Chris.Paterson2@renesas.com \
    --cc=airlied@linux.ie \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=biju.das@bp.renesas.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.