From: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
To: "Modem, Bhanuprakash" <bhanuprakash.modem@intel.com>
Cc: "Srinivas, Vidya" <vidya.srinivas@intel.com>,
"Joshi, Kunal1" <kunal1.joshi@intel.com>,
"igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>,
"markyacoub@google.com" <markyacoub@google.com>
Subject: Re: [igt-dev] [PATCH i-g-t] lib/intel_bufops: Fix regression on 5.4 kernel
Date: Mon, 20 Sep 2021 19:28:06 +0200 [thread overview]
Message-ID: <20210920172806.GA78788@zkempczy-mobl2> (raw)
In-Reply-To: <DM8PR11MB57199F8801292EE03EAE11B88DA09@DM8PR11MB5719.namprd11.prod.outlook.com>
On Mon, Sep 20, 2021 at 12:32:03PM +0200, Modem, Bhanuprakash wrote:
> > From: Srinivas, Vidya <vidya.srinivas@intel.com>
> > Sent: Monday, September 20, 2021 3:43 PM
> > To: Kempczynski, Zbigniew <zbigniew.kempczynski@intel.com>; Modem,
> > Bhanuprakash <bhanuprakash.modem@intel.com>; Joshi, Kunal1
> > <kunal1.joshi@intel.com>
> > Cc: igt-dev@lists.freedesktop.org; markyacoub@google.com
> > Subject: RE: [PATCH i-g-t] lib/intel_bufops: Fix regression on 5.4 kernel
> >
> >
> >
> > > -----Original Message-----
> > > From: Kempczynski, Zbigniew <zbigniew.kempczynski@intel.com>
> > > Sent: Monday, September 20, 2021 3:17 PM
> > > To: Srinivas, Vidya <vidya.srinivas@intel.com>
> > > Cc: igt-dev@lists.freedesktop.org; Modem, Bhanuprakash
> > > <bhanuprakash.modem@intel.com>; markyacoub@google.com
> > > Subject: Re: [PATCH i-g-t] lib/intel_bufops: Fix regression on 5.4 kernel
> > >
> > > On Mon, Sep 20, 2021 at 02:54:55PM +0530, Vidya Srinivas wrote:
> > > > Starting commit 8759c4a3020ce4 "Add intel_buf_init_in_region"
> > > > __intel_buf_init uses gem_create_in_memory_regions instead of
> > > > gem_create. Older kernels like 5.4 still dont have support for
> > > > I915_GEM_CREATE_EXT_MEMORY_REGIONS (i915_gem_create_ext_ioctl)
> > > from
> > > > kernel commit
> > > > (https://patchwork.freedesktop.org/patch/431581/?series=89648&rev=1)
> > > > Due to this, the flip-vs-fences tests are failing on kernel 5.4 Patch
> > > > adds fall back to gem_create when __gem_create_in_memory_region_list
> > > fails.
> > > >
> > > > v2 - Addressed review comments from Zbigniew and Mark Added the fall
> > > > back in __intel_buf_init
> > > >
> > > > v3 - Fixed space issue - review comment from Zbigniew
> > > >
> > > > Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
> > > > ---
> > > > lib/intel_bufops.c | 8 ++++++--
> > > > 1 file changed, 6 insertions(+), 2 deletions(-)
> > > >
> > > > diff --git a/lib/intel_bufops.c b/lib/intel_bufops.c index
> > > > f5f67eddabd7..0236e4d919d5 100644
> > > > --- a/lib/intel_bufops.c
> > > > +++ b/lib/intel_bufops.c
> > > > @@ -818,8 +818,12 @@ static void __intel_buf_init(struct buf_ops
> > > > *bops,
> > > >
> > > > if (handle)
> > > > buf->handle = handle;
> > > > - else
> > > > - buf->handle = gem_create_in_memory_regions(bops->fd,
> > > size, region);
> > > > + else {
> > > > + if (__gem_create_in_memory_regions(bops->fd, &handle,
> > > size, region) != 0)
> > > > + buf->handle = gem_create(bops->fd, size);
> > > > + else
> > > > + buf->handle = handle;
>
> There is nothing wrong with this code, but I personally feels to update
> as below can be more user understandable (Just throw legacy/incompatible
> stuff to else condition)
>
> if (!__gem_create_in_memory_regions(bops->fd, &handle, size, region))
> buf->handle = handle;
> else
> buf->handle = gem_create(bops->fd, size);
>
> Acked-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
>
> - Bhanu
Hmm, after looking at wider context we could even do
if (__gem_create_in_memory_regions(bops->fd, &buf->handle, size, region))
buf->handle = gem_create(bops->fd, size);
But this will likely obscure the intention.
--
Zbigniew
>
> > > > + }
> > >
> > > Patchwork didn't get my previous rb, so for easier merge:
> > >
> > > Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
> >
> > Hello Zbigniew,
> >
> > Thank you so much. That is extremely kind of you.
> >
> > @Modem, Bhanuprakash, @Joshi, Kunal1 kindly help with merge if it passes CI.
> >
> > Regards
> > Vidya
> >
> > >
> > > --
> > > Zbigniew
> > >
> > > >
> > > > set_hw_tiled(bops, buf);
> > > > }
> > > > --
> > > > 2.33.0
> > > >
next prev parent reply other threads:[~2021-09-20 17:28 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-16 14:12 [igt-dev] [PATCH i-g-t] lib/i915/intel_memory_region: Fix regression on 5.4 kernel Vidya Srinivas
2021-09-16 15:25 ` Mark Yacoub
2021-09-17 7:21 ` Zbigniew Kempczyński
2021-09-20 8:16 ` Srinivas, Vidya
2021-09-16 17:12 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2021-09-16 19:52 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2021-09-20 7:56 ` [igt-dev] [PATCH i-g-t] lib/intel_bufops: " Vidya Srinivas
2021-09-20 8:00 ` Vidya Srinivas
2021-09-20 9:24 ` Zbigniew Kempczyński
2021-09-20 9:40 ` Srinivas, Vidya
2021-09-20 9:44 ` Zbigniew Kempczyński
2021-09-20 9:24 ` Vidya Srinivas
2021-09-20 9:46 ` Zbigniew Kempczyński
2021-09-20 10:12 ` Srinivas, Vidya
2021-09-20 10:32 ` Modem, Bhanuprakash
2021-09-20 11:01 ` Srinivas, Vidya
2021-09-20 17:28 ` Zbigniew Kempczyński [this message]
2021-09-21 4:55 ` Srinivas, Vidya
2021-09-20 10:47 ` [igt-dev] [PATCH] " Vidya Srinivas
2021-09-20 9:10 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/i915/intel_memory_region: Fix regression on 5.4 kernel (rev3) Patchwork
2021-09-20 10:26 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2021-09-20 11:03 ` [igt-dev] ✗ Fi.CI.BAT: failure for lib/i915/intel_memory_region: Fix regression on 5.4 kernel (rev4) Patchwork
2021-09-20 11:28 ` [igt-dev] ✗ Fi.CI.BAT: failure for lib/i915/intel_memory_region: Fix regression on 5.4 kernel (rev5) Patchwork
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=20210920172806.GA78788@zkempczy-mobl2 \
--to=zbigniew.kempczynski@intel.com \
--cc=bhanuprakash.modem@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kunal1.joshi@intel.com \
--cc=markyacoub@google.com \
--cc=vidya.srinivas@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