]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: fixup the initial fb base on DGFX
authorMatthew Auld <matthew.auld@intel.com>
Tue, 15 Mar 2022 18:14:25 +0000 (18:14 +0000)
committerMatthew Auld <matthew.auld@intel.com>
Wed, 16 Mar 2022 17:50:42 +0000 (17:50 +0000)
commit61d5ab1b75914e6ce1f36ed9f259bc908aaf7d7f
tree5e43531dcd59e2aa3bf9ed5de1c23d4ec91cf564
parentda5d043fee00929d2cd286cd0eecdec7bf7aeb24
drm/i915: fixup the initial fb base on DGFX

On integrated it looks like the GGTT base should always 1:1 maps to
somewhere within DSM. On discrete the base seems to be pre-programmed with
a normal lmem address, and is not 1:1 mapped with the base address. On
such devices probe the lmem address directly from the PTE.

v2(Ville):
  - The base is actually the pre-programmed GGTT address, which is then
    meant to 1:1 map to somewhere inside dsm. In the case of dgpu the
    base looks to just be some offset within lmem, but this also happens
    to be the exact dsm start, on dg1. Therefore we should only need to
    fudge the physical address, before allocating from stolen.
  - Bail if it's not located in dsm.
v3:
  - Scratch that. There doesn't seem to be any relationship with the
    base and PTE address, on at least DG1. Let's instead just grab the
    lmem address from the PTE itself.

Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Nirmoy Das <nirmoy.das@linux.intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220315181425.576828-7-matthew.auld@intel.com
drivers/gpu/drm/i915/display/intel_plane_initial.c