From: Andrzej Hajda <andrzej.hajda@intel.com>
To: "Jani Nikula" <jani.nikula@linux.intel.com>,
"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
"Arun R Murthy" <arun.r.murthy@intel.com>
Cc: Andrzej Hajda <andrzej.hajda@intel.com>,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: [Intel-gfx] [PATCH v6 4/4] drm/i915/fbdev: do not create fbdev if HPD is suspended
Date: Fri, 22 Jul 2022 14:51:43 +0200 [thread overview]
Message-ID: <20220722125143.1604709-5-andrzej.hajda@intel.com> (raw)
In-Reply-To: <20220722125143.1604709-1-andrzej.hajda@intel.com>
In case of deferred FB setup core can try to create new
framebuffer. Disallow it if hpd_suspended flag is set.
Signed-off-by: Andrzej Hajda <andrzej.hajda@intel.com>
---
drivers/gpu/drm/i915/display/intel_fbdev.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/gpu/drm/i915/display/intel_fbdev.c b/drivers/gpu/drm/i915/display/intel_fbdev.c
index 94ddc0f34fde64..fb8dbd532b9e05 100644
--- a/drivers/gpu/drm/i915/display/intel_fbdev.c
+++ b/drivers/gpu/drm/i915/display/intel_fbdev.c
@@ -210,6 +210,12 @@ static int intelfb_create(struct drm_fb_helper *helper,
struct drm_i915_gem_object *obj;
int ret;
+ mutex_lock(&ifbdev->hpd_lock);
+ ret = ifbdev->hpd_suspended ? -EAGAIN : 0;
+ mutex_unlock(&ifbdev->hpd_lock);
+ if (ret)
+ return ret;
+
if (intel_fb &&
(sizes->fb_width > intel_fb->base.width ||
sizes->fb_height > intel_fb->base.height)) {
--
2.25.1
next prev parent reply other threads:[~2022-07-22 12:52 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-22 12:51 [Intel-gfx] [PATCH v6 0/4] drm/i915/display: stop HPD workers before display driver unregister Andrzej Hajda
2022-07-22 12:51 ` [Intel-gfx] [PATCH v6 1/4] drm/i915/hpd: postpone HPD cancel work after last user suspension Andrzej Hajda
2022-08-22 17:08 ` Imre Deak
2022-08-23 7:41 ` Jani Nikula
2022-08-23 9:10 ` Imre Deak
2022-07-22 12:51 ` [Intel-gfx] [PATCH v6 2/4] drm/i915/fbdev: suspend HPD before fbdev unregistration Andrzej Hajda
2022-08-22 17:10 ` Imre Deak
2022-07-22 12:51 ` [Intel-gfx] [PATCH v6 3/4] drm/i915/display: add hotplug.suspended flag Andrzej Hajda
2022-08-22 17:27 ` Imre Deak
2022-08-23 21:48 ` Andrzej Hajda
2022-08-24 11:22 ` Imre Deak
2022-08-25 11:24 ` Andrzej Hajda
2022-08-25 14:57 ` Imre Deak
2022-07-22 12:51 ` Andrzej Hajda [this message]
2022-07-26 6:50 ` [Intel-gfx] [PATCH v6 4/4] drm/i915/fbdev: do not create fbdev if HPD is suspended Murthy, Arun R
2022-08-22 17:28 ` Imre Deak
2022-07-22 13:08 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915/display: stop HPD workers before display driver unregister (rev12) Patchwork
2022-07-22 13:32 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-07-22 15:23 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2022-07-22 16:56 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915/display: stop HPD workers before display driver unregister (rev13) Patchwork
2022-07-22 17:19 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-07-22 20:55 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2022-07-24 14:46 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915/display: stop HPD workers before display driver unregister (rev14) Patchwork
2022-07-24 15:09 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-07-24 16:55 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2022-08-02 12:24 ` [Intel-gfx] [PATCH v6 0/4] drm/i915/display: stop HPD workers before display driver unregister Gwan-gyeong Mun
2022-08-11 8:33 ` Andrzej Hajda
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=20220722125143.1604709-5-andrzej.hajda@intel.com \
--to=andrzej.hajda@intel.com \
--cc=arun.r.murthy@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=ville.syrjala@linux.intel.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