[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190809063041.GA31698@jamwan02-TSP300>
Date: Fri, 9 Aug 2019 06:30:48 +0000
From: "james qian wang (Arm Technology China)" <james.qian.wang@....com>
To: "Lowry Li (Arm Technology China)" <Lowry.Li@....com>
CC: Liviu Dudau <Liviu.Dudau@....com>,
"maarten.lankhorst@...ux.intel.com"
<maarten.lankhorst@...ux.intel.com>,
"seanpaul@...omium.org" <seanpaul@...omium.org>,
"airlied@...ux.ie" <airlied@...ux.ie>,
Brian Starkey <Brian.Starkey@....com>,
Ayan Halder <Ayan.Halder@....com>,
"Jonathan Chai (Arm Technology China)" <Jonathan.Chai@....com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
"Julien Yin (Arm Technology China)" <Julien.Yin@....com>,
nd <nd@....com>
Subject: Re: drm/komeda: Initialize and enable output polling on Komeda
On Fri, Aug 02, 2019 at 08:07:52AM +0000, Lowry Li (Arm Technology China) wrote:
> From: "Lowry Li (Arm Technology China)" <Lowry.Li@....com>
>
> Initialize and enable output polling on Komeda.
>
> Changes since v1:
> 1. Enable the polling before registering the driver;
> 2. Disable the polling after unregistering the driver.
>
> Changes since v2:
> 1. If driver register failed, disable the polling.
>
> Signed-off-by: Lowry Li (Arm Technology China) <lowry.li@....com>
> ---
> drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
> index 419a8b0..d50e75f 100644
> --- a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
> +++ b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
> @@ -15,6 +15,7 @@
> #include <drm/drm_gem_framebuffer_helper.h>
> #include <drm/drm_irq.h>
> #include <drm/drm_vblank.h>
> +#include <drm/drm_probe_helper.h>
>
> #include "komeda_dev.h"
> #include "komeda_framebuffer.h"
> @@ -315,6 +316,8 @@ struct komeda_kms_dev *komeda_kms_attach(struct komeda_dev *mdev)
>
> drm->irq_enabled = true;
>
> + drm_kms_helper_poll_init(drm);
> +
> err = drm_dev_register(drm, 0);
> if (err)
> goto cleanup_mode_config;
> @@ -322,6 +325,7 @@ struct komeda_kms_dev *komeda_kms_attach(struct komeda_dev *mdev)
> return kms;
>
> cleanup_mode_config:
> + drm_kms_helper_poll_fini(drm);
> drm->irq_enabled = false;
> drm_mode_config_cleanup(drm);
> komeda_kms_cleanup_private_objs(kms);
> @@ -338,6 +342,7 @@ void komeda_kms_detach(struct komeda_kms_dev *kms)
> drm->irq_enabled = false;
> mdev->funcs->disable_irq(mdev);
> drm_dev_unregister(drm);
> + drm_kms_helper_poll_fini(drm);
> component_unbind_all(mdev->dev, drm);
> komeda_kms_cleanup_private_objs(kms);
> drm_mode_config_cleanup(drm);
Looks good to me.
Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@....com>
Powered by blists - more mailing lists