All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Eric Anholt <eric@anholt.net>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 4/4] drm/vc4: Validate framebuffer pixel format/modifier
Date: Mon, 12 Mar 2018 17:04:11 +0200	[thread overview]
Message-ID: <20180312150411.GI5453@intel.com> (raw)
In-Reply-To: <87woylgeb0.fsf@anholt.net>

On Fri, Mar 09, 2018 at 12:54:43PM -0800, Eric Anholt wrote:
> Ville Syrjala <ville.syrjala@linux.intel.com> writes:
> 
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > Only create framebuffers with supported format/modifier combinations by
> > checking that at least one plane supports the requested combination.
> >
> > Using drm_any_plane_has_format() is somewhat suboptimal for vc4 since
> > the planes have (mostly) uniform capabilities. But I was lazy and
> > didn't feel like exporting drm_plane_format_check() and hand rolling
> > anything better. Also I really just wanted to come up with another
> > user for drm_any_plane_has_format() ;)
> 
> I'm not excited about vc4 having error-return behavior that other
> drivers don't have.  Actually, I don't really see why we should be doing
> this check in fb create at all, given that you have to do so again at
> atomic_check time with the specific plane.
> 
> Could you just delete the i915 fb format check code?

I don't want unsupported formats to get anywhere near the driver
code. Makes life much less stressful when you know what can and
can't get in.

Also I see no good reason to allow userspace to create fbs it
can't actually use later on. Much better to reject early and tell
userspace to pick another format. I imagine pre-blobifier userspace
could even use this as a way to probe what's supported by the driver.

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-03-12 15:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-09 15:14 [PATCH v3 1/4] drm: Add drm_any_plane_has_format() Ville Syrjala
2018-03-09 15:14 ` [PATCH v3 2/4] drm/i915: Eliminate the horrendous format check code Ville Syrjala
2018-10-26 20:08   ` [Intel-gfx] " Dhinakaran Pandiyan
2018-03-09 15:14 ` [PATCH 3/4] drm: Fix some coding style issues Ville Syrjala
2018-03-09 15:14 ` [PATCH 4/4] drm/vc4: Validate framebuffer pixel format/modifier Ville Syrjala
2018-03-09 20:54   ` Eric Anholt
2018-03-12 15:04     ` Ville Syrjälä [this message]
2018-03-12 16:57     ` Daniel Vetter
2018-03-09 15:38 ` ✓ Fi.CI.BAT: success for series starting with [v3,1/4] drm: Add drm_any_plane_has_format() Patchwork
2018-03-09 19:52 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-03-12 16:33 ` ✓ Fi.CI.BAT: success " Patchwork
2018-03-12 20:25 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-10-26 20:04 ` [PATCH v3 1/4] " Dhinakaran Pandiyan

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=20180312150411.GI5453@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=eric@anholt.net \
    --cc=intel-gfx@lists.freedesktop.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.