All of lore.kernel.org
 help / color / mirror / Atom feed
From: boris.brezillon@free-electrons.com (Boris Brezillon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] drm: atmel-hlcdc: Atomic mode-setting conversion
Date: Mon, 9 Feb 2015 20:02:44 +0100	[thread overview]
Message-ID: <20150209200244.5b3481b8@bbrezillon> (raw)
In-Reply-To: <20150209182606.GA11712@gradator.net>

Hu Sylvain,

On Mon, 9 Feb 2015 19:26:06 +0100
Sylvain Rochet <sylvain.rochet@finsecur.com> wrote:

> Hello Boris,
> 
> On Fri, Feb 06, 2015 at 04:22:23PM +0100, Boris Brezillon wrote:
> > Convert the HLCDC driver to atomic mode-setting.
> > 
> > Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> > ---
> 
> I am getting the following trace with this patch applied, which seems 
> pretty straightforward to fix.

Yep, I thought DRM core was already checking the previous state before
calling the disable/enable callbacks, but it doesn't.

I'll add a field to store the previous state and check it before doing
any operation.

Thanks for pointing this out.

Regards,

Boris

> 
> Apart from that, it works perfectly, you can add my:
> 
> Tested-by: Sylvain Rochet <sylvain.rochet@finsecur.com>
> 
> 
> 
> ------------[ cut here ]------------
> WARNING: CPU: 0 PID: 9 at drivers/clk/clk.c:992 clk_disable+0x28/0x34()
> Modules linked in:
> CPU: 0 PID: 9 Comm: kworker/0:1 Not tainted 3.19.0-rc7-next-20150204+ #90
> Hardware name: Atmel SAMA5 (Device Tree)
> Workqueue: events output_poll_execute
> [<c0013284>] (unwind_backtrace) from [<c0010f90>] (show_stack+0x10/0x14)
> [<c0010f90>] (show_stack) from [<c001b0fc>] (warn_slowpath_common+0x84/0xb0)
> [<c001b0fc>] (warn_slowpath_common) from [<c001b1c4>] (warn_slowpath_null+0x1c/0x24)
> [<c001b1c4>] (warn_slowpath_null) from [<c0355418>] (clk_disable+0x28/0x34)
> [<c0355418>] (clk_disable) from [<c024b1c0>] (atmel_hlcdc_crtc_disable+0xe8/0x114)
> [<c024b1c0>] (atmel_hlcdc_crtc_disable) from [<c02209dc>] (__drm_helper_disable_unused_functions+0xa4/0xd8)
> [<c02209dc>] (__drm_helper_disable_unused_functions) from [<c0220a24>] (drm_helper_disable_unused_functions+0x14/0x20)
> [<c0220a24>] (drm_helper_disable_unused_functions) from [<c022d078>] (drm_fbdev_cma_init+0x78/0xfc)
> [<c022d078>] (drm_fbdev_cma_init) from [<c024b7a8>] (atmel_hlcdc_fb_output_poll_changed+0x30/0x40)
> [<c024b7a8>] (atmel_hlcdc_fb_output_poll_changed) from [<c0222800>] (output_poll_execute+0x148/0x188)
> [<c0222800>] (output_poll_execute) from [<c002bf94>] (process_one_work+0xfc/0x310)
> [<c002bf94>] (process_one_work) from [<c002caec>] (worker_thread+0x60/0x478)
> [<c002caec>] (worker_thread) from [<c00305b4>] (kthread+0xd4/0xec)
> [<c00305b4>] (kthread) from [<c000e4a0>] (ret_from_fork+0x14/0x34)
> ---[ end trace 9500ebf8d7076b60 ]---
> ------------[ cut here ]------------
> WARNING: CPU: 0 PID: 9 at drivers/clk/clk.c:898 clk_unprepare+0x24/0x2c()
> Modules linked in:
> CPU: 0 PID: 9 Comm: kworker/0:1 Tainted: G        W      3.19.0-rc7-next-20150204+ #90
> Hardware name: Atmel SAMA5 (Device Tree)
> Workqueue: events output_poll_execute
> [<c0013284>] (unwind_backtrace) from [<c0010f90>] (show_stack+0x10/0x14)
> [<c0010f90>] (show_stack) from [<c001b0fc>] (warn_slowpath_common+0x84/0xb0)
> [<c001b0fc>] (warn_slowpath_common) from [<c001b1c4>] (warn_slowpath_null+0x1c/0x24)
> [<c001b1c4>] (warn_slowpath_null) from [<c03553e8>] (clk_unprepare+0x24/0x2c)
> [<c03553e8>] (clk_unprepare) from [<c024b1c8>] (atmel_hlcdc_crtc_disable+0xf0/0x114)
> [<c024b1c8>] (atmel_hlcdc_crtc_disable) from [<c02209dc>] (__drm_helper_disable_unused_functions+0xa4/0xd8)
> [<c02209dc>] (__drm_helper_disable_unused_functions) from [<c0220a24>] (drm_helper_disable_unused_functions+0x14/0x20)
> [<c0220a24>] (drm_helper_disable_unused_functions) from [<c022d078>] (drm_fbdev_cma_init+0x78/0xfc)
> [<c022d078>] (drm_fbdev_cma_init) from [<c024b7a8>] (atmel_hlcdc_fb_output_poll_changed+0x30/0x40)
> [<c024b7a8>] (atmel_hlcdc_fb_output_poll_changed) from [<c0222800>] (output_poll_execute+0x148/0x188)
> [<c0222800>] (output_poll_execute) from [<c002bf94>] (process_one_work+0xfc/0x310)
> [<c002bf94>] (process_one_work) from [<c002caec>] (worker_thread+0x60/0x478)
> [<c002caec>] (worker_thread) from [<c00305b4>] (kthread+0xd4/0xec)
> [<c00305b4>] (kthread) from [<c000e4a0>] (ret_from_fork+0x14/0x34)
> ---[ end trace 9500ebf8d7076b61 ]--- 
> 
> 
> Sylvain



-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

WARNING: multiple messages have this Message-ID (diff)
From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Sylvain Rochet <sylvain.rochet@finsecur.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	Alexandre Belloni <alexandre.belloni@free-electrons.com>,
	Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2] drm: atmel-hlcdc: Atomic mode-setting conversion
Date: Mon, 9 Feb 2015 20:02:44 +0100	[thread overview]
Message-ID: <20150209200244.5b3481b8@bbrezillon> (raw)
In-Reply-To: <20150209182606.GA11712@gradator.net>

Hu Sylvain,

On Mon, 9 Feb 2015 19:26:06 +0100
Sylvain Rochet <sylvain.rochet@finsecur.com> wrote:

> Hello Boris,
> 
> On Fri, Feb 06, 2015 at 04:22:23PM +0100, Boris Brezillon wrote:
> > Convert the HLCDC driver to atomic mode-setting.
> > 
> > Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> > ---
> 
> I am getting the following trace with this patch applied, which seems 
> pretty straightforward to fix.

Yep, I thought DRM core was already checking the previous state before
calling the disable/enable callbacks, but it doesn't.

I'll add a field to store the previous state and check it before doing
any operation.

Thanks for pointing this out.

Regards,

Boris

> 
> Apart from that, it works perfectly, you can add my:
> 
> Tested-by: Sylvain Rochet <sylvain.rochet@finsecur.com>
> 
> 
> 
> ------------[ cut here ]------------
> WARNING: CPU: 0 PID: 9 at drivers/clk/clk.c:992 clk_disable+0x28/0x34()
> Modules linked in:
> CPU: 0 PID: 9 Comm: kworker/0:1 Not tainted 3.19.0-rc7-next-20150204+ #90
> Hardware name: Atmel SAMA5 (Device Tree)
> Workqueue: events output_poll_execute
> [<c0013284>] (unwind_backtrace) from [<c0010f90>] (show_stack+0x10/0x14)
> [<c0010f90>] (show_stack) from [<c001b0fc>] (warn_slowpath_common+0x84/0xb0)
> [<c001b0fc>] (warn_slowpath_common) from [<c001b1c4>] (warn_slowpath_null+0x1c/0x24)
> [<c001b1c4>] (warn_slowpath_null) from [<c0355418>] (clk_disable+0x28/0x34)
> [<c0355418>] (clk_disable) from [<c024b1c0>] (atmel_hlcdc_crtc_disable+0xe8/0x114)
> [<c024b1c0>] (atmel_hlcdc_crtc_disable) from [<c02209dc>] (__drm_helper_disable_unused_functions+0xa4/0xd8)
> [<c02209dc>] (__drm_helper_disable_unused_functions) from [<c0220a24>] (drm_helper_disable_unused_functions+0x14/0x20)
> [<c0220a24>] (drm_helper_disable_unused_functions) from [<c022d078>] (drm_fbdev_cma_init+0x78/0xfc)
> [<c022d078>] (drm_fbdev_cma_init) from [<c024b7a8>] (atmel_hlcdc_fb_output_poll_changed+0x30/0x40)
> [<c024b7a8>] (atmel_hlcdc_fb_output_poll_changed) from [<c0222800>] (output_poll_execute+0x148/0x188)
> [<c0222800>] (output_poll_execute) from [<c002bf94>] (process_one_work+0xfc/0x310)
> [<c002bf94>] (process_one_work) from [<c002caec>] (worker_thread+0x60/0x478)
> [<c002caec>] (worker_thread) from [<c00305b4>] (kthread+0xd4/0xec)
> [<c00305b4>] (kthread) from [<c000e4a0>] (ret_from_fork+0x14/0x34)
> ---[ end trace 9500ebf8d7076b60 ]---
> ------------[ cut here ]------------
> WARNING: CPU: 0 PID: 9 at drivers/clk/clk.c:898 clk_unprepare+0x24/0x2c()
> Modules linked in:
> CPU: 0 PID: 9 Comm: kworker/0:1 Tainted: G        W      3.19.0-rc7-next-20150204+ #90
> Hardware name: Atmel SAMA5 (Device Tree)
> Workqueue: events output_poll_execute
> [<c0013284>] (unwind_backtrace) from [<c0010f90>] (show_stack+0x10/0x14)
> [<c0010f90>] (show_stack) from [<c001b0fc>] (warn_slowpath_common+0x84/0xb0)
> [<c001b0fc>] (warn_slowpath_common) from [<c001b1c4>] (warn_slowpath_null+0x1c/0x24)
> [<c001b1c4>] (warn_slowpath_null) from [<c03553e8>] (clk_unprepare+0x24/0x2c)
> [<c03553e8>] (clk_unprepare) from [<c024b1c8>] (atmel_hlcdc_crtc_disable+0xf0/0x114)
> [<c024b1c8>] (atmel_hlcdc_crtc_disable) from [<c02209dc>] (__drm_helper_disable_unused_functions+0xa4/0xd8)
> [<c02209dc>] (__drm_helper_disable_unused_functions) from [<c0220a24>] (drm_helper_disable_unused_functions+0x14/0x20)
> [<c0220a24>] (drm_helper_disable_unused_functions) from [<c022d078>] (drm_fbdev_cma_init+0x78/0xfc)
> [<c022d078>] (drm_fbdev_cma_init) from [<c024b7a8>] (atmel_hlcdc_fb_output_poll_changed+0x30/0x40)
> [<c024b7a8>] (atmel_hlcdc_fb_output_poll_changed) from [<c0222800>] (output_poll_execute+0x148/0x188)
> [<c0222800>] (output_poll_execute) from [<c002bf94>] (process_one_work+0xfc/0x310)
> [<c002bf94>] (process_one_work) from [<c002caec>] (worker_thread+0x60/0x478)
> [<c002caec>] (worker_thread) from [<c00305b4>] (kthread+0xd4/0xec)
> [<c00305b4>] (kthread) from [<c000e4a0>] (ret_from_fork+0x14/0x34)
> ---[ end trace 9500ebf8d7076b61 ]--- 
> 
> 
> Sylvain



-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Sylvain Rochet <sylvain.rochet@finsecur.com>
Cc: David Airlie <airlied@linux.ie>,
	dri-devel@lists.freedesktop.org,
	Nicolas Ferre <nicolas.ferre@atmel.com>,
	Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
	Alexandre Belloni <alexandre.belloni@free-electrons.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Daniel Vetter <daniel@ffwll.ch>
Subject: Re: [PATCH v2] drm: atmel-hlcdc: Atomic mode-setting conversion
Date: Mon, 9 Feb 2015 20:02:44 +0100	[thread overview]
Message-ID: <20150209200244.5b3481b8@bbrezillon> (raw)
In-Reply-To: <20150209182606.GA11712@gradator.net>

Hu Sylvain,

On Mon, 9 Feb 2015 19:26:06 +0100
Sylvain Rochet <sylvain.rochet@finsecur.com> wrote:

> Hello Boris,
> 
> On Fri, Feb 06, 2015 at 04:22:23PM +0100, Boris Brezillon wrote:
> > Convert the HLCDC driver to atomic mode-setting.
> > 
> > Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> > ---
> 
> I am getting the following trace with this patch applied, which seems 
> pretty straightforward to fix.

Yep, I thought DRM core was already checking the previous state before
calling the disable/enable callbacks, but it doesn't.

I'll add a field to store the previous state and check it before doing
any operation.

Thanks for pointing this out.

Regards,

Boris

> 
> Apart from that, it works perfectly, you can add my:
> 
> Tested-by: Sylvain Rochet <sylvain.rochet@finsecur.com>
> 
> 
> 
> ------------[ cut here ]------------
> WARNING: CPU: 0 PID: 9 at drivers/clk/clk.c:992 clk_disable+0x28/0x34()
> Modules linked in:
> CPU: 0 PID: 9 Comm: kworker/0:1 Not tainted 3.19.0-rc7-next-20150204+ #90
> Hardware name: Atmel SAMA5 (Device Tree)
> Workqueue: events output_poll_execute
> [<c0013284>] (unwind_backtrace) from [<c0010f90>] (show_stack+0x10/0x14)
> [<c0010f90>] (show_stack) from [<c001b0fc>] (warn_slowpath_common+0x84/0xb0)
> [<c001b0fc>] (warn_slowpath_common) from [<c001b1c4>] (warn_slowpath_null+0x1c/0x24)
> [<c001b1c4>] (warn_slowpath_null) from [<c0355418>] (clk_disable+0x28/0x34)
> [<c0355418>] (clk_disable) from [<c024b1c0>] (atmel_hlcdc_crtc_disable+0xe8/0x114)
> [<c024b1c0>] (atmel_hlcdc_crtc_disable) from [<c02209dc>] (__drm_helper_disable_unused_functions+0xa4/0xd8)
> [<c02209dc>] (__drm_helper_disable_unused_functions) from [<c0220a24>] (drm_helper_disable_unused_functions+0x14/0x20)
> [<c0220a24>] (drm_helper_disable_unused_functions) from [<c022d078>] (drm_fbdev_cma_init+0x78/0xfc)
> [<c022d078>] (drm_fbdev_cma_init) from [<c024b7a8>] (atmel_hlcdc_fb_output_poll_changed+0x30/0x40)
> [<c024b7a8>] (atmel_hlcdc_fb_output_poll_changed) from [<c0222800>] (output_poll_execute+0x148/0x188)
> [<c0222800>] (output_poll_execute) from [<c002bf94>] (process_one_work+0xfc/0x310)
> [<c002bf94>] (process_one_work) from [<c002caec>] (worker_thread+0x60/0x478)
> [<c002caec>] (worker_thread) from [<c00305b4>] (kthread+0xd4/0xec)
> [<c00305b4>] (kthread) from [<c000e4a0>] (ret_from_fork+0x14/0x34)
> ---[ end trace 9500ebf8d7076b60 ]---
> ------------[ cut here ]------------
> WARNING: CPU: 0 PID: 9 at drivers/clk/clk.c:898 clk_unprepare+0x24/0x2c()
> Modules linked in:
> CPU: 0 PID: 9 Comm: kworker/0:1 Tainted: G        W      3.19.0-rc7-next-20150204+ #90
> Hardware name: Atmel SAMA5 (Device Tree)
> Workqueue: events output_poll_execute
> [<c0013284>] (unwind_backtrace) from [<c0010f90>] (show_stack+0x10/0x14)
> [<c0010f90>] (show_stack) from [<c001b0fc>] (warn_slowpath_common+0x84/0xb0)
> [<c001b0fc>] (warn_slowpath_common) from [<c001b1c4>] (warn_slowpath_null+0x1c/0x24)
> [<c001b1c4>] (warn_slowpath_null) from [<c03553e8>] (clk_unprepare+0x24/0x2c)
> [<c03553e8>] (clk_unprepare) from [<c024b1c8>] (atmel_hlcdc_crtc_disable+0xf0/0x114)
> [<c024b1c8>] (atmel_hlcdc_crtc_disable) from [<c02209dc>] (__drm_helper_disable_unused_functions+0xa4/0xd8)
> [<c02209dc>] (__drm_helper_disable_unused_functions) from [<c0220a24>] (drm_helper_disable_unused_functions+0x14/0x20)
> [<c0220a24>] (drm_helper_disable_unused_functions) from [<c022d078>] (drm_fbdev_cma_init+0x78/0xfc)
> [<c022d078>] (drm_fbdev_cma_init) from [<c024b7a8>] (atmel_hlcdc_fb_output_poll_changed+0x30/0x40)
> [<c024b7a8>] (atmel_hlcdc_fb_output_poll_changed) from [<c0222800>] (output_poll_execute+0x148/0x188)
> [<c0222800>] (output_poll_execute) from [<c002bf94>] (process_one_work+0xfc/0x310)
> [<c002bf94>] (process_one_work) from [<c002caec>] (worker_thread+0x60/0x478)
> [<c002caec>] (worker_thread) from [<c00305b4>] (kthread+0xd4/0xec)
> [<c00305b4>] (kthread) from [<c000e4a0>] (ret_from_fork+0x14/0x34)
> ---[ end trace 9500ebf8d7076b61 ]--- 
> 
> 
> Sylvain



-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

  reply	other threads:[~2015-02-09 19:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-06 15:22 [PATCH v2] drm: atmel-hlcdc: Atomic mode-setting conversion Boris Brezillon
2015-02-06 15:22 ` Boris Brezillon
2015-02-06 15:22 ` Boris Brezillon
2015-02-09 18:26 ` Sylvain Rochet
2015-02-09 18:26   ` Sylvain Rochet
2015-02-09 19:02   ` Boris Brezillon [this message]
2015-02-09 19:02     ` Boris Brezillon
2015-02-09 19:02     ` Boris Brezillon

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=20150209200244.5b3481b8@bbrezillon \
    --to=boris.brezillon@free-electrons.com \
    --cc=linux-arm-kernel@lists.infradead.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.