Re: [PATCH 6/7] drm/i915/gem: Correct the locking and pin pattern for dma-buf (v6)

2021-07-20 Thread Matthew Auld
On Fri, 16 Jul 2021 at 15:14, Jason Ekstrand wrote: > > From: Thomas Hellström > > If our exported dma-bufs are imported by another instance of our driver, > that instance will typically have the imported dma-bufs locked during > dma_buf_map_attachment(). But the exporter also locks the same rese

Re: [PATCH 3/7] drm/i915/gem: Unify user object creation

2021-07-20 Thread Matthew Auld
On Thu, 15 Jul 2021 at 23:39, Jason Ekstrand wrote: > > Instead of hand-rolling the same three calls in each function, pull them > into an i915_gem_object_create_user helper. Apart from re-ordering of > the placements array ENOMEM check, the only functional change here > should be that i915_gem_d

Re: [Intel-gfx] [PATCH 7/7] drm/i915/gem: Migrate to system at dma-buf attach time (v6)

2021-07-20 Thread Matthew Auld
On Fri, 16 Jul 2021 at 15:14, Jason Ekstrand wrote: > > From: Thomas Hellström > > Until we support p2p dma or as a complement to that, migrate data > to system memory at dma-buf attach time if possible. > > v2: > - Rebase on dynamic exporter. Update the igt_dmabuf_import_same_driver > selftest

Re: [PATCH 3/7] drm/i915/gem: Unify user object creation

2021-07-21 Thread Matthew Auld
On Tue, 20 Jul 2021 at 23:04, Jason Ekstrand wrote: > > On Tue, Jul 20, 2021 at 4:35 AM Matthew Auld > wrote: > > > > On Thu, 15 Jul 2021 at 23:39, Jason Ekstrand wrote: > > > > > > Instead of hand-rolling the same three calls in

Re: [PATCH 2/7] drm/i915/gem: Refactor placement setup for i915_gem_object_create* (v2)

2021-07-21 Thread Matthew Auld
On Tue, 20 Jul 2021 at 23:07, Jason Ekstrand wrote: > > On Mon, Jul 19, 2021 at 3:18 AM Matthew Auld > wrote: > > > > On Fri, 16 Jul 2021 at 15:14, Jason Ekstrand wrote: > > > > > > Since we don't allow changing the set of regions after creation, we

[PATCH v2 1/2] drm/i915: document caching related bits

2021-07-21 Thread Matthew Auld
Try to document the object caching related bits, like cache_coherent and cache_dirty. v2(Ville): - As pointed out by Ville, fix the completely incorrect assumptions about the "partial" coherency on shared LLC platforms. Suggested-by: Daniel Vetter Signed-off-by: Matthew Auld

[PATCH v2 2/2] drm/i915/ehl: unconditionally flush the pages on acquire

2021-07-21 Thread Matthew Auld
g memory before handing it to userspace, we need to prevent this. v2: this time actually set cache_dirty in put_pages() v3: move to get_pages() which looks simpler BSpec: 34007 References: 046091758b50 ("Revert "drm/i915/ehl: Update MOCS table for EHL"") Signed-off-by: Matthew Auld

Re: [PATCH 6/6] drm/i915: Make the kmem slab for i915_buddy_block a global

2021-07-21 Thread Matthew Auld
so we can properly respond to low-memory situations. Signed-off-by: Jason Ekstrand Fixes: 88be9a0a06b7 ("drm/i915/ttm: add ttm_buddy_man") Cc: Matthew Auld Cc: Christian König It was intentionally ripped it out with the idea that we would be moving the buddy stuff into ttm, and so p

Re: [PATCH 3/7] drm/i915/gem: Unify user object creation

2021-07-21 Thread Matthew Auld
On Wed, 21 Jul 2021 at 16:47, Jason Ekstrand wrote: > > On Wed, Jul 21, 2021 at 3:25 AM Matthew Auld > wrote: > > > > On Tue, 20 Jul 2021 at 23:04, Jason Ekstrand wrote: > > > > > > On Tue, Jul 20, 2021 at 4:35 AM Matthew Auld > > > wrote: >

Re: [Intel-gfx] [PATCH 3/4] drm/i915/userptr: Probe existence of backing struct pages upon creation

2021-07-22 Thread Matthew Auld
On Wed, 21 Jul 2021 at 21:28, Jason Ekstrand wrote: > > On Thu, Jul 15, 2021 at 5:16 AM Matthew Auld wrote: > > > > From: Chris Wilson > > > > Jason Ekstrand requested a more efficient method than userptr+set-domain > > to determine if the userptr object w

Re: [PATCH 5/7] drm/i915/gem/ttm: Respect the objection region in placement_from_obj

2021-07-22 Thread Matthew Auld
On Wed, 21 Jul 2021 at 21:11, Jason Ekstrand wrote: > > On Mon, Jul 19, 2021 at 8:35 AM Matthew Auld > wrote: > > > > On Fri, 16 Jul 2021 at 20:49, Jason Ekstrand wrote: > > > > > > On Fri, Jul 16, 2021 at 1:45 PM Matthew Auld > > > wrote: >

Re: [PATCH 5/7] drm/i915/gem/ttm: Respect the objection region in placement_from_obj

2021-07-22 Thread Matthew Auld
On Thu, 22 Jul 2021 at 10:49, Matthew Auld wrote: > > On Wed, 21 Jul 2021 at 21:11, Jason Ekstrand wrote: > > > > On Mon, Jul 19, 2021 at 8:35 AM Matthew Auld > > wrote: > > > > > > On Fri, 16 Jul 2021 at 20:49, Jason Ekstrand wrote: > > > >

[PATCH v3 1/2] drm/i915: document caching related bits

2021-07-22 Thread Matthew Auld
the cache with reads. Suggested-by: Daniel Vetter Signed-off-by: Matthew Auld Cc: Ville Syrjälä Cc: Mika Kuoppala --- .../gpu/drm/i915/gem/i915_gem_object_types.h | 176 +- drivers/gpu/drm/i915/i915_drv.h | 9 - 2 files changed, 172 insertions(+), 13 deletions(-) diff

[PATCH v3 2/2] drm/i915/ehl: unconditionally flush the pages on acquire

2021-07-22 Thread Matthew Auld
g memory before handing it to userspace, we need to prevent this. v2: this time actually set cache_dirty in put_pages() v3: move to get_pages() which looks simpler BSpec: 34007 References: 046091758b50 ("Revert "drm/i915/ehl: Update MOCS table for EHL"") Signed-off-by: Matthew Auld

Re: [Intel-gfx] [PATCH v3 1/2] drm/i915: document caching related bits

2021-07-23 Thread Matthew Auld
On Thu, 22 Jul 2021 at 12:54, Daniel Vetter wrote: > > On Thu, Jul 22, 2021 at 12:34:55PM +0100, Matthew Auld wrote: > > Try to document the object caching related bits, like cache_coherent and > > cache_dirty. > > > > v2(Ville): > > - As pointed out by

[PATCH v4 1/2] drm/i915: document caching related bits

2021-07-23 Thread Matthew Auld
cache with reads. v4(Daniel): - Various improvements, including adding some more details for WT. Suggested-by: Daniel Vetter Signed-off-by: Matthew Auld Cc: Ville Syrjälä Cc: Mika Kuoppala Reviewed-by: Daniel Vetter --- .../gpu/drm/i915/gem/i915_gem_object_types.h | 187 +-

[PATCH v4 2/2] drm/i915/ehl: unconditionally flush the pages on acquire

2021-07-23 Thread Matthew Auld
g memory before handing it to userspace, we need to prevent this. v2: this time actually set cache_dirty in put_pages() v3: move to get_pages() which looks simpler BSpec: 34007 References: 046091758b50 ("Revert "drm/i915/ehl: Update MOCS table for EHL"") Signed-off-by: Matthew Auld

[PATCH] drm/i915/userptr: Probe existence of backing struct pages upon creation

2021-07-23 Thread Matthew Auld
that the pages will remain valid by the time they are actually used(Tvrtko). - Add a small comment for the hole finding logic(Jason). - Move the param next to all the other params which just return true. Testcase: igt/gem_userptr_blits/probe Signed-off-by: Chris Wilson Signed-off-by: Matthew

Re: [Intel-gfx] [PATCH] drm/i915/userptr: Probe existence of backing struct pages upon creation

2021-07-26 Thread Matthew Auld
4 > > > > On Fri, Jul 23, 2021 at 6:35 AM Matthew Auld wrote: > > > > > > From: Chris Wilson > > > > > > Jason Ekstrand requested a more efficient method than userptr+set-domain > > > to determine if the userptr object was backed by a complete

Re: [Intel-gfx] [PATCH] drm/i915/userptr: Probe existence of backing struct pages upon creation

2021-07-26 Thread Matthew Auld
On Fri, 23 Jul 2021 at 18:48, Jason Ekstrand wrote: > > https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12044 Cool, is that ready to go? i.e can we start merging the kernel + IGT side. > > On Fri, Jul 23, 2021 at 6:35 AM Matthew Auld wrote: > > > > From: Chr

Re: [Intel-gfx] [PATCH 5/8] drm/i915/gem/ttm: Only call __i915_gem_object_set_pages if needed

2021-07-26 Thread Matthew Auld
_i915_gem_object_set_pages so i915_ttm_migrate is safe to call, even on > populated objects. > > Signed-off-by: Jason Ekstrand Reviewed-by: Matthew Auld

Re: [Intel-gfx] [PATCH 6/8] drm/i915/gem: Always call obj->ops->migrate unless can_migrate fails

2021-07-26 Thread Matthew Auld
on't exist at all. > > It's better if GEM just always calls into TTM and let's TTM handle > things. That way the lies stay better contained. Once the migration is > complete, the object will have pages, obj->mm.region will be correct, > and we're done lying. &

Re: [Intel-gfx] [PATCH 0/8] drm/i915: Migrate memory to SMEM when imported cross-device (v8)

2021-07-26 Thread Matthew Auld
device. > > v7: > - Drop "drm/i915/gem/ttm: Place new BOs in the requested region" > - Add a new "drm/i915/gem: Call i915_gem_flush_free_objects() in > i915_gem_dumb_create()" > - Misc. review feedback from Matthew Auld > v8: > - Misc. review feedback f

Re: [Intel-gfx] [PATCH 0/8] drm/i915: Migrate memory to SMEM when imported cross-device (v8)

2021-07-26 Thread Matthew Auld
On Mon, 26 Jul 2021 at 16:11, Jason Ekstrand wrote: > > On Mon, Jul 26, 2021 at 3:12 AM Matthew Auld > wrote: > > > > On Fri, 23 Jul 2021 at 18:21, Jason Ekstrand wrote: > > > > > > This patch series fixes an issue with discrete graphics on Intel wher

Re: [Intel-gfx] [PATCH 0/8] drm/i915: Migrate memory to SMEM when imported cross-device (v8)

2021-07-26 Thread Matthew Auld
On Mon, 26 Jul 2021 at 16:32, Jason Ekstrand wrote: > > On Mon, Jul 26, 2021 at 10:29 AM Matthew Auld > wrote: > > > > On Mon, 26 Jul 2021 at 16:11, Jason Ekstrand wrote: > > > > > > On Mon, Jul 26, 2021 at 3:12 AM Matthew Auld > > > wrote: >

Re: [Intel-gfx] [PATCH] drm/i915/userptr: Probe existence of backing struct pages upon creation

2021-07-28 Thread Matthew Auld
On Mon, 26 Jul 2021 at 17:10, Tvrtko Ursulin wrote: > > > On 26/07/2021 16:14, Jason Ekstrand wrote: > > On Mon, Jul 26, 2021 at 3:31 AM Maarten Lankhorst > > wrote: > >> > >> Op 23-07-2021 om 13:34 schreef Matthew Auld: > >>> From: Chris

[PATCH] drm/i915/selftests: fixup igt_shrink_thp

2021-07-28 Thread Matthew Auld
forcing I915_SHRINK_ACTIVE. Signed-off-by: Matthew Auld Cc: Tvrtko Ursulin --- drivers/gpu/drm/i915/gem/selftests/huge_pages.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c

[PATCH] drm/i915/selftests: prefer the create_user helper

2021-07-28 Thread Matthew Auld
No need to hand roll the set_placements stuff, now that that we have a helper for this. Also no need to handle the -ENODEV case here, since NULL mr implies missing device support, where the for_each_memory_region helper will always skip over such regions. Signed-off-by: Matthew Auld Cc: Jason

[PATCH v2] drm/i915/selftests: prefer the create_user helper

2021-07-29 Thread Matthew Auld
No need to hand roll the set_placements stuff, now that that we have a helper for this. v2: add back the -ENODEV checking since it's possible for stolen to be probed, and yet still be non-functional Signed-off-by: Matthew Auld Cc: Jason Ekstrand Reviewed-by: Jason Ekstrand --- .../drm

Re: [Intel-gfx] [PATCH] drm/i915/selftests: fixup igt_shrink_thp

2021-07-29 Thread Matthew Auld
On 29/07/2021 11:53, Tvrtko Ursulin wrote: Hi Matt, On 28/07/2021 16:50, Matthew Auld wrote: Since the object might still be active here, the shrink_all will simply ignore it, which blows up in the test, since the pages will still be there. Currently THP is disabled which should result in the

Re: [PATCH 1/2] drm/ttm: fix return value check

2021-04-09 Thread Matthew Auld
On Fri, 9 Apr 2021 at 14:01, Christian König wrote: > > The function returns the number of swapped pages here. Only abort when we get > a negative error code. > > Signed-off-by: Christian König Reviewed-by: Matthew Auld ___ dri-devel m

Re: [PATCH 2/2] drm/ttm: re-add debugs tt_shrink file

2021-04-09 Thread Matthew Auld
On Fri, 9 Apr 2021 at 14:01, Christian König wrote: > > That got lost when we moved back to a static limit. > > Signed-off-by: Christian König Reviewed-by: Matthew Auld ___ dri-devel mailing list dri-devel@lists.freedeskt

[PATCH 00/19] More DG1 enabling

2021-04-12 Thread Matthew Auld
Matthew Auld (3): drm/i915/stolen: treat stolen local as normal local memory drm/i915/gtt: map the PD up front drm/i915/gtt/dgfx: place the PD in LMEM Mohammed Khajapasha (2): drm/i915/fbdev: Use lmem physical addresses for fb_mmap() on discrete drm/i915: Return error value when bo not in

[PATCH 01/19] drm/i915/gt: Skip aperture remapping selftest where there is no aperture

2021-04-12 Thread Matthew Auld
From: Chris Wilson If there is no mappable aperture, we cannot remap it for access, and the selftest is void. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Reviewed-by: Imre Deak --- drivers/gpu/drm/i915/selftests/i915_vma.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a

[PATCH 07/19] drm/i915/fbdev: Use lmem physical addresses for fb_mmap() on discrete

2021-04-12 Thread Matthew Auld
From: Mohammed Khajapasha use local memory io BAR address for fbdev's fb_mmap() operation on discrete, fbdev uses the physical address of our framebuffer for its fb_mmap() fn. Signed-off-by: Mohammed Khajapasha --- drivers/gpu/drm/i915/display/intel_fbdev.c | 29 +- 1 file

[PATCH 03/19] drm/i915: Create stolen memory region from local memory

2021-04-12 Thread Matthew Auld
eded anymore. Signed-off-by: CQ Tang Signed-off-by: Matthew Auld --- drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 99 +++--- drivers/gpu/drm/i915/gem/i915_gem_stolen.h | 3 + drivers/gpu/drm/i915/i915_pci.c| 2 +- drivers/gpu/drm/i915/i915_reg.h

[PATCH 02/19] drm/i915/selftests: Only query RAPL for integrated power measurements

2021-04-12 Thread Matthew Auld
arios. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld --- drivers/gpu/drm/i915/gt/selftest_rc6.c | 32 +++- drivers/gpu/drm/i915/gt/selftest_rps.c | 2 +- drivers/gpu/drm/i915/selftests/librapl.c | 10 drivers/gpu/drm/i915/selftests/librapl.h | 4 +++ 4

[PATCH 05/19] drm/i915/stolen: enforce the min_page_size contract

2021-04-12 Thread Matthew Auld
From: CQ Tang Since stolen can now be device local-memory underneath, we should try to enforce any min_page_size restrictions when allocating pages. Signed-off-by: CQ Tang Signed-off-by: Matthew Auld --- drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 7 --- 1 file changed, 4 insertions

[PATCH 06/19] drm/i915/stolen: pass the allocation flags

2021-04-12 Thread Matthew Auld
From: CQ Tang Stolen memory is always allocated as physically contiguous pages, mark the object flags as such. Signed-off-by: CQ Tang Signed-off-by: Matthew Auld --- drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a

[PATCH 09/19] drm/i915/lmem: Fail driver init if LMEM training failed

2021-04-12 Thread Matthew Auld
(all GT registers will read back as 0, forcewake requests will timeout, etc.) so we should abort driver initialization if this happens. We can confirm that LMEM was initialized successfully via sgunit register GU_CNTL. Bspec: 53111 Signed-off-by: Matt Roper Cc: Caz Yokoyama Reviewed-by: Matthew

[PATCH 04/19] drm/i915/stolen: treat stolen local as normal local memory

2021-04-12 Thread Matthew Auld
Underneath it's the same stuff, so things like the PTE_LM bits for the GTT should just keep working as-is. Signed-off-by: Matthew Auld --- drivers/gpu/drm/i915/gem/i915_gem_lmem.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_lmem

[PATCH 08/19] drm/i915: Return error value when bo not in LMEM for discrete

2021-04-12 Thread Matthew Auld
From: Mohammed Khajapasha Return EREMOTE value when frame buffer object is not backed by LMEM for discrete. If Local memory is supported by hardware the framebuffer backing gem objects should be from local memory. Signed-off-by: Mohammed Khajapasha --- drivers/gpu/drm/i915/display/intel_displa

[PATCH 10/19] drm/i915/dg1: Fix mapping type for default state object

2021-04-12 Thread Matthew Auld
From: Venkata Ramana Nayana Use I915_MAP_WC when default state object is allocated in LMEM. Signed-off-by: Venkata Ramana Nayana Reviewed-by: Matthew Auld --- drivers/gpu/drm/i915/gt/shmem_utils.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gt

[PATCH 11/19] drm/i915: Update the helper to set correct mapping

2021-04-12 Thread Matthew Auld
From: Venkata Sandeep Dhanalakota Determine the possible coherent map type based on object location, and if target has llc or if user requires an always coherent mapping. Cc: Matthew Auld Cc: CQ Tang Suggested-by: Michal Wajdeczko Signed-off-by: Venkata Sandeep Dhanalakota --- drivers/gpu

[PATCH 12/19] drm/i915/lmem: Bypass aperture when lmem is available

2021-04-12 Thread Matthew Auld
From: Anusha Srivatsa In the scenario where local memory is available, we have rely on CPU access via lmem directly instead of aperture. v2: gmch is only relevant for much older hw, therefore we can drop the has_aperture check since it should always be present on such platforms. (Chris) Cc: Vil

[PATCH 13/19] drm/i915/dg1: Read OPROM via SPI controller

2021-04-12 Thread Matthew Auld
From: Clint Taylor Read OPROM SPI through MMIO and find VBT entry since we can't use OpRegion and PCI mapping may not work on some systems due to the BIOS not leaving the Option ROM mapped. v2 by Jani: - switch to intel_uncore_read/intel_uncore_write Cc: Ville Syrjälä Cc: Tomas Winkler Cc: Jo

[PATCH 14/19] drm/i915/oprom: Basic sanitization

2021-04-12 Thread Matthew Auld
From: Anshuman Gupta Sanitize OPROM header, CPD signature and OPROM PCI version. OPROM_HEADER, EXPANSION_ROM_HEADER and OPROM_MEU_BLOB structures and PCI struct offsets are provided by GSC counterparts. These are yet to be Documented in B.Spec. After successful sanitization, extract VBT from opre

[PATCH 15/19] drm/i915: WA for zero memory channel

2021-04-12 Thread Matthew Auld
From: José Roberto de Souza Commit c457d9cf256e ("drm/i915: Make sure we have enough memory bandwidth on ICL") assumes that we always have a non-zero dram_info->channels and uses it as a divisor. We need num memory channels to be at least 1 for sane bw limits checking, even when PCode returns 0,

[PATCH 16/19] drm/i915/dg1: Compute MEM Bandwidth using MCHBAR

2021-04-12 Thread Matthew Auld
From: Clint Taylor The PUNIT FW is currently returning 0 for all memory bandwidth parameters. Read the values directly from MCHBAR offsets 0x5918 and 0x4000(4). This is a temporary WA until the PUNIT FW returns valid values. v2 (Lucas): Add error to log since this is fixed in new pcode available

[PATCH 17/19] drm/i915/dg1: Double memory bandwidth available

2021-04-12 Thread Matthew Auld
From: Clint Taylor Use MCHBAR Gear_type information to compute memory bandwidth available during MCHBAR calculations. v2 by Jani: - switch to intel_uncore_read/intel_uncore_write Tested-by: Swati Sharma Cc: Swati Sharma Cc: Ville Syrjälä Signed-off-by: Clint Taylor Signed-off-by: Jani Nikul

[PATCH 19/19] drm/i915/gtt/dgfx: place the PD in LMEM

2021-04-12 Thread Matthew Auld
It's a requirement that for dgfx we place all the paging structures in device local-memory. Signed-off-by: Matthew Auld --- drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 5 - drivers/gpu/drm/i915/gt/intel_gtt.c | 27 +-- drivers/gpu/drm/i915/gt/intel_gtt.h | 1

[PATCH 18/19] drm/i915/gtt: map the PD up front

2021-04-12 Thread Matthew Auld
simple single page shmemfs object will return a plain kmap, that is then kept for the lifetime of the page directory. v2: (Thomas) Rebase on dma_resv and obj->mm.lock removal. Signed-off-by: Matthew Auld Signed-off-by: Chris Wilson --- .../drm/i915/gem/selftests/i915_gem_context.c |

[RFC PATCH] drm/doc/rfc: i915 DG1 uAPI

2021-04-12 Thread Matthew Auld
Add an entry for the new uAPI needed for DG1. Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Daniel Vetter Cc: Dave Airlie --- Documentation/gpu/rfc/i915_create_ext.c | 48 ++ .../gpu/rfc/i915_create_ext_placements.c | 19 Documentation/gpu/rfc

Re: [Intel-gfx] [PATCH 18/19] drm/i915/gtt: map the PD up front

2021-04-12 Thread Matthew Auld
On Mon, 12 Apr 2021 at 16:17, Daniel Vetter wrote: > > On Mon, Apr 12, 2021 at 10:05:25AM +0100, Matthew Auld wrote: > > We need to general our accessor for the page directories and tables from > > using the simple kmap_atomic to support local memory, and this setup &

Re: [Intel-gfx] [PATCH 18/19] drm/i915/gtt: map the PD up front

2021-04-13 Thread Matthew Auld
On Mon, 12 Apr 2021 at 18:01, Daniel Vetter wrote: > > On Mon, Apr 12, 2021 at 6:08 PM Matthew Auld > wrote: > > > > On Mon, 12 Apr 2021 at 16:17, Daniel Vetter wrote: > > > > > > On Mon, Apr 12, 2021 at 10:05:25AM +0100, Matthew Auld wrote: > > >

[RFC PATCH v2] drm/doc/rfc: i915 DG1 uAPI

2021-04-13 Thread Matthew Auld
Add an entry for the new uAPI needed for DG1. v2(Daniel): - include the overall upstreaming plan - add a note for mmap, there are differences here for TTM vs i915 - bunch of other suggestions from Daniel Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Daniel Vetter Cc: Dave Airlie

Re: [PATCH 1/7] drm/nouveau: use bo->base.size instead of mem->num_pages

2021-04-13 Thread Matthew Auld
; - info->fix.smem_len = nvbo->bo.mem.num_pages << PAGE_SHIFT; > + info->fix.smem_len = nvbo->bo.base.size; Is byte level granularity a thing in general? I would have assumed that base.size is always aligned to PAGE_SIZE or whatever? At least in ttm_bo_init_reserved() we first align the size and then calculate the num_pages, so not sure. Hopefully this is not a concern, and should be equivalent. Reviewed-by: Matthew Auld ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH 2/7] drm/amdgpu: check base size instead of mem.num_pages

2021-04-13 Thread Matthew Auld
On Tue, 13 Apr 2021 at 14:52, Christian König wrote: > > Drop some ussage of mem in the code. usage > > Signed-off-by: Christian König Reviewed-by: Matthew Auld ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.fre

Re: [PATCH 3/7] drm/ttm: minor range manager coding style clean ups

2021-04-13 Thread Matthew Auld
On Tue, 13 Apr 2021 at 14:53, Christian König wrote: > > No functional changes, just removing the leftovers from the redesign. > > Signed-off-by: Christian König Reviewed-by: Matthew Auld ___ dri-devel mailing list dri-devel@lists.fre

Re: [PATCH 4/7] drm/ttm: move the page_alignment into the BO

2021-04-14 Thread Matthew Auld
On Tue, 13 Apr 2021 at 14:53, Christian König wrote: > > The alignment is a constant property and shouldn't change. > > Signed-off-by: Christian König What is page alignment here? Is it just for HW restrictions, say if it requires 64K pages with the same physical alignment for VRAM or something?

Re: [PATCH 5/7] drm/ttm: add ttm_sys_manager

2021-04-14 Thread Matthew Auld
On Tue, 13 Apr 2021 at 14:53, Christian König wrote: > > Add a separate manager for the system domain and make function tables > mandatory. > > Signed-off-by: Christian König > --- > drivers/gpu/drm/ttm/Makefile | 2 +- > drivers/gpu/drm/ttm/ttm_device.c | 17 +- > drivers

Re: [PATCH 4/7] drm/ttm: move the page_alignment into the BO

2021-04-14 Thread Matthew Auld
On Wed, 14 Apr 2021 at 10:57, Christian König wrote: > > Am 14.04.21 um 11:46 schrieb Matthew Auld: > > On Tue, 13 Apr 2021 at 14:53, Christian König > > wrote: > >> The alignment is a constant property and shouldn't change. > >> > >> Signed-o

Re: [Intel-gfx] [PATCH 11/19] drm/i915: Update the helper to set correct mapping

2021-04-14 Thread Matthew Auld
On Wed, 14 Apr 2021 at 16:22, Tvrtko Ursulin wrote: > > > On 12/04/2021 10:05, Matthew Auld wrote: > > From: Venkata Sandeep Dhanalakota > > > > Determine the possible coherent map type based on object location, > > and if target has llc or if user requir

Re: [Intel-gfx] [PATCH 11/19] drm/i915: Update the helper to set correct mapping

2021-04-15 Thread Matthew Auld
On Thu, 15 Apr 2021 at 09:21, Tvrtko Ursulin wrote: > > > On 14/04/2021 17:20, Matthew Auld wrote: > > On Wed, 14 Apr 2021 at 16:22, Tvrtko Ursulin > > wrote: > >> > >> > >> On 12/04/2021 10:05, Matthew Auld wrote: > >>> From: Ven

[PATCH v3 1/4] drm/i915/uapi: hide kernel doc warnings

2021-04-15 Thread Matthew Auld
It's not properly formatted kernel doc, just nerf the warnings for now. Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Jordan Justen Cc: Daniel Vetter Cc: Kenneth Graunke Cc: Jason Ekstrand Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Cc: mesa-...@lists.freedeskto

[PATCH v3 2/4] drm/i915/uapi: convert i915_user_extension to kernel doc

2021-04-15 Thread Matthew Auld
Add some example usage for the extension chaining also, which is quite nifty. Suggested-by: Daniel Vetter Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Jordan Justen Cc: Daniel Vetter Cc: Kenneth Graunke Cc: Jason Ekstrand Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Cc: mesa

[PATCH v3 4/4] drm/doc/rfc: i915 DG1 uAPI

2021-04-15 Thread Matthew Auld
extension be responsible for one thing only Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Jordan Justen Cc: Daniel Vetter Cc: Kenneth Graunke Cc: Jason Ekstrand Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Cc: mesa-...@lists.freedesktop.org --- Documentation/gpu/rfc

[PATCH v3 3/4] drm/i915/uapi: convert i915_query and friend to kernel doc

2021-04-15 Thread Matthew Auld
Add a note about the two-step process. Suggested-by: Daniel Vetter Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Jordan Justen Cc: Daniel Vetter Cc: Kenneth Graunke Cc: Jason Ekstrand Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Cc: mesa-...@lists.freedesktop.org --- include

Re: [PATCH 6/7] drm/ttm: always initialize the full ttm_resource

2021-04-15 Thread Matthew Auld
On Tue, 13 Apr 2021 at 14:53, Christian König wrote: > > Init all fields in ttm_resource_alloc() when we create a new resource. > > Signed-off-by: Christian König Reviewed-by: Matthew Auld ___ dri-devel mailing list dri-devel@lists.fre

Re: [PATCH 7/7] drm/ttm: rename bo->mem and make it a pointer

2021-04-15 Thread Matthew Auld
inter instead. > > No functional change. > > Signed-off-by: Christian König Reviewed-by: Matthew Auld ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH 1/4] drm/i915/uapi: fix kernel doc warnings

2021-04-16 Thread Matthew Auld
Fix the cases where it is almost already valid kernel doc, for the others just nerf the warnings for now. Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Jordan Justen Cc: Daniel Vetter Cc: Kenneth Graunke Cc: Jason Ekstrand Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Cc: mesa

[PATCH 2/4] drm/doc: add section for driver uAPI

2021-04-16 Thread Matthew Auld
Add section for drm/i915 uAPI and pull in i915_drm.h. Suggested-by: Daniel Vetter Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Jordan Justen Cc: Daniel Vetter Cc: Kenneth Graunke Cc: Jason Ekstrand Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Cc: mesa

[PATCH 3/4] drm/i915/uapi: convert i915_user_extension to kernel doc

2021-04-16 Thread Matthew Auld
Add some example usage for the extension chaining also, which is quite nifty. v2: (Daniel) - clarify that the name is just some integer, also document that the name space is not global Suggested-by: Daniel Vetter Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Jordan Justen Cc

[PATCH 4/4] drm/i915/uapi: convert i915_query and friend to kernel doc

2021-04-16 Thread Matthew Auld
Add a note about the two-step process. v2(Tvrtko): - Also document the other method of just passing in a buffer which is large enough, which avoids two ioctl calls. Can make sense for smaller query items. Suggested-by: Daniel Vetter Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc

Re: [Intel-gfx] [PATCH 06/19] drm/i915/stolen: pass the allocation flags

2021-04-16 Thread Matthew Auld
On 14/04/2021 16:09, Tvrtko Ursulin wrote: On 12/04/2021 10:05, Matthew Auld wrote: From: CQ Tang Stolen memory is always allocated as physically contiguous pages, mark the object flags as such. Signed-off-by: CQ Tang Signed-off-by: Matthew Auld ---   drivers/gpu/drm/i915/gem

Re: [Intel-gfx] [PATCH 12/19] drm/i915/lmem: Bypass aperture when lmem is available

2021-04-16 Thread Matthew Auld
On 14/04/2021 16:33, Tvrtko Ursulin wrote: On 12/04/2021 10:05, Matthew Auld wrote: From: Anusha Srivatsa In the scenario where local memory is available, we have rely on CPU access via lmem directly instead of aperture. v2: gmch is only relevant for much older hw, therefore we can drop the

Re: [Intel-gfx] [PATCH 03/19] drm/i915: Create stolen memory region from local memory

2021-04-16 Thread Matthew Auld
On 14/04/2021 16:01, Tvrtko Ursulin wrote: On 12/04/2021 10:05, Matthew Auld wrote: From: CQ Tang Add "REGION_STOLEN" device info to dg1, create stolen memory region from upper portion of local device memory, starting from DSMBASE. v2: - s/drm_info/drm_dbg; userspace like

[PATCH v2 1/4] drm/i915/uapi: fix kernel doc warnings

2021-04-19 Thread Matthew Auld
Fix the cases where it is almost already valid kernel doc, for the others just nerf the warnings for now. Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Jordan Justen Cc: Daniel Vetter Cc: Kenneth Graunke Cc: Jason Ekstrand Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Cc: mesa

[PATCH v2 2/4] drm/doc: add section for driver uAPI

2021-04-19 Thread Matthew Auld
Add section for drm/i915 uAPI and pull in i915_drm.h. Suggested-by: Daniel Vetter Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Jordan Justen Cc: Daniel Vetter Cc: Kenneth Graunke Cc: Jason Ekstrand Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Cc: mesa

[PATCH v2 3/4] drm/i915/uapi: convert i915_user_extension to kernel doc

2021-04-19 Thread Matthew Auld
Add some example usage for the extension chaining also, which is quite nifty. v2: (Daniel) - clarify that the name is just some integer, also document that the name space is not global v3: prefer kernel-doc references for structs Suggested-by: Daniel Vetter Signed-off-by: Matthew Auld Cc

[PATCH v2 4/4] drm/i915/uapi: convert i915_query and friend to kernel doc

2021-04-19 Thread Matthew Auld
Vetter Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Cc: Jordan Justen Cc: Daniel Vetter Cc: Kenneth Graunke Cc: Jason Ekstrand Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Cc: mesa-...@lists.freedesktop.org Reviewed-by: Daniel Vetter Reviewed-by: Jason Ekstrand

Re: [Intel-gfx] [PATCH 11/19] drm/i915: Update the helper to set correct mapping

2021-04-19 Thread Matthew Auld
On 15/04/2021 12:05, Tvrtko Ursulin wrote: On 15/04/2021 10:23, Matthew Auld wrote: On Thu, 15 Apr 2021 at 09:21, Tvrtko Ursulin wrote: On 14/04/2021 17:20, Matthew Auld wrote: On Wed, 14 Apr 2021 at 16:22, Tvrtko Ursulin wrote: On 12/04/2021 10:05, Matthew Auld wrote: From: Venkata

Re: [PATCH v3 4/4] drm/doc/rfc: i915 DG1 uAPI

2021-04-19 Thread Matthew Auld
On 16/04/2021 17:38, Jason Ekstrand wrote: On Thu, Apr 15, 2021 at 11:04 AM Matthew Auld wrote: Add an entry for the new uAPI needed for DG1. v2(Daniel): - include the overall upstreaming plan - add a note for mmap, there are differences here for TTM vs i915 - bunch of other

Re: [Intel-gfx] [PATCH 11/19] drm/i915: Update the helper to set correct mapping

2021-04-19 Thread Matthew Auld
On 19/04/2021 15:07, Tvrtko Ursulin wrote: On 19/04/2021 12:30, Matthew Auld wrote: On 15/04/2021 12:05, Tvrtko Ursulin wrote: On 15/04/2021 10:23, Matthew Auld wrote: On Thu, 15 Apr 2021 at 09:21, Tvrtko Ursulin wrote: On 14/04/2021 17:20, Matthew Auld wrote: On Wed, 14 Apr 2021 at 16

[PATCH v4] drm/doc/rfc: i915 DG1 uAPI

2021-04-19 Thread Matthew Auld
region_query and region_info, just keep the bare minimum needed for padding Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Thomas Hellström Cc: Daniele Ceraolo Spurio Cc: Lionel Landwerlin Cc: Jon Bloomfield Cc: Jordan Justen Cc: Daniel Vetter Cc: Kenneth Graunke Cc: Jason Ekstrand

[PATCH 1/5] drm/i915: Create stolen memory region from local memory

2021-04-20 Thread Matthew Auld
7;t be needed anymore. v3: - split stolen lmem vs smem ops(Tvrtko) - add shortcut for stolen region in i915(Tvrtko) - sanity check dsm base vs bar size(Xinyun) Signed-off-by: CQ Tang Signed-off-by: Matthew Auld Cc: Tvrtko Ursulin Cc: Xinyun Liu --- drivers/gpu/drm/i

[PATCH 3/5] drm/i915/stolen: enforce the min_page_size contract

2021-04-20 Thread Matthew Auld
From: CQ Tang Since stolen can now be device local-memory underneath, we should try to enforce any min_page_size restrictions when allocating pages. Signed-off-by: CQ Tang Signed-off-by: Matthew Auld Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 7 --- 1

[PATCH 2/5] drm/i915/stolen: treat stolen local as normal local memory

2021-04-20 Thread Matthew Auld
Underneath it's the same stuff, so things like the PTE_LM bits for the GTT should just keep working as-is. Signed-off-by: Matthew Auld Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/gem/i915_gem_lmem.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/driver

[PATCH 4/5] drm/i915/stolen: pass the allocation flags

2021-04-20 Thread Matthew Auld
From: CQ Tang Stolen memory is always allocated as physically contiguous pages, mark the object flags as such. v2: move setting I915_BO_ALLOC_CONTIGUOUS into create_stolen Signed-off-by: CQ Tang Signed-off-by: Matthew Auld Cc: Tvrtko Ursulin --- drivers/gpu/drm/i915/gem/i915_gem_stolen.c

[PATCH 5/5] drm/i915/lmem: Fail driver init if LMEM training failed

2021-04-20 Thread Matthew Auld
Auld Signed-off-by: Matthew Auld --- drivers/gpu/drm/i915/i915_reg.h | 3 +++ drivers/gpu/drm/i915/intel_uncore.c | 12 2 files changed, 15 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index ea20058bc13f..e7d78b10c226 100644 --- a

Re: [PATCH 1/5] drm/i915: Create stolen memory region from local memory

2021-04-21 Thread Matthew Auld
On 20/04/2021 17:06, Tvrtko Ursulin wrote: On 20/04/2021 14:18, Matthew Auld wrote: From: CQ Tang Add "REGION_STOLEN" device info to dg1, create stolen memory region from upper portion of local device memory, starting from DSMBASE. v2: - s/drm_info/drm_dbg; userspace like

Re: [PATCH 4/5] drm/i915/stolen: pass the allocation flags

2021-04-21 Thread Matthew Auld
On 20/04/2021 17:14, Tvrtko Ursulin wrote: On 20/04/2021 14:18, Matthew Auld wrote: From: CQ Tang Stolen memory is always allocated as physically contiguous pages, mark the object flags as such. v2: move setting I915_BO_ALLOC_CONTIGUOUS into create_stolen Signed-off-by: CQ Tang Signed-off

[PATCH v2 1/4] drm/i915: Create stolen memory region from local memory

2021-04-21 Thread Matthew Auld
7;t be needed anymore. v3: - split stolen lmem vs smem ops(Tvrtko) - add shortcut for stolen region in i915(Tvrtko) - sanity check dsm base vs bar size(Xinyun) v4(Tvrtko): - more cleanup - add some TODOs Signed-off-by: CQ Tang Signed-off-by: Matthew Auld Cc: Tvrtko Ursulin Cc: X

[PATCH v2 2/4] drm/i915/stolen: treat stolen local as normal local memory

2021-04-21 Thread Matthew Auld
Underneath it's the same stuff, so things like the PTE_LM bits for the GTT should just keep working as-is. Signed-off-by: Matthew Auld Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/gem/i915_gem_lmem.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/driver

[PATCH v2 4/4] drm/i915/stolen: actually mark as contiguous

2021-04-21 Thread Matthew Auld
we don't have a use for that. Signed-off-by: Matthew Auld Cc: Tvrtko Ursulin --- drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c b/drivers/gpu/drm/i915/gem/i915_gem_sto

[PATCH v2 3/4] drm/i915/stolen: enforce the min_page_size contract

2021-04-21 Thread Matthew Auld
From: CQ Tang Since stolen can now be device local-memory underneath, we should try to enforce any min_page_size restrictions when allocating pages. Signed-off-by: CQ Tang Signed-off-by: Matthew Auld Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 7 --- 1

Re: [Intel-gfx] [PATCH 11/19] drm/i915: Update the helper to set correct mapping

2021-04-21 Thread Matthew Auld
On 19/04/2021 16:01, Tvrtko Ursulin wrote: On 19/04/2021 15:37, Matthew Auld wrote: On 19/04/2021 15:07, Tvrtko Ursulin wrote: On 19/04/2021 12:30, Matthew Auld wrote: On 15/04/2021 12:05, Tvrtko Ursulin wrote: On 15/04/2021 10:23, Matthew Auld wrote: On Thu, 15 Apr 2021 at 09:21, Tvrtko

Re: [Intel-gfx] [PATCH 11/19] drm/i915: Update the helper to set correct mapping

2021-04-21 Thread Matthew Auld
On Wed, 21 Apr 2021 at 16:41, Tvrtko Ursulin wrote: > > > On 21/04/2021 12:42, Matthew Auld wrote: > > On 19/04/2021 16:01, Tvrtko Ursulin wrote: > >> > >> On 19/04/2021 15:37, Matthew Auld wrote: > >>> On 19/04/2021 15:07, Tvrtko Ursulin wrote: &g

Re: [Intel-gfx] [PATCH 11/19] drm/i915: Update the helper to set correct mapping

2021-04-26 Thread Matthew Auld
On Wed, 21 Apr 2021 at 20:13, Matthew Auld wrote: > > On Wed, 21 Apr 2021 at 16:41, Tvrtko Ursulin > wrote: > > > > > > On 21/04/2021 12:42, Matthew Auld wrote: > > > On 19/04/2021 16:01, Tvrtko Ursulin wrote: > > >> > > >> On 19/04

[PATCH 1/9] drm/doc/rfc: i915 DG1 uAPI

2021-04-26 Thread Matthew Auld
region_query and region_info, just keep the bare minimum needed for padding Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Thomas Hellström Cc: Daniele Ceraolo Spurio Cc: Lionel Landwerlin Cc: Jon Bloomfield Cc: Jordan Justen Cc: Daniel Vetter Cc: Kenneth Graunke Cc: Jason Ekstrand

  1   2   3   4   5   6   7   8   9   10   >