From: Bommu Krishnaiah <krishnaiah.bommu@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Bommu Krishnaiah <krishnaiah.bommu@intel.com>,
Nayana Venkata Ramana <Venkata.Ramana.Nayana@intel.com>
Subject: [Intel-gfx] [PATCH 1/1] drm: add error message for ENOSPC
Date: Thu, 27 May 2021 15:15:35 +0530 [thread overview]
Message-ID: <20210527094535.31728-2-krishnaiah.bommu@intel.com> (raw)
In-Reply-To: <20210527094535.31728-1-krishnaiah.bommu@intel.com>
add error message for ENOSPC, this will help developer to understand issue.
Signed-off-by: Bommu Krishnaiah <krishnaiah.bommu@intel.com>
Cc: Yang Shi <yang.a.shi@intel.com>
Cc: Nayana Venkata Ramana <Venkata.Ramana.Nayana@intel.com>
---
drivers/gpu/drm/drm_mm.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c
index a4a04d246135..696b59673a84 100644
--- a/drivers/gpu/drm/drm_mm.c
+++ b/drivers/gpu/drm/drm_mm.c
@@ -458,13 +458,18 @@ int drm_mm_reserve_node(struct drm_mm *mm, struct drm_mm_node *node)
u64 end;
end = node->start + node->size;
- if (unlikely(end <= node->start))
+ if (unlikely(end <= node->start)) {
+ DRM_DEBUG("ENOSPC with incorrect node->size %llx\n", node->size);
return -ENOSPC;
+ }
/* Find the relevant hole to add our node to */
hole = find_hole_addr(mm, node->start, 0);
- if (!hole)
+ if (!hole) {
+ DRM_DEBUG("ENOSPC when not find hole with node->start %llx\n",
+ node->start);
return -ENOSPC;
+ }
adj_start = hole_start = __drm_mm_hole_node_start(hole);
adj_end = hole_end = hole_start + hole->hole_size;
@@ -472,8 +477,11 @@ int drm_mm_reserve_node(struct drm_mm *mm, struct drm_mm_node *node)
if (mm->color_adjust)
mm->color_adjust(hole, node->color, &adj_start, &adj_end);
- if (adj_start > node->start || adj_end < end)
+ if (adj_start > node->start || adj_end < end) {
+ DRM_DEBUG("ENOSPC after adjust adj_start:%llx adj_end:%llx node->start:%llx end:%llx\n",
+ adj_start, adj_end, node->start, end);
return -ENOSPC;
+ }
node->mm = mm;
--
2.25.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2021-05-27 9:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-27 9:45 [Intel-gfx] [PATCH 0/1] drm: add error message for ENOSPC Bommu Krishnaiah
2021-05-27 9:45 ` Bommu Krishnaiah [this message]
2021-05-27 12:09 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2021-05-28 6:05 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
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=20210527094535.31728-2-krishnaiah.bommu@intel.com \
--to=krishnaiah.bommu@intel.com \
--cc=Venkata.Ramana.Nayana@intel.com \
--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