devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Jyri Sarha <jsarha@ti.com>,
	dri-devel@lists.freedesktop.org, Rob Clark <robdclark@gmail.com>
Cc: airlied@linux.ie, linux-omap@vger.kernel.org,
	devicetree@vger.kernel.org, bcousson@baylibre.com,
	tony@atomide.com, detheridge@ti.com, moinejf@free.fr,
	linux@arm.linux.org.uk
Subject: Re: [PATCH RFC 1/6] drm/tilcdc: Fix module unloading
Date: Mon, 2 Mar 2015 15:10:01 +0200	[thread overview]
Message-ID: <54F46129.1000703@ti.com> (raw)
In-Reply-To: <9ef213208e27b6f45b74a77b1c7902fa3910bf46.1424961754.git.jsarha@ti.com>

[-- Attachment #1: Type: text/plain, Size: 1544 bytes --]

On 26/02/15 16:55, Jyri Sarha wrote:
> Force crtc dpms off before destroying the crtc instead of just
> checking the dpms state. This fixes warning message and frozen picture
> after tilcdc module unloading.
> 
> Signed-off-by: Jyri Sarha <jsarha@ti.com>
> ---
>  drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
> index c735884..c2d5980 100644
> --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
> +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
> @@ -135,11 +135,12 @@ static void stop(struct drm_crtc *crtc)
>  	tilcdc_clear(dev, LCDC_RASTER_CTRL_REG, LCDC_RASTER_ENABLE);
>  }
>  
> +static void tilcdc_crtc_dpms(struct drm_crtc *crtc, int mode);
>  static void tilcdc_crtc_destroy(struct drm_crtc *crtc)
>  {
>  	struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc);
>  
> -	WARN_ON(tilcdc_crtc->dpms == DRM_MODE_DPMS_ON);
> +	tilcdc_crtc_dpms(crtc, DRM_MODE_DPMS_OFF);
>  
>  	drm_crtc_cleanup(crtc);
>  	drm_flip_work_cleanup(&tilcdc_crtc->unref_work);
> 

Looks fine to me, but makes me wonder what is the proper way to handle
this. I would presume that every DRM driver needs to shut down the
display HW when it's being unloaded.

And the current WARN_ON suggests that something is supposed to turn the
crtc off before it is destroyed. So either the tilcdc module unload has
never worked, or something has changed in the drm framework (or maybe
tilcdc).

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2015-03-02 13:10 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-26 14:55 [PATCH RFC 0/6] Use DRM component API in tilcdc to connect to tda998x Jyri Sarha
2015-02-26 14:55 ` [PATCH RFC 1/6] drm/tilcdc: Fix module unloading Jyri Sarha
2015-03-02 13:10   ` Tomi Valkeinen [this message]
2015-02-26 14:55 ` [PATCH RFC 2/6] drm/tilcdc: Remove tilcdc slave support for tda998x driver Jyri Sarha
2015-02-26 14:55 ` [PATCH RFC 3/6] drm/tilcdc: Add support for external compontised DRM encoder Jyri Sarha
2015-03-02 12:44   ` Tomi Valkeinen
2015-03-02 16:01   ` Russell King - ARM Linux
2015-03-06  8:33     ` Jyri Sarha
2015-03-06  9:58       ` Russell King - ARM Linux
2015-03-06 10:21         ` Jyri Sarha
2015-03-06 10:35           ` Russell King - ARM Linux
2015-02-26 14:55 ` [PATCH RFC 4/6] drm/tilcdc: Add DRM_TILCDC_INIT for "ti,tilcdc,slave" binding support Jyri Sarha
     [not found]   ` <6cf3243f87975ef349dead7af136870fa406ad6b.1424961754.git.jsarha-l0cyMroinI0@public.gmane.org>
2015-03-02 13:04     ` Tomi Valkeinen
     [not found] ` <cover.1424961754.git.jsarha-l0cyMroinI0@public.gmane.org>
2015-02-26 14:55   ` [PATCH RFC 5/6] drm/tilcdc: Force building of DRM_TILCDC_INIT Jyri Sarha
2015-03-02 12:59     ` Tomi Valkeinen
2015-02-26 14:55 ` [PATCH RFC 6/6] ARM: dts: am335x-boneblack: Use new binding for HDMI Jyri Sarha
2015-03-02 12:28   ` Tomi Valkeinen
2015-03-02 16:06     ` Russell King - ARM Linux
2015-03-02 17:08       ` Tomi Valkeinen
2015-03-02 17:42         ` Russell King - ARM Linux
2015-03-03  8:35           ` Tomi Valkeinen
2015-03-02 11:34 ` [PATCH RFC 0/6] Use DRM component API in tilcdc to connect to tda998x Tomi Valkeinen

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=54F46129.1000703@ti.com \
    --to=tomi.valkeinen@ti.com \
    --cc=airlied@linux.ie \
    --cc=bcousson@baylibre.com \
    --cc=detheridge@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jsarha@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=moinejf@free.fr \
    --cc=robdclark@gmail.com \
    --cc=tony@atomide.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;
as well as URLs for NNTP newsgroup(s).