All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Engestrom <eric.engestrom@imgtec.com>
To: Eric Engestrom <eric@engestrom.ch>,
	linux-kernel@vger.kernel.org, David Airlie <airlied@linux.ie>,
	dri-devel@lists.freedesktop.org,
	Wei Yongjun <yongjun_wei@trendmicro.com.cn>,
	Daniel Vetter <daniel.vetter@intel.com>,
	Flora Cui <Flora.Cui@amd.com>,
	Gustavo Padovan <gustavo.padovan@collabora.co.uk>,
	Tom St Denis <tom.stdenis@amd.com>,
	Chunming Zhou <David1.Zhou@amd.com>,
	Thomas Hellstrom <thellstrom@vmware.com>,
	Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
	Sinclair Yeh <syeh@vmware.com>,
	Xinliang Liu <z.liuxinliang@hisilicon.com>,
	Xinwei Kong <kong.kongxinwei@hisilicon.com>,
	VMware Graphics <linux-graphics-maintainer@vmware.com>,
	Vitaly Prosyak <vitaly.prosyak@amd.com>,
	Alexandre Demers <alexandre.f.demers@gmail.com>,
	Jani Nikula <jani.nikula@intel.com>,
	intel-gfx@lists.freedesktop.org, Emily Deng <Emily.Deng@amd.com>,
	Colin Ian King <colin.king@ca>
Subject: Re: [PATCH v3] drm: move allocation out of drm_get_format_name()
Date: Wed, 9 Nov 2016 11:42:17 +0000	[thread overview]
Message-ID: <20161109114217.GO25290@imgtec.com> (raw)
In-Reply-To: <20161109011325.hvvfsvpq734nduxd@phenom.ffwll.local>

On Wednesday, 2016-11-09 02:13:25 +0100, Daniel Vetter wrote:
> On Wed, Nov 09, 2016 at 02:09:16AM +0100, Daniel Vetter wrote:
> > On Wed, Nov 09, 2016 at 12:17:52AM +0000, Eric Engestrom wrote:
> > > The function's behaviour was changed in 90844f00049e, without changing
> > > its signature, causing people to keep using it the old way without
> > > realising they were now leaking memory.
> > > Rob Clark also noticed it was also allocating GFP_KERNEL memory in
> > > atomic contexts, breaking them.
> > > 
> > > Instead of having to allocate GFP_ATOMIC memory and fixing the callers
> > > to make them cleanup the memory afterwards, let's change the function's
> > > signature by having the caller take care of the memory and passing it to
> > > the function.
> > > The new parameter is a single-field struct in order to enforce the size
> > > of its buffer and help callers to correctly manage their memory.
> > > 
> > > Fixes: 90844f00049e ("drm: make drm_get_format_name thread-safe")
> > > Cc: Rob Clark <robdclark@gmail.com>
> > > Cc: Christian König <christian.koenig@amd.com>
> > > Acked-by: Christian König <christian.koenig@amd.com>
> > > Acked-by: Rob Clark <robdclark@gmail.com>
> > > Acked-by: Sinclair Yeh <syeh@vmware.com> (vmwgfx)
> > > Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> > > Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > Signed-off-by: Eric Engestrom <eric@engestrom.ch>
> > > ---
> > > v3 - fix "Fixes" tag, replace it with an actual commit message
> > >    - collect ack & r-b
> > > 
> > > v2 - use single-field struct instead of typedef to let the compiler
> > >      enforce the type (Christian König)
> > 
> > Applied to drm-misc, thanks.
> 
> Well, had to drop it again since it didn't compile:
> 
> 
>   CC [M]  drivers/gpu/drm/drm_blend.o
> drivers/gpu/drm/drm_atomic.c: In function ‘drm_atomic_plane_print_state’:
> drivers/gpu/drm/drm_atomic.c:920:5: error: too few arguments to function ‘drm_get_format_name’
>      drm_get_format_name(fb->pixel_format));
>      ^~~~~~~~~~~~~~~~~~~
> In file included from ./include/drm/drmP.h:71:0,
>                  from drivers/gpu/drm/drm_atomic.c:29:
> ./include/drm/drm_fourcc.h:65:7: note: declared here
>  char *drm_get_format_name(uint32_t format, struct drm_format_name_buf *buf);
>        ^~~~~~~~~~~~~~~~~~~
> 
> Can you pls rebase onto drm-misc or linux-next or something?

That was based on airlied/drm-next (last fetched on Sunday I think),
I can rebase it on drm-misc if it helps, but it seems older than
drm-next.
Should I just rebase on top of current head of drm-next?
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

WARNING: multiple messages have this Message-ID (diff)
From: Eric Engestrom <eric.engestrom@imgtec.com>
To: "Eric Engestrom" <eric@engestrom.ch>,
	linux-kernel@vger.kernel.org, "David Airlie" <airlied@linux.ie>,
	dri-devel@lists.freedesktop.org,
	"Wei Yongjun" <yongjun_wei@trendmicro.com.cn>,
	"Daniel Vetter" <daniel.vetter@intel.com>,
	"Flora Cui" <Flora.Cui@amd.com>,
	"Gustavo Padovan" <gustavo.padovan@collabora.co.uk>,
	"Tom St Denis" <tom.stdenis@amd.com>,
	"Chunming Zhou" <David1.Zhou@amd.com>,
	"Thomas Hellstrom" <thellstrom@vmware.com>,
	"Laurent Pinchart" <laurent.pinchart+renesas@ideasonboard.com>,
	"Sinclair Yeh" <syeh@vmware.com>,
	"Xinliang Liu" <z.liuxinliang@hisilicon.com>,
	"Xinwei Kong" <kong.kongxinwei@hisilicon.com>,
	"VMware Graphics" <linux-graphics-maintainer@vmware.com>,
	"Vitaly Prosyak" <vitaly.prosyak@amd.com>,
	"Alexandre Demers" <alexandre.f.demers@gmail.com>,
	"Jani Nikula" <jani.nikula@intel.com>,
	intel-gfx@lists.freedesktop.org,
	"Emily Deng" <Emily.Deng@amd.com>,
	"Colin Ian King" <colin.king@canonical.com>,
	"Junwei Zhang" <Jerry.Zhang@amd.com>,
	"Michel Dänzer" <michel.daenzer@amd.com>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>
Subject: Re: [Intel-gfx] [PATCH v3] drm: move allocation out of drm_get_format_name()
Date: Wed, 9 Nov 2016 11:42:17 +0000	[thread overview]
Message-ID: <20161109114217.GO25290@imgtec.com> (raw)
In-Reply-To: <20161109011325.hvvfsvpq734nduxd@phenom.ffwll.local>

On Wednesday, 2016-11-09 02:13:25 +0100, Daniel Vetter wrote:
> On Wed, Nov 09, 2016 at 02:09:16AM +0100, Daniel Vetter wrote:
> > On Wed, Nov 09, 2016 at 12:17:52AM +0000, Eric Engestrom wrote:
> > > The function's behaviour was changed in 90844f00049e, without changing
> > > its signature, causing people to keep using it the old way without
> > > realising they were now leaking memory.
> > > Rob Clark also noticed it was also allocating GFP_KERNEL memory in
> > > atomic contexts, breaking them.
> > > 
> > > Instead of having to allocate GFP_ATOMIC memory and fixing the callers
> > > to make them cleanup the memory afterwards, let's change the function's
> > > signature by having the caller take care of the memory and passing it to
> > > the function.
> > > The new parameter is a single-field struct in order to enforce the size
> > > of its buffer and help callers to correctly manage their memory.
> > > 
> > > Fixes: 90844f00049e ("drm: make drm_get_format_name thread-safe")
> > > Cc: Rob Clark <robdclark@gmail.com>
> > > Cc: Christian König <christian.koenig@amd.com>
> > > Acked-by: Christian König <christian.koenig@amd.com>
> > > Acked-by: Rob Clark <robdclark@gmail.com>
> > > Acked-by: Sinclair Yeh <syeh@vmware.com> (vmwgfx)
> > > Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> > > Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > Signed-off-by: Eric Engestrom <eric@engestrom.ch>
> > > ---
> > > v3 - fix "Fixes" tag, replace it with an actual commit message
> > >    - collect ack & r-b
> > > 
> > > v2 - use single-field struct instead of typedef to let the compiler
> > >      enforce the type (Christian König)
> > 
> > Applied to drm-misc, thanks.
> 
> Well, had to drop it again since it didn't compile:
> 
> 
>   CC [M]  drivers/gpu/drm/drm_blend.o
> drivers/gpu/drm/drm_atomic.c: In function ‘drm_atomic_plane_print_state’:
> drivers/gpu/drm/drm_atomic.c:920:5: error: too few arguments to function ‘drm_get_format_name’
>      drm_get_format_name(fb->pixel_format));
>      ^~~~~~~~~~~~~~~~~~~
> In file included from ./include/drm/drmP.h:71:0,
>                  from drivers/gpu/drm/drm_atomic.c:29:
> ./include/drm/drm_fourcc.h:65:7: note: declared here
>  char *drm_get_format_name(uint32_t format, struct drm_format_name_buf *buf);
>        ^~~~~~~~~~~~~~~~~~~
> 
> Can you pls rebase onto drm-misc or linux-next or something?

That was based on airlied/drm-next (last fetched on Sunday I think),
I can rebase it on drm-misc if it helps, but it seems older than
drm-next.
Should I just rebase on top of current head of drm-next?

  reply	other threads:[~2016-11-09 11:42 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-04 15:32 [PATCH] drm: make drm_get_format_name atomic/irq safe again Rob Clark
2016-11-04 15:45 ` Rob Clark
2016-11-04 16:27 ` Ville Syrjälä
2016-11-04 17:12   ` Rob Clark
2016-11-04 17:32     ` Eric Engestrom
2016-11-04 17:33       ` [PATCH variant 1] " Eric Engestrom
2016-11-04 17:33         ` Eric Engestrom
2016-11-04 17:50       ` [PATCH] " Rob Clark
2016-11-04 18:13         ` Ville Syrjälä
2016-11-05  1:23         ` Eric Engestrom
2016-11-05  1:33           ` [PATCH] drm: move allocation out of drm_get_format_name() Eric Engestrom
2016-11-05  1:33             ` Eric Engestrom
2016-11-05  6:56             ` Thomas Hellstrom
2016-11-05  6:56               ` Thomas Hellstrom
2016-11-05 12:11             ` Christian König
2016-11-05 12:11               ` Christian König
2016-11-05 16:38               ` Eric Engestrom
2016-11-05 16:38                 ` Eric Engestrom
2016-11-05 16:49                 ` Rob Clark
2016-11-05 16:49                   ` Rob Clark
2016-11-06  9:47                   ` Christian König
2016-11-06  9:47                     ` Christian König
2016-11-06 13:03                     ` Rob Clark
2016-11-06 13:03                       ` Rob Clark
2016-11-07  0:47                       ` Eric Engestrom
2016-11-07  0:47                         ` Eric Engestrom
2016-11-07  0:48                         ` [PATCH v2] " Eric Engestrom
2016-11-07  0:48                           ` Eric Engestrom
2016-11-07  7:46                           ` Christian König
2016-11-07  7:46                             ` Christian König
2016-11-07  8:10                           ` Jani Nikula
2016-11-07  8:10                             ` Jani Nikula
2016-11-07 17:12                             ` Eric Engestrom
2016-11-07 17:12                               ` Eric Engestrom
2016-11-07 17:38                               ` Jani Nikula
2016-11-07 17:38                                 ` Jani Nikula
2016-11-08 10:15                                 ` [Intel-gfx] " Daniel Vetter
2016-11-08 10:15                                   ` Daniel Vetter
2016-11-09  0:17                                   ` [PATCH v3] " Eric Engestrom
2016-11-09  0:17                                     ` Eric Engestrom
2016-11-09  1:09                                     ` [Intel-gfx] " Daniel Vetter
2016-11-09  1:09                                       ` Daniel Vetter
2016-11-09  1:13                                       ` Daniel Vetter
2016-11-09  1:13                                         ` [Intel-gfx] " Daniel Vetter
2016-11-09 11:42                                         ` Eric Engestrom [this message]
2016-11-09 11:42                                           ` Eric Engestrom
2016-11-09 13:13                                           ` Daniel Vetter
2016-11-09 13:13                                             ` Daniel Vetter
2016-11-09 16:59                                             ` Eric Engestrom
2016-11-09 16:59                                               ` [Intel-gfx] " Eric Engestrom
2016-11-10 10:03                                               ` Laurent Pinchart
2016-11-10 10:03                                                 ` [Intel-gfx] " Laurent Pinchart
2016-11-10 10:30                                                 ` Jani Nikula
2016-11-10 10:30                                                   ` Jani Nikula
2016-11-10 10:59                                                   ` Laurent Pinchart
2016-11-10 10:59                                                     ` Laurent Pinchart
2016-11-10 11:03                                                     ` Jani Nikula
2016-11-10 11:03                                                       ` Jani Nikula
2016-11-11  9:26                                               ` Daniel Vetter
2016-11-11  9:26                                                 ` Daniel Vetter
2016-11-12  1:12                                                 ` [PATCH v4] " Eric Engestrom
2016-11-12  1:12                                                   ` Eric Engestrom
2016-11-07 14:45                           ` [PATCH v2] " Rob Clark
2016-11-07 14:45                             ` Rob Clark
2016-11-07 18:12                           ` Sinclair Yeh
2016-11-07 18:12                             ` Sinclair Yeh
2016-11-05  1:52           ` [PATCH] drm: make drm_get_format_name atomic/irq safe again Rob Clark
2016-11-05  2:15 ` ✓ Fi.CI.BAT: success for drm: move allocation out of drm_get_format_name() Patchwork
2016-11-07  1:15 ` ✗ Fi.CI.BAT: warning for drm: move allocation out of drm_get_format_name() (rev2) Patchwork
2016-11-07  8:18   ` Saarinen, Jani
2016-11-09  0:31 ` ✗ Fi.CI.BAT: failure for drm: move allocation out of drm_get_format_name() (rev3) Patchwork
2016-11-12  1:45 ` ✓ Fi.CI.BAT: success for drm: move allocation out of drm_get_format_name() (rev4) 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=20161109114217.GO25290@imgtec.com \
    --to=eric.engestrom@imgtec.com \
    --cc=David1.Zhou@amd.com \
    --cc=Emily.Deng@amd.com \
    --cc=Flora.Cui@amd.com \
    --cc=airlied@linux.ie \
    --cc=alexandre.f.demers@gmail.com \
    --cc=colin.king@ca \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=eric@engestrom.ch \
    --cc=gustavo.padovan@collabora.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=kong.kongxinwei@hisilicon.com \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=linux-graphics-maintainer@vmware.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syeh@vmware.com \
    --cc=thellstrom@vmware.com \
    --cc=tom.stdenis@amd.com \
    --cc=vitaly.prosyak@amd.com \
    --cc=yongjun_wei@trendmicro.com.cn \
    --cc=z.liuxinliang@hisilicon.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 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.