lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190607181856.GK21222@phenom.ffwll.local>
Date:   Fri, 7 Jun 2019 20:18:56 +0200
From:   Daniel Vetter <daniel@...ll.ch>
To:     Ayan Halder <Ayan.Halder@....com>
Cc:     "james qian wang (Arm Technology China)" <james.qian.wang@....com>,
        Liviu Dudau <Liviu.Dudau@....com>,
        Brian Starkey <Brian.Starkey@....com>,
        "daniel@...ll.ch" <daniel@...ll.ch>,
        "airlied@...ux.ie" <airlied@...ux.ie>,
        "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        nd <nd@....com>
Subject: Re: [PATCH] drm/komeda: Enable/Disable vblank interrupts

On Fri, Jun 07, 2019 at 03:03:39PM +0000, Ayan Halder wrote:
> One needs to set "(struct drm_device *)->irq_enabled = true" to signal drm core
> to enable vblank interrupts after the hardware has been initialized.
> Correspondingly, one needs to disable vblank interrupts by setting
> "(struct drm_device *)->irq_enabled = false" at the beginning of the
> de-initializing routine.

Only if you don't use the drm_irq_install helper. Quoting the kerneldoc in
full:

	/**
	 * @irq_enabled:
	 *
	 * Indicates that interrupt handling is enabled, specifically vblank
	 * handling. Drivers which don't use drm_irq_install() need to set this
	 * to true manually.
	 */
	bool irq_enabled;

Not entirely sure where you've found your quote, but it's not complete.

Cheers, Daniel

> 
> Signed-off-by: Ayan Kumar halder <ayan.halder@....com>
> ---
>  drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
> index 7b5cde14e3ba..b4fd8ee0d05f 100644
> --- a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
> +++ b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
> @@ -204,6 +204,8 @@ struct komeda_kms_dev *komeda_kms_attach(struct komeda_dev *mdev)
>  	if (err)
>  		goto uninstall_irq;
>  
> +	drm->irq_enabled = true;
> +
>  	err = drm_dev_register(drm, 0);
>  	if (err)
>  		goto uninstall_irq;
> @@ -211,6 +213,7 @@ struct komeda_kms_dev *komeda_kms_attach(struct komeda_dev *mdev)
>  	return kms;
>  
>  uninstall_irq:
> +	drm->irq_enabled = false;
>  	drm_irq_uninstall(drm);
>  cleanup_mode_config:
>  	drm_mode_config_cleanup(drm);
> @@ -225,6 +228,7 @@ void komeda_kms_detach(struct komeda_kms_dev *kms)
>  	struct drm_device *drm = &kms->base;
>  	struct komeda_dev *mdev = drm->dev_private;
>  
> +	drm->irq_enabled = false;
>  	mdev->funcs->disable_irq(mdev);
>  	drm_dev_unregister(drm);
>  	drm_irq_uninstall(drm);
> -- 
> 2.21.0
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ