All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Kieran Bingham <kieran.bingham@ideasonboard.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	linux-renesas-soc@vger.kernel.org,
	Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm: rcar-du: Fix pitch handling for fully planar YUV formats
Date: Wed, 9 Sep 2020 15:08:35 +0300	[thread overview]
Message-ID: <20200909120835.GJ6112@intel.com> (raw)
In-Reply-To: <6e66b920-96d6-591a-af59-353558b89f98@ideasonboard.com>

On Tue, Sep 08, 2020 at 05:05:48PM +0100, Kieran Bingham wrote:
> Hi Laurent,
> 
> On 08/09/2020 16:52, Laurent Pinchart wrote:
> > Hi Kieran,
> > 
> > On Tue, Sep 08, 2020 at 04:42:58PM +0100, Kieran Bingham wrote:
> >> On 06/08/2020 03:26, Laurent Pinchart wrote:
> >>> When creating a frame buffer, the driver verifies that the pitches for
> >>> the chroma planes match the luma plane. This is done incorrectly for
> >>> fully planar YUV formats, without taking horizontal subsampling into
> >>> account. Fix it.
> >>>
> >>> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> >>> ---
<snip>
> >>>  	}, {
> >>>  		.fourcc = DRM_FORMAT_YVU444,
> >>>  		.v4l2 = V4L2_PIX_FMT_YVU444M,
> >>>  		.bpp = 24,
> >>>  		.planes = 3,
> >>> +		.hsub = 1,
> >>>  	},
> >>>  };
> >>>  
> >>
> >> I wonder when we can have a global/generic set of format tables so that
> >> all of this isn't duplicated on a per-driver basis.
> > 
> > Note that this table also contains register values, so at least that
> > part will need to be kept. For the rest, do you mean a 4CC library that
> 
> Yes, the driver specific mappings of course need to be driver specific.
> 
> 
> > would be shared between DRM/KMS and V4L2 ? That's a great idea. Too bad
> > it has been shot down when patches were submitted :-S
> 
> 
>  /o\ ... It just seems like so much data replication that must be used
> by many drivers.
> 
> Even without mapping the DRM/V4L2 fourccs - even a common table in each
> subsystem would be beneficial wouldn't it?
> 
> I mean - RCar-DU isn't the only device that needs to know how many
> planes DRM_FORMAT_YUV422 has, or what horizontal subsampling it uses?
> 
> Anyway, that's not an issue with this patch, it just seems glaring to me
> that these entries are common across all hardware that use them ...
> 
> (the bpp/planes/subsampling of course, not the hardware specific registers).

See drm_format_info() & co.

-- 
Ville Syrjälä
Intel

WARNING: multiple messages have this Message-ID (diff)
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Kieran Bingham <kieran.bingham@ideasonboard.com>
Cc: linux-renesas-soc@vger.kernel.org,
	Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm: rcar-du: Fix pitch handling for fully planar YUV formats
Date: Wed, 9 Sep 2020 15:08:35 +0300	[thread overview]
Message-ID: <20200909120835.GJ6112@intel.com> (raw)
In-Reply-To: <6e66b920-96d6-591a-af59-353558b89f98@ideasonboard.com>

On Tue, Sep 08, 2020 at 05:05:48PM +0100, Kieran Bingham wrote:
> Hi Laurent,
> 
> On 08/09/2020 16:52, Laurent Pinchart wrote:
> > Hi Kieran,
> > 
> > On Tue, Sep 08, 2020 at 04:42:58PM +0100, Kieran Bingham wrote:
> >> On 06/08/2020 03:26, Laurent Pinchart wrote:
> >>> When creating a frame buffer, the driver verifies that the pitches for
> >>> the chroma planes match the luma plane. This is done incorrectly for
> >>> fully planar YUV formats, without taking horizontal subsampling into
> >>> account. Fix it.
> >>>
> >>> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> >>> ---
<snip>
> >>>  	}, {
> >>>  		.fourcc = DRM_FORMAT_YVU444,
> >>>  		.v4l2 = V4L2_PIX_FMT_YVU444M,
> >>>  		.bpp = 24,
> >>>  		.planes = 3,
> >>> +		.hsub = 1,
> >>>  	},
> >>>  };
> >>>  
> >>
> >> I wonder when we can have a global/generic set of format tables so that
> >> all of this isn't duplicated on a per-driver basis.
> > 
> > Note that this table also contains register values, so at least that
> > part will need to be kept. For the rest, do you mean a 4CC library that
> 
> Yes, the driver specific mappings of course need to be driver specific.
> 
> 
> > would be shared between DRM/KMS and V4L2 ? That's a great idea. Too bad
> > it has been shot down when patches were submitted :-S
> 
> 
>  /o\ ... It just seems like so much data replication that must be used
> by many drivers.
> 
> Even without mapping the DRM/V4L2 fourccs - even a common table in each
> subsystem would be beneficial wouldn't it?
> 
> I mean - RCar-DU isn't the only device that needs to know how many
> planes DRM_FORMAT_YUV422 has, or what horizontal subsampling it uses?
> 
> Anyway, that's not an issue with this patch, it just seems glaring to me
> that these entries are common across all hardware that use them ...
> 
> (the bpp/planes/subsampling of course, not the hardware specific registers).

See drm_format_info() & co.

-- 
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2020-09-09 15:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-06  2:26 [PATCH] drm: rcar-du: Fix pitch handling for fully planar YUV formats Laurent Pinchart
2020-08-06  2:26 ` Laurent Pinchart
2020-09-08 15:42 ` Kieran Bingham
2020-09-08 15:42   ` Kieran Bingham
2020-09-08 15:52   ` Laurent Pinchart
2020-09-08 15:52     ` Laurent Pinchart
2020-09-08 16:05     ` Kieran Bingham
2020-09-08 16:05       ` Kieran Bingham
2020-09-09 12:08       ` Ville Syrjälä [this message]
2020-09-09 12:08         ` Ville Syrjälä
2020-09-09 16:06         ` Kieran Bingham
2020-09-09 16:06           ` Kieran Bingham
2020-09-09 16:17           ` Laurent Pinchart
2020-09-09 16:17             ` Laurent Pinchart
2020-09-09 12:17       ` Daniel Vetter
2020-09-09 12:17         ` Daniel Vetter

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=20200909120835.GJ6112@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-renesas-soc@vger.kernel.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 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.