From: Andrzej Hajda <andrzej.hajda@intel.com>
To: Nirmoy Das <nirmoy.das@intel.com>, intel-gfx@lists.freedesktop.org
Cc: Jani Nikula <jani.nikula@intel.com>,
dri-devel@lists.freedesktop.org,
Matthew Auld <matthew.auld@intel.com>
Subject: Re: [Intel-gfx] [PATCH 2/5] drm/i915/display: Set I915_BO_ALLOC_USER for fb
Date: Wed, 5 Apr 2023 16:11:17 +0200 [thread overview]
Message-ID: <0fd2b66e-958c-32d4-2491-7d3e323e6045@intel.com> (raw)
In-Reply-To: <20230404143100.10452-2-nirmoy.das@intel.com>
On 04.04.2023 16:30, Nirmoy Das wrote:
> Framebuffer is exposed to userspace so make sure we set
> proper flags for it. Set I915_BO_PREALLOC for prealloced
> fb so that ttm won't clear existing data.
>
> Cc: Matthew Auld <matthew.auld@intel.com>
> Cc: Andi Shyti <andi.shyti@linux.intel.com>
> Cc: Andrzej Hajda <andrzej.hajda@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Cc: Imre Deak <imre.deak@intel.com>
> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
Regards
Andrzej
> ---
> drivers/gpu/drm/i915/display/intel_fbdev.c | 3 ++-
> drivers/gpu/drm/i915/display/intel_plane_initial.c | 4 +++-
> 2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_fbdev.c b/drivers/gpu/drm/i915/display/intel_fbdev.c
> index 673bcdfb7ff6..f7d48d00ae4b 100644
> --- a/drivers/gpu/drm/i915/display/intel_fbdev.c
> +++ b/drivers/gpu/drm/i915/display/intel_fbdev.c
> @@ -163,7 +163,8 @@ static int intelfb_alloc(struct drm_fb_helper *helper,
> obj = ERR_PTR(-ENODEV);
> if (HAS_LMEM(dev_priv)) {
> obj = i915_gem_object_create_lmem(dev_priv, size,
> - I915_BO_ALLOC_CONTIGUOUS);
> + I915_BO_ALLOC_CONTIGUOUS |
> + I915_BO_ALLOC_USER);
> } else {
> /*
> * If the FB is too big, just don't use it since fbdev is not very
> diff --git a/drivers/gpu/drm/i915/display/intel_plane_initial.c b/drivers/gpu/drm/i915/display/intel_plane_initial.c
> index bb6ea7de5c61..736072a8b2b0 100644
> --- a/drivers/gpu/drm/i915/display/intel_plane_initial.c
> +++ b/drivers/gpu/drm/i915/display/intel_plane_initial.c
> @@ -110,7 +110,9 @@ initial_plane_vma(struct drm_i915_private *i915,
> size * 2 > i915->dsm.usable_size)
> return NULL;
>
> - obj = i915_gem_object_create_region_at(mem, phys_base, size, 0);
> + obj = i915_gem_object_create_region_at(mem, phys_base, size,
> + I915_BO_ALLOC_USER |
> + I915_BO_PREALLOC);
> if (IS_ERR(obj))
> return NULL;
>
next prev parent reply other threads:[~2023-04-05 14:11 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-04 14:30 [Intel-gfx] [PATCH 1/5] drm/i915/ttm: Add I915_BO_PREALLOC Nirmoy Das
2023-04-04 14:30 ` [Intel-gfx] [PATCH 2/5] drm/i915/display: Set I915_BO_ALLOC_USER for fb Nirmoy Das
2023-04-04 16:36 ` Andi Shyti
2023-04-05 14:11 ` Andrzej Hajda [this message]
2023-04-04 14:30 ` [Intel-gfx] [PATCH 3/5] drm/i915: Add a function to mmap framebuffer obj Nirmoy Das
2023-04-04 16:57 ` Andi Shyti
2023-04-04 17:59 ` Das, Nirmoy
2023-04-04 14:30 ` [Intel-gfx] [PATCH 4/5] drm/i915/display: Add helper func to get intel_fbdev from drm_fb_helper Nirmoy Das
2023-04-05 14:13 ` Andrzej Hajda
2023-04-05 14:14 ` Andrzej Hajda
2023-04-04 14:31 ` [Intel-gfx] [PATCH 5/5] drm/i915/display: Implement fb_mmap callback function Nirmoy Das
2023-04-04 15:30 ` [Intel-gfx] [PATCH 1/5] drm/i915/ttm: Add I915_BO_PREALLOC Andrzej Hajda
2023-04-05 10:42 ` Das, Nirmoy
2023-04-04 15:47 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/5] " Patchwork
2023-04-04 15:47 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-04-04 16:00 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-04-04 16:23 ` [Intel-gfx] [PATCH 1/5] " Andi Shyti
2023-04-05 10:52 ` Das, Nirmoy
2023-04-05 11:53 ` Andi Shyti
2023-04-05 12:36 ` Das, Nirmoy
2023-04-05 13:52 ` Andi Shyti
2023-04-05 0:30 ` [Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [1/5] " 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=0fd2b66e-958c-32d4-2491-7d3e323e6045@intel.com \
--to=andrzej.hajda@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=matthew.auld@intel.com \
--cc=nirmoy.das@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