From: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, dri-devel@lists.freedesktop.org
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm: Allow range of 0 for drm_mm_insert_node_in_range()
Date: Wed, 26 Jun 2019 10:32:47 -0700 [thread overview]
Message-ID: <698093fd-063d-2de5-9608-47bec6da5b1e@intel.com> (raw)
In-Reply-To: <20190626094330.3556-1-chris@chris-wilson.co.uk>
On 6/26/19 2:43 AM, Chris Wilson wrote:
> We gracefully handle the caller specifying a zero range, so don't force
> them to special case that condition if it naturally falls out of their
> setup. What we don't check is if the end < start, so keep that as an
> assert for an illegal call.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Daniele
> drivers/gpu/drm/drm_mm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c
> index 9a59865ce574..4581c5387372 100644
> --- a/drivers/gpu/drm/drm_mm.c
> +++ b/drivers/gpu/drm/drm_mm.c
> @@ -472,7 +472,7 @@ int drm_mm_insert_node_in_range(struct drm_mm * const mm,
> u64 remainder_mask;
> bool once;
>
> - DRM_MM_BUG_ON(range_start >= range_end);
> + DRM_MM_BUG_ON(range_start > range_end);
>
> if (unlikely(size == 0 || range_end - range_start < size))
> return -ENOSPC;
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-06-26 17:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-26 9:43 [PATCH] drm: Allow range of 0 for drm_mm_insert_node_in_range() Chris Wilson
2019-06-26 17:32 ` Daniele Ceraolo Spurio [this message]
2019-06-26 21:28 ` Daniel Vetter
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=698093fd-063d-2de5-9608-47bec6da5b1e@intel.com \
--to=daniele.ceraolospurio@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
/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