linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "james qian wang (Arm Technology China)" <james.qian.wang@arm.com>
To: Mihail Atanassov <Mihail.Atanassov@arm.com>
Cc: "dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"Liviu Dudau" <Liviu.Dudau@arm.com>,
	Brian Starkey <Brian.Starkey@arm.com>,
	"David Airlie" <airlied@linux.ie>,
	Daniel Vetter <daniel@ffwll.ch>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	nd <nd@arm.com>
Subject: Re: [PATCH] drm/komeda: Add support for 'memory-region' DT node property
Date: Mon, 5 Aug 2019 08:40:38 +0000	[thread overview]
Message-ID: <20190805084032.GA25315@jamwan02-TSP300> (raw)
In-Reply-To: <20190802143951.4436-1-mihail.atanassov@arm.com>

Hi Mihail:

On Fri, Aug 02, 2019 at 10:40:19PM +0800, Mihail Atanassov wrote:
> The 'memory-region' property of the komeda display driver DT binding
> allows the use of a 'reserved-memory' node for buffer allocations. Add
> the requisite of_reserved_mem_device_{init,release} calls to actually
> make use of the memory if present.
> 
> Signed-off-by: Mihail Atanassov <mihail.atanassov@arm.com>
> ---
>  drivers/gpu/drm/arm/display/komeda/komeda_drv.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c
> index cfa5068d9d1e..2ec877ad260a 100644
> --- a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c
> +++ b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c
> @@ -6,6 +6,7 @@
>   */
>  #include <linux/module.h>
>  #include <linux/kernel.h>
> +#include <linux/of_reserved_mem.h>
>  #include <linux/platform_device.h>
>  #include <linux/component.h>
>  #include <drm/drm_of.h>
> @@ -32,6 +33,7 @@ static void komeda_unbind(struct device *dev)
>  		return;
>  
>  	komeda_kms_detach(mdrv->kms);
> +	of_reserved_mem_device_release(dev);
>  	komeda_dev_destroy(mdrv->mdev);
>  
>  	dev_set_drvdata(dev, NULL);
> @@ -53,6 +55,11 @@ static int komeda_bind(struct device *dev)
>  		goto free_mdrv;
>  	}
>  
> +	/* Get the optional framebuffer memory resource */
> +	err = of_reserved_mem_device_init(dev);
> +	if (err && err != -ENODEV)
> +		goto destroy_mdev;
> +

Hi Mihail:

Thanks for your patch.

Since we have a dedicated function for DT parsing: "komeda_parse_dt",
seems we'd move this into it as well.

thank you
James

>  	mdrv->kms = komeda_kms_attach(mdrv->mdev);
>  	if (IS_ERR(mdrv->kms)) {
>  		err = PTR_ERR(mdrv->kms);
> -- 
> 2.22.0

  reply	other threads:[~2019-08-05  8:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-02 14:40 [PATCH] drm/komeda: Add support for 'memory-region' DT node property Mihail Atanassov
2019-08-05  8:40 ` james qian wang (Arm Technology China) [this message]
2019-08-05  9:52 ` [PATCH v2] " Mihail Atanassov
2019-08-05  9:56 ` [PATCH v2.1] " Mihail Atanassov
2019-08-05 10:13   ` james qian wang (Arm Technology China)
2019-08-20 10:31     ` Ayan Halder

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=20190805084032.GA25315@jamwan02-TSP300 \
    --to=james.qian.wang@arm.com \
    --cc=Brian.Starkey@arm.com \
    --cc=Liviu.Dudau@arm.com \
    --cc=Mihail.Atanassov@arm.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nd@arm.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).