mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: George Kennedy <george.kennedy@oracle.com>
Cc: "Brian Starkey" <brian.starkey@arm.com>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	gregkh@linuxfoundation.org, maarten.lankhorst@linux.intel.com,
	mripard@kernel.org, tzimmermann@suse.de, airlied@linux.ie,
	daniel@ffwll.ch, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org, ben.davis@arm.com,
	Liviu.Dudau@arm.com, "Dan Carpenter" <dan.carpenter@oracle.com>,
	nd@arm.com
Subject: Re: [PATCH] drm: check drm_format_info hsub and vsub to avoid divide by zero
Date: Fri, 19 Nov 2021 10:42:03 +0100	[thread overview]
Message-ID: <YZdxawCdP7V2dKq1@phenom.ffwll.local> (raw)
In-Reply-To: <4cfb985e-72da-173c-4818-c9c4af7d83a6@oracle.com>

On Thu, Nov 18, 2021 at 03:00:15PM -0500, George Kennedy wrote:
> 
> 
> On 10/29/2021 10:14 AM, Brian Starkey wrote:
> > Hi,
> > 
> > On Fri, Oct 29, 2021 at 09:15:28AM -0400, George Kennedy wrote:
> > > Asking if you have any input on how to deal with hsub and vsub = zero?
> > That's just a straight mistake on those formats - they should
> > be 1. My bad for not spotting it in review.
> > 
> > On the one hand, having formats in this table is a nice
> > machine-readable way to describe them. On the other, as drm_fourcc is
> > being used as the canonical repository for formats, including ones
> > not used in DRM, we can end up with situations like this.
> > (R10/R12 being another example of formats not used in DRM:
> > 20211027233140.12268-1-laurent.pinchart@ideasonboard.com)
> 
> Wondering if there is an alternate fix to the one proposed?

I think if the cost of defining formats correctly for everyone is that drm
carries a bunch of nice machine-readable entries in its tables that it
never uses, then we should do that. The very few bytes saved aren't worth
any headaches (because on any soc system you anyway have tons more formats
than what your driver is using).
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

  reply	other threads:[~2021-11-19  9:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-28 13:57 George Kennedy
2021-10-28 14:04 ` Ville Syrjälä
2021-10-29 13:15   ` George Kennedy
2021-10-29 14:14     ` Brian Starkey
2021-11-18 20:00       ` George Kennedy
2021-11-19  9:42         ` Daniel Vetter [this message]
2021-11-19  9:40   ` Daniel Vetter
2021-11-19 10:03     ` Ville Syrjälä
2021-11-19 10:30       ` Daniel Vetter
2021-11-19 14:25         ` Jani Nikula
2021-11-22 15:29           ` George Kennedy
2021-11-25 15:27             ` Daniel Vetter
2021-12-02 14:17               ` George Kennedy
2021-12-07 17:57                 ` Daniel Vetter
2021-10-28 14:09 ` Simon Ser

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=YZdxawCdP7V2dKq1@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=Liviu.Dudau@arm.com \
    --cc=airlied@linux.ie \
    --cc=ben.davis@arm.com \
    --cc=brian.starkey@arm.com \
    --cc=dan.carpenter@oracle.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=george.kennedy@oracle.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=nd@arm.com \
    --cc=tzimmermann@suse.de \
    --cc=ville.syrjala@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome