All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Nathan Chancellor <natechancellor@gmail.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] drm/legacy: Fix type for drm_local_map.offset
Date: Fri, 3 Apr 2020 10:28:52 +0200	[thread overview]
Message-ID: <CAKMK7uE9pv23edViQBC=Jy5fQV=-NQTNdk1qi91Z8shpeuL7FA@mail.gmail.com> (raw)
In-Reply-To: <20200403013420.GA11516@ubuntu-m2-xlarge-x86>

On Fri, Apr 3, 2020 at 8:54 AM Nathan Chancellor
<natechancellor@gmail.com> wrote:
>
> On Thu, Apr 02, 2020 at 10:59:26PM +0100, Chris Wilson wrote:
> > drm_local_map.offset is not only used for resource_size_t but also
> > dma_addr_t which may be of different sizes.
> >
> > Reported-by: Nathan Chancellor <natechancellor@gmail.com>
> > Fixes: 8e4ff9b56957 ("drm: Remove the dma_alloc_coherent wrapper for internal usage")
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Dave Airlie <airlied@gmail.com>
> > Cc: Nathan Chancellor <natechancellor@gmail.com>
> > Cc: Linus Torvalds <torvalds@linux-foundation.org>
> > ---
> >  include/drm/drm_legacy.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/include/drm/drm_legacy.h b/include/drm/drm_legacy.h
> > index dcef3598f49e..aed382c17b26 100644
> > --- a/include/drm/drm_legacy.h
> > +++ b/include/drm/drm_legacy.h
> > @@ -136,7 +136,7 @@ struct drm_sg_mem {
> >   * Kernel side of a mapping
> >   */
> >  struct drm_local_map {
> > -     resource_size_t offset;  /**< Requested physical address (0 for SAREA)*/
> > +     dma_addr_t offset;       /**< Requested physical address (0 for SAREA)*/
> >       unsigned long size;      /**< Requested physical size (bytes) */
> >       enum drm_map_type type;  /**< Type of memory to map */
> >       enum drm_map_flags flags;        /**< Flags */
> > --
> > 2.20.1
> >
>
> Thanks for the quick fix!
>
> I ran it through my set of build tests and nothing else seems to have
> broken (at least not any more than it already is...).
>
> Tested-by: Nathan Chancellor <natechancellor@gmail.com> # build

This works too, missed it when replying to Linus

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Linux I guess this one is better, but like I explained it really
doesn't matter what we do with drm legacy code, it's a horror show
that should be disabled on all modern distros anyway. We just keep it
because of "never break old uapi". Maybe in a few years more ...
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

WARNING: multiple messages have this Message-ID (diff)
From: Daniel Vetter <daniel@ffwll.ch>
To: Nathan Chancellor <natechancellor@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Chris Wilson <chris@chris-wilson.co.uk>
Subject: Re: [PATCH] drm/legacy: Fix type for drm_local_map.offset
Date: Fri, 3 Apr 2020 10:28:52 +0200	[thread overview]
Message-ID: <CAKMK7uE9pv23edViQBC=Jy5fQV=-NQTNdk1qi91Z8shpeuL7FA@mail.gmail.com> (raw)
In-Reply-To: <20200403013420.GA11516@ubuntu-m2-xlarge-x86>

On Fri, Apr 3, 2020 at 8:54 AM Nathan Chancellor
<natechancellor@gmail.com> wrote:
>
> On Thu, Apr 02, 2020 at 10:59:26PM +0100, Chris Wilson wrote:
> > drm_local_map.offset is not only used for resource_size_t but also
> > dma_addr_t which may be of different sizes.
> >
> > Reported-by: Nathan Chancellor <natechancellor@gmail.com>
> > Fixes: 8e4ff9b56957 ("drm: Remove the dma_alloc_coherent wrapper for internal usage")
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Dave Airlie <airlied@gmail.com>
> > Cc: Nathan Chancellor <natechancellor@gmail.com>
> > Cc: Linus Torvalds <torvalds@linux-foundation.org>
> > ---
> >  include/drm/drm_legacy.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/include/drm/drm_legacy.h b/include/drm/drm_legacy.h
> > index dcef3598f49e..aed382c17b26 100644
> > --- a/include/drm/drm_legacy.h
> > +++ b/include/drm/drm_legacy.h
> > @@ -136,7 +136,7 @@ struct drm_sg_mem {
> >   * Kernel side of a mapping
> >   */
> >  struct drm_local_map {
> > -     resource_size_t offset;  /**< Requested physical address (0 for SAREA)*/
> > +     dma_addr_t offset;       /**< Requested physical address (0 for SAREA)*/
> >       unsigned long size;      /**< Requested physical size (bytes) */
> >       enum drm_map_type type;  /**< Type of memory to map */
> >       enum drm_map_flags flags;        /**< Flags */
> > --
> > 2.20.1
> >
>
> Thanks for the quick fix!
>
> I ran it through my set of build tests and nothing else seems to have
> broken (at least not any more than it already is...).
>
> Tested-by: Nathan Chancellor <natechancellor@gmail.com> # build

This works too, missed it when replying to Linus

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Linux I guess this one is better, but like I explained it really
doesn't matter what we do with drm legacy code, it's a horror show
that should be disabled on all modern distros anyway. We just keep it
because of "never break old uapi". Maybe in a few years more ...
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2020-04-03  8:29 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-01  5:50 [git pull] drm for 5.7-rc1 Dave Airlie
2020-04-01  5:50 ` Dave Airlie
2020-04-01  9:22 ` Jani Nikula
2020-04-01  9:22   ` Jani Nikula
2020-04-01 22:35 ` pr-tracker-bot
2020-04-01 22:35   ` pr-tracker-bot
2020-04-02 20:33 ` Nathan Chancellor
2020-04-02 20:33   ` Nathan Chancellor
2020-04-02 20:43   ` Linus Torvalds
2020-04-02 20:43     ` Linus Torvalds
2020-04-03  8:12     ` Daniel Vetter
2020-04-03  8:12       ` Daniel Vetter
2020-04-02 21:59   ` [PATCH] drm/legacy: Fix type for drm_local_map.offset Chris Wilson
2020-04-02 21:59     ` Chris Wilson
2020-04-03  1:34     ` Nathan Chancellor
2020-04-03  1:34       ` Nathan Chancellor
2020-04-03  8:28       ` Daniel Vetter [this message]
2020-04-03  8:28         ` Daniel Vetter
2020-04-03 17:14         ` Linus Torvalds
2020-04-03 17:14           ` Linus Torvalds
2020-04-03 17:16           ` Daniel Vetter
2020-04-03 17:16             ` Daniel Vetter
2020-04-09  7:07             ` Daniel Vetter
2020-04-09  7:07               ` 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='CAKMK7uE9pv23edViQBC=Jy5fQV=-NQTNdk1qi91Z8shpeuL7FA@mail.gmail.com' \
    --to=daniel@ffwll.ch \
    --cc=chris@chris-wilson.co.uk \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=natechancellor@gmail.com \
    --cc=torvalds@linux-foundation.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.