All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@intel.com
Subject: [Intel-gfx] [PATCH 2/3] drm/i915/fb: replace GEM_WARN_ON() with drm_WARN_ON()
Date: Thu, 14 Sep 2023 12:34:58 +0300	[thread overview]
Message-ID: <593285450602c259b6985972d68511190c754bf5.1694684044.git.jani.nikula@intel.com> (raw)
In-Reply-To: <cover.1694684044.git.jani.nikula@intel.com>

Avoid using GEM_WARN_ON() in display code.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/display/intel_fb_pin.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_fb_pin.c b/drivers/gpu/drm/i915/display/intel_fb_pin.c
index fffd568070d4..7b42aef37d2f 100644
--- a/drivers/gpu/drm/i915/display/intel_fb_pin.c
+++ b/drivers/gpu/drm/i915/display/intel_fb_pin.c
@@ -35,7 +35,8 @@ intel_pin_fb_obj_dpt(struct drm_framebuffer *fb,
 	 * We are not syncing against the binding (and potential migrations)
 	 * below, so this vm must never be async.
 	 */
-	GEM_WARN_ON(vm->bind_async_flags);
+	if (drm_WARN_ON(&dev_priv->drm, vm->bind_async_flags))
+		return ERR_PTR(-EINVAL);
 
 	if (WARN_ON(!i915_gem_object_is_framebuffer(obj)))
 		return ERR_PTR(-EINVAL);
-- 
2.39.2


  parent reply	other threads:[~2023-09-14  9:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-14  9:34 [Intel-gfx] [PATCH 0/3] drm/i915/display: remove last uses of GEM_BUG_ON/GEM_WARN_ON Jani Nikula
2023-09-14  9:34 ` [Intel-gfx] [PATCH 1/3] drm/i915/fbc: replace GEM_BUG_ON() to drm_WARN_ON() Jani Nikula
2023-09-14 12:40   ` Rodrigo Vivi
2023-09-15 15:28     ` Jani Nikula
2023-09-14  9:34 ` Jani Nikula [this message]
2023-09-14 12:41   ` [Intel-gfx] [PATCH 2/3] drm/i915/fb: replace GEM_WARN_ON() with drm_WARN_ON() Rodrigo Vivi
2023-09-14  9:34 ` [Intel-gfx] [PATCH 3/3] drm/i915/dpt: replace GEM_BUG_ON() " Jani Nikula
2023-09-14 12:41   ` Rodrigo Vivi
2023-09-14 16:48 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915/display: remove last uses of GEM_BUG_ON/GEM_WARN_ON Patchwork
2023-09-14 17:02 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-09-14 21:44 ` [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=593285450602c259b6985972d68511190c754bf5.1694684044.git.jani.nikula@intel.com \
    --to=jani.nikula@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.