public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Daniel Stone <daniel@fooishbar.org>
Cc: igt-dev@lists.freedesktop.org, drawat@vmware.com,
	Daniel Vetter <daniel@ffwll.ch>
Subject: Re: [igt-dev] [PATCH i-g-t v2] lib: Don't call igt_require_fb_modifiers() when no modifier
Date: Mon, 15 Oct 2018 16:52:47 +0300	[thread overview]
Message-ID: <20181015135247.GZ9144@intel.com> (raw)
In-Reply-To: <CAPj87rN4VZEMC8jc8QYXqU+0isXh0UTb_xGgtE3QTG6But+qRQ@mail.gmail.com>

On Sat, Oct 13, 2018 at 01:04:08PM +0100, Daniel Stone wrote:
> Hi Deepak,
> 
> On Fri, 12 Oct 2018 at 16:24, <sunpeng.li@amd.com> wrote:
> > * In create_fb() calls to kms_addfb(), remove the modifier flag iff the
> >   driver doesn't support modifiers and the modifer is 0
> 
> I know this wasn't your idea and you were just following the
> suggestion - but 0 _is_ a valid modifier with a very specific meaning,
> which is to always interpret the buffer as linear, no matter what.
> 
> DRM_FORMAT_MOD_INVALID is a non-zero value, and should be passed
> anywhere that modifiers are not supported or their use is not wanted.
> 
> > @@ -1678,7 +1682,8 @@ int __kms_addfb(int fd, uint32_t handle,
> >         struct drm_mode_fb_cmd2 f;
> >         int ret, i;
> >
> > -       igt_require_fb_modifiers(fd);
> > +       if (modifier || flags & DRM_MODE_FB_MODIFIERS)
> 
> So I would suggest changing this test to modifier !=
> DRM_FORMAT_MOD_INVALID, and passing INVALID rather than 0 where
> required.

If we start using DRM_FORMAT_MOD_INVALID then I suppose we should
drop the flags parameter entirely as it'll become redundant.

In the current scheme I think it would suffice to just
'if (flags & MOD) igt_require_mods()'. I don't think we need to
protect against someone passing in a non-linear modifier without
the flag. That would just be a bug (or even a feature perhaps)
in the test.

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

      reply	other threads:[~2018-10-15 13:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-12 15:23 [igt-dev] [PATCH i-g-t v2] lib: Don't call igt_require_fb_modifiers() when no modifier sunpeng.li
2018-10-12 17:13 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-10-12 19:49 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2018-10-13 12:04 ` [igt-dev] [PATCH i-g-t v2] " Daniel Stone
2018-10-15 13:52   ` Ville Syrjälä [this message]

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=20181015135247.GZ9144@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=daniel@ffwll.ch \
    --cc=daniel@fooishbar.org \
    --cc=drawat@vmware.com \
    --cc=igt-dev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox