All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ayan Halder <Ayan.Halder-5wv7dgnIgG8@public.gmane.org>
To: Eric Engestrom <eric.engestrom-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: "freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
	"maxime.ripard-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org"
	<maxime.ripard-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org>,
	Liviu Dudau <Liviu.Dudau-5wv7dgnIgG8@public.gmane.org>,
	"intel-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<intel-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
	"joonas.lahtinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org"
	<joonas.lahtinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
	"maarten.lankhorst-VuQAYsv1563Yd54FQh9/CA@public.gmane.org"
	<maarten.lankhorst-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"jani.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org"
	<jani.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
	"airlied-cv59FeDIM0c@public.gmane.org"
	<airlied-cv59FeDIM0c@public.gmane.org>,
	Rob Clark <robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"malidp-VeJGdqYn5oNWk0Htik3J/w@public.gmane.org"
	<malidp-VeJGdqYn5oNWk0Htik3J/w@public.gmane.org>,
	"dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
	"daniel-/w4YWyX8dFk@public.gmane.org"
	<daniel-/w4YWyX8dFk@public.gmane.org>,
	"rodrigo.vivi-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org"
	<rodrigo.vivi-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	nd <nd-5wv7dgnIgG8@public.gmane.org>,
	"sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org"
	<sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>,
	Brian Starkey <Brian.Starkey-5wv7dgnIgG8@public.gmane.org>,
	linux-arm-msm@vger
Subject: Re: [PATCH libdrm] headers: Sync with drm-next
Date: Fri, 12 Apr 2019 09:00:58 +0000	[thread overview]
Message-ID: <20190412090057.GB4183@arm.com> (raw)
In-Reply-To: <20190411062032.qqxz3j7mm4cgzgfp-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

On Thu, Apr 11, 2019 at 07:20:32AM +0100, Eric Engestrom wrote:
> On Wednesday, 2019-04-10 21:49:33 -0400, Rob Clark wrote:
> > On Tue, Apr 9, 2019 at 8:27 AM Eric Engestrom <eric.engestrom@intel.com> wrote:
> > > > > diff --git a/include/drm/msm_drm.h b/include/drm/msm_drm.h
> > > > > index c06d0a5..91a16b3 100644
> > > > > --- a/include/drm/msm_drm.h
> > > > > +++ b/include/drm/msm_drm.h
> > > > > @@ -105,14 +105,24 @@ struct drm_msm_gem_new {
> > > > >     __u32 handle;         /* out */
> > > > >  };
> > > > >
> > > > > -#define MSM_INFO_IOVA      0x01
> > > > > -
> > > > > -#define MSM_INFO_FLAGS (MSM_INFO_IOVA)
> > > > > +/* Get or set GEM buffer info.  The requested value can be passed
> > > > > + * directly in 'value', or for data larger than 64b 'value' is a
> > > > > + * pointer to userspace buffer, with 'len' specifying the number of
> > > > > + * bytes copied into that buffer.  For info returned by pointer,
> > > > > + * calling the GEM_INFO ioctl with null 'value' will return the
> > > > > + * required buffer size in 'len'
> > > > > + */
> > > > > +#define MSM_INFO_GET_OFFSET        0x00   /* get mmap() offset, returned by value */
> > > > > +#define MSM_INFO_GET_IOVA  0x01   /* get iova, returned by value */
> > > > > +#define MSM_INFO_SET_NAME  0x02   /* set the debug name (by pointer) */
> > > > > +#define MSM_INFO_GET_NAME  0x03   /* get debug name, returned by pointer */
> > > > >
> > > > >  struct drm_msm_gem_info {
> > > > >     __u32 handle;         /* in */
> > > > > -   __u32 flags;          /* in - combination of MSM_INFO_* flags */
> > > > > -   __u64 offset;         /* out, mmap() offset or iova */
> > > > > +   __u32 info;           /* in - one of MSM_INFO_* */
> > > > > +   __u64 value;          /* in or out */
> > > > > +   __u32 len;            /* in or out */
> > > > > +   __u32 pad;
> > >
> > > freedreno/msm/msm_bo.c needs to be updated to reflect those changes.
> > 
> > 
> > I think you can just rename flags->info and offset->value, the rest of
> > the struct should be zero-initialized.. if in doubt you can check
> > $mesa/src/freedreno/drm/msm_bo.c
> > 
> > side-note:  the libdrm_freedreno code was folded into mesa in 19.0, so
> > at *some* point we can probably disable libdrm_freedreno build by
> > default.
> 
> Right now, freedreno's `auto` enables it by default on arm and disables it on
> everything else.
> 
> I always enable everything to at least build-test it, but Ayan was using
> the defaults which is why he didn't see this issue at first.
> 
> Btw, the GitLab CI builds everything, so it hopefully won't bitrot unnoticed.

My bad, I was not aware that there is repo of libdrm in gitlab when I
submitted my v1 patch. I have taken care of it in my v2 patch ([PATCH
libdrm v2] headers: Sync with drm-next) and have also raised a merge
request
(https://gitlab.freedesktop.org/ayan.halder/drm/merge_requests/1/diffs)
to execute the gitlab ci tools.
Please be requested to have a look at my v2 patch.
> 
> > (I'd kinda still like to keep the code around for some misc
> > standalone tools I have, but that is the sort of thing where I can fix
> > libdrm if it gets broken).  When to switch to disabled by default I
> > guess comes down to how long we want to support mesa 18.x with latest
> > libdrm??  Maybe after 19.1, since (selfishly motivated) that gives me
> > a long enough window back in case I find myself needing to bisect for
> > some regression..
_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno

WARNING: multiple messages have this Message-ID (diff)
From: Ayan Halder <Ayan.Halder@arm.com>
To: Eric Engestrom <eric.engestrom@intel.com>
Cc: Rob Clark <robdclark@gmail.com>,
	Liviu Dudau <Liviu.Dudau@arm.com>,
	Brian Starkey <Brian.Starkey@arm.com>,
	"malidp@foss.arm.com" <malidp@foss.arm.com>,
	"maarten.lankhorst@linux.intel.com" 
	<maarten.lankhorst@linux.intel.com>,
	"maxime.ripard@bootlin.com" <maxime.ripard@bootlin.com>,
	"sean@poorly.run" <sean@poorly.run>,
	"airlied@linux.ie" <airlied@linux.ie>,
	"daniel@ffwll.ch" <daniel@ffwll.ch>,
	"jani.nikula@linux.intel.com" <jani.nikula@linux.intel.com>,
	"joonas.lahtinen@linux.intel.com"
	<joonas.lahtinen@linux.intel.com>,
	"rodrigo.vivi@intel.com" <rodrigo.vivi@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"freedreno@lists.freedesktop.org"
	<freedreno@lists.freedesktop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	nd <nd@arm.com>
Subject: Re: [PATCH libdrm] headers: Sync with drm-next
Date: Fri, 12 Apr 2019 09:00:58 +0000	[thread overview]
Message-ID: <20190412090057.GB4183@arm.com> (raw)
Message-ID: <20190412090058.yUW6PYM6dqwlfkl8FyJ631T5SEnLSUeqvTfzPUqJ4FI@z> (raw)
In-Reply-To: <20190411062032.qqxz3j7mm4cgzgfp@intel.com>

On Thu, Apr 11, 2019 at 07:20:32AM +0100, Eric Engestrom wrote:
> On Wednesday, 2019-04-10 21:49:33 -0400, Rob Clark wrote:
> > On Tue, Apr 9, 2019 at 8:27 AM Eric Engestrom <eric.engestrom@intel.com> wrote:
> > > > > diff --git a/include/drm/msm_drm.h b/include/drm/msm_drm.h
> > > > > index c06d0a5..91a16b3 100644
> > > > > --- a/include/drm/msm_drm.h
> > > > > +++ b/include/drm/msm_drm.h
> > > > > @@ -105,14 +105,24 @@ struct drm_msm_gem_new {
> > > > >     __u32 handle;         /* out */
> > > > >  };
> > > > >
> > > > > -#define MSM_INFO_IOVA      0x01
> > > > > -
> > > > > -#define MSM_INFO_FLAGS (MSM_INFO_IOVA)
> > > > > +/* Get or set GEM buffer info.  The requested value can be passed
> > > > > + * directly in 'value', or for data larger than 64b 'value' is a
> > > > > + * pointer to userspace buffer, with 'len' specifying the number of
> > > > > + * bytes copied into that buffer.  For info returned by pointer,
> > > > > + * calling the GEM_INFO ioctl with null 'value' will return the
> > > > > + * required buffer size in 'len'
> > > > > + */
> > > > > +#define MSM_INFO_GET_OFFSET        0x00   /* get mmap() offset, returned by value */
> > > > > +#define MSM_INFO_GET_IOVA  0x01   /* get iova, returned by value */
> > > > > +#define MSM_INFO_SET_NAME  0x02   /* set the debug name (by pointer) */
> > > > > +#define MSM_INFO_GET_NAME  0x03   /* get debug name, returned by pointer */
> > > > >
> > > > >  struct drm_msm_gem_info {
> > > > >     __u32 handle;         /* in */
> > > > > -   __u32 flags;          /* in - combination of MSM_INFO_* flags */
> > > > > -   __u64 offset;         /* out, mmap() offset or iova */
> > > > > +   __u32 info;           /* in - one of MSM_INFO_* */
> > > > > +   __u64 value;          /* in or out */
> > > > > +   __u32 len;            /* in or out */
> > > > > +   __u32 pad;
> > >
> > > freedreno/msm/msm_bo.c needs to be updated to reflect those changes.
> > 
> > 
> > I think you can just rename flags->info and offset->value, the rest of
> > the struct should be zero-initialized.. if in doubt you can check
> > $mesa/src/freedreno/drm/msm_bo.c
> > 
> > side-note:  the libdrm_freedreno code was folded into mesa in 19.0, so
> > at *some* point we can probably disable libdrm_freedreno build by
> > default.
> 
> Right now, freedreno's `auto` enables it by default on arm and disables it on
> everything else.
> 
> I always enable everything to at least build-test it, but Ayan was using
> the defaults which is why he didn't see this issue at first.
> 
> Btw, the GitLab CI builds everything, so it hopefully won't bitrot unnoticed.

My bad, I was not aware that there is repo of libdrm in gitlab when I
submitted my v1 patch. I have taken care of it in my v2 patch ([PATCH
libdrm v2] headers: Sync with drm-next) and have also raised a merge
request
(https://gitlab.freedesktop.org/ayan.halder/drm/merge_requests/1/diffs)
to execute the gitlab ci tools.
Please be requested to have a look at my v2 patch.
> 
> > (I'd kinda still like to keep the code around for some misc
> > standalone tools I have, but that is the sort of thing where I can fix
> > libdrm if it gets broken).  When to switch to disabled by default I
> > guess comes down to how long we want to support mesa 18.x with latest
> > libdrm??  Maybe after 19.1, since (selfishly motivated) that gives me
> > a long enough window back in case I find myself needing to bisect for
> > some regression..

  parent reply	other threads:[~2019-04-12  9:00 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-08 13:44 [PATCH libdrm] headers: Sync with drm-next Ayan Halder
2019-04-08 13:44 ` Ayan Halder
2019-04-08 20:54 ` Eric Engestrom
2019-04-08 20:54   ` Eric Engestrom
2019-04-09 11:35   ` Ayan Halder
2019-04-09 11:35     ` Ayan Halder
2019-04-09 11:59     ` Eric Engestrom
2019-04-09 11:59       ` Eric Engestrom
2019-04-09 12:27       ` Eric Engestrom
2019-04-09 12:27         ` Eric Engestrom
2019-04-11  1:49         ` Rob Clark
2019-04-11  1:49           ` Rob Clark
2019-04-11  6:20           ` Eric Engestrom
2019-04-11  6:20             ` Eric Engestrom
     [not found]             ` <20190411062032.qqxz3j7mm4cgzgfp-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2019-04-12  9:00               ` Ayan Halder [this message]
2019-04-12  9:00                 ` Ayan Halder
2019-04-12  8:52           ` Ayan Halder
2019-04-12  8:52             ` Ayan Halder
2019-04-15 16:04           ` Daniel Vetter
2019-04-15 16:04             ` Daniel Vetter

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=20190412090057.GB4183@arm.com \
    --to=ayan.halder-5wv7dgnigg8@public.gmane.org \
    --cc=Brian.Starkey-5wv7dgnIgG8@public.gmane.org \
    --cc=Liviu.Dudau-5wv7dgnIgG8@public.gmane.org \
    --cc=airlied-cv59FeDIM0c@public.gmane.org \
    --cc=daniel-/w4YWyX8dFk@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=eric.engestrom-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=intel-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=jani.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=joonas.lahtinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=linux-arm-msm@vger \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=maarten.lankhorst-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=malidp-VeJGdqYn5oNWk0Htik3J/w@public.gmane.org \
    --cc=maxime.ripard-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org \
    --cc=nd-5wv7dgnIgG8@public.gmane.org \
    --cc=robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=rodrigo.vivi-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.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.