dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Szyprowski <m.szyprowski@samsung.com>
To: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Cc: "s.nawrocki@samsung.com" <s.nawrocki@samsung.com>,
	"Liviu.Dudau@arm.com" <Liviu.Dudau@arm.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"linux-snps-arc@lists.infradead.org"
	<linux-snps-arc@lists.infradead.org>
Subject: Re: of_reserved_mem_device_init_by_idx() returns -EINVAL if "memory-region" is missing
Date: Fri, 17 Jun 2016 07:28:48 +0200	[thread overview]
Message-ID: <b26dcbc6-758a-a08f-b258-945548aab3dc@samsung.com> (raw)
In-Reply-To: <1466095574.4442.53.camel@synopsys.com>

Hi Alexey


On 2016-06-16 18:47, Alexey Brodkin wrote:
> Hi Marek,
>
> We used to use of_reserved_mem_device_init() in such a context in GPU drivers:
> -------------------->8-------------------
> 	/* Get the optional framebuffer memory resource */
> 	ret = of_reserved_mem_device_init(drm->dev);
> 	if (ret && ret != -ENODEV)
> 		return ret;
> -------------------->8-------------------
>
> The point is we may have a dedicated reserved memory area or may not have (depends on a particular .dts).
> Our expectation is if reserved memory area is missing then of_reserved_mem_device_init()
> just returns -ENODEV and it used to work like this.
>
> Now with your commit 59ce4039727e "of: reserved_mem: add support for using more than one region for given device"
> behavior is different. of_reserved_mem_device_init_by_idx() has this:
> -------------------->8-------------------
> 	target = of_parse_phandle(np, "memory-region", idx);
> 	if (!target)
> 		return -EINVAL;
> -------------------->8-------------------
>
> So I'm wondering which part should be fixed:
>   1) of_reserved_mem itself or
>   2) users of of_reserved_mem_device_init()
>
> Any thoughts?

This was my fault. The fix is already queued to linux-next, see commit
9f5a802b1d51dc80a27d828a5f7dcc8ec4a72f03 ("[media] of: reserved_mem: restore
old behavior when no region is defined"),
http://www.spinics.net/lists/linux-media/msg100972.html

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2016-06-17  5:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-16 16:47 of_reserved_mem_device_init_by_idx() returns -EINVAL if "memory-region" is missing Alexey Brodkin
2016-06-17  5:28 ` Marek Szyprowski [this message]
2016-06-17  6:47   ` Alexey Brodkin

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=b26dcbc6-758a-a08f-b258-945548aab3dc@samsung.com \
    --to=m.szyprowski@samsung.com \
    --cc=Alexey.Brodkin@synopsys.com \
    --cc=Liviu.Dudau@arm.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-snps-arc@lists.infradead.org \
    --cc=s.nawrocki@samsung.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