From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Matthew Auld Date: Wed, 28 Jul 2021 11:30:33 +0100 Message-Id: <20210728103041.1669985-3-matthew.auld@intel.com> In-Reply-To: <20210728103041.1669985-1-matthew.auld@intel.com> References: <20210728103041.1669985-1-matthew.auld@intel.com> MIME-Version: 1.0 Subject: [igt-dev] [PATCH i-g-t v2 03/11] lib/i915/gem_mman: add fixed mode to mmap__cpu_coherent List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" To: igt-dev@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org List-ID: On discrete we only support the new fixed mode. Signed-off-by: Matthew Auld Cc: Maarten Lankhorst Cc: Ashutosh Dixit Cc: Daniel Vetter Cc: Ramalingam C --- lib/i915/gem_mman.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/i915/gem_mman.c b/lib/i915/gem_mman.c index 222e8896..337d28fb 100644 --- a/lib/i915/gem_mman.c +++ b/lib/i915/gem_mman.c @@ -580,6 +580,8 @@ void *gem_mmap__cpu_coherent(int fd, uint32_t handle, uint64_t offset, igt_assert(offset == 0); ptr = __gem_mmap__cpu_coherent(fd, handle, offset, size, prot); + if (!ptr) + ptr = __gem_mmap_offset__fixed(fd, handle, offset, size, prot); igt_assert(ptr); return ptr; -- 2.26.3 _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev