mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Thomas Hellstrom <thellstrom@vmware.com>
Cc: Deepak Rawat <drawat@vmware.com>,
	dri-devel@lists.freedesktop.org, syeh@vmware.com,
	linux-graphics-maintainer@vmware.com,
	ville.syrjala@linux.intel.com, lukasz.spintzyk@displaylink.com,
	noralf@tronnes.org, robdclark@gmail.com, gustavo@padovan.org,
	maarten.lankhorst@linux.intel.com, seanpaul@chromium.org,
	airlied@linux.ie, linux-kernel@vger.kernel.org
Subject: Re: [RFC 1/3] drm: Add DAMAGE_CLIPS property to plane
Date: Thu, 5 Apr 2018 15:49:23 +0200	[thread overview]
Message-ID: <20180405134923.GX3881@phenom.ffwll.local> (raw)
In-Reply-To: <b699fce8-4c76-c997-f989-7406cc3d4c92@vmware.com>

On Thu, Apr 05, 2018 at 01:42:11PM +0200, Thomas Hellstrom wrote:
> On 04/05/2018 12:03 PM, Daniel Vetter wrote:
> > 
> > On the topic of input validation: Should the kernel check in shared code
> > that all the clip rects are sensible, i.e. within the dimensions of the
> > fb? Relying on drivers for that seems like a bad idea.
> 
> I guess we could do that.
> 
> There seems to be different needs for different kinds of iterators, but
> otherwise
> I was thinking that an iterator could just skip invalid rects if found. Then
> we
> don't need a separate validation step, but OTOH user-space won't get
> notified if
> that was intended.
> 
> I'm not 100% sure user-space would do anything sensible with any error
> information, though.

Fix userspace, and ime letting userspace get away with improper uapi usage
is a path full of regrets. That's why I'm advising that we check any
unused field for 0, and any unused bits also. Plus anything else that
userspace could get wrong. Because if it's not checked, someone will get
it wrong, and then we have to keep it working forever.
-Daniel

> 
> /Thomas
> 
> 
> > 
> > That could be done in core code in drm_atomic_plane_check().
> > -Daniel
> > > /Thomas
> > > 
> > > 
> > > _______________________________________________
> > > dri-devel mailing list
> > > dri-devel@lists.freedesktop.org
> > > https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.freedesktop.org_mailman_listinfo_dri-2Ddevel&d=DwIBAg&c=uilaK90D4TOVoH58JNXRgQ&r=wnSlgOCqfpNS4d02vP68_E9q2BNMCwfD2OZ_6dCFVQQ&m=JV7fhQ4zTiyiKsY8M0Zlf81l7szYePUke8kwSvQv1T8&s=HEcbr-8aoWqRvWGY6RcL1QeAtEyxMRLHbsOtdJFk78I&e=
> 
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

  reply	other threads:[~2018-04-05 13:49 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-04 23:49 [RFC 0/3] drm: page-flip with damage Deepak Rawat
2018-04-04 23:49 ` [RFC 1/3] drm: Add DAMAGE_CLIPS property to plane Deepak Rawat
2018-04-05  7:35   ` Daniel Vetter
2018-04-05  9:00     ` Thomas Hellstrom
2018-04-05 10:03       ` Daniel Vetter
2018-04-05 11:35         ` Thomas Hellstrom
2018-04-05 13:47           ` Daniel Vetter
2018-04-05 13:58             ` Thomas Hellstrom
2018-04-05 11:42         ` Thomas Hellstrom
2018-04-05 13:49           ` Daniel Vetter [this message]
2018-04-05 23:07     ` Deepak Singh Rawat
2018-04-09  8:33       ` Daniel Vetter
2018-04-09 16:44         ` Deepak Singh Rawat
2018-04-10  8:10   ` Lukasz Spintzyk
2018-04-04 23:49 ` [RFC 2/3] drm: Add helper iterator functions to iterate over plane damage Deepak Rawat
2018-04-05  7:52   ` Daniel Vetter
2018-04-05  8:49     ` Thomas Hellstrom
2018-04-05 10:10       ` Daniel Vetter
2018-04-05 11:51         ` Thomas Hellstrom
2018-04-05 13:52           ` Daniel Vetter
2018-04-05  8:51     ` Thomas Hellstrom
2018-04-05 13:54       ` Daniel Vetter
2018-04-05 23:59       ` Deepak Singh Rawat
2018-04-09  8:35         ` Daniel Vetter
2018-04-05 23:19     ` Deepak Singh Rawat
2018-04-05 17:55   ` Sinclair Yeh
2018-04-04 23:49 ` [RFC 3/3] drm: Add helper to validate damage during modeset_check Deepak Rawat
2018-04-05  7:59   ` Daniel Vetter
2018-04-05 23:55     ` Deepak Singh Rawat
2018-04-09  8:38       ` Daniel Vetter
2018-04-05  7:19 ` [RFC 0/3] drm: page-flip with damage Daniel Vetter
2018-04-05 18:43   ` Deepak Singh Rawat
     [not found] ` <5f3e1c8a-d2b9-41f9-46f6-2b7f8c736de8@displaylink.com>
2018-04-10 18:56   ` Deepak Singh Rawat

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=20180405134923.GX3881@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=airlied@linux.ie \
    --cc=drawat@vmware.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gustavo@padovan.org \
    --cc=linux-graphics-maintainer@vmware.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukasz.spintzyk@displaylink.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=noralf@tronnes.org \
    --cc=robdclark@gmail.com \
    --cc=seanpaul@chromium.org \
    --cc=syeh@vmware.com \
    --cc=thellstrom@vmware.com \
    --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