Commit 82460d972 ("drm/i915: Rework ppgtt init to no require an aliasing
ppgtt") introduced a regression on Broadwell, triggering the following
IOMMU fault at startup:
vgaarb: device changed decodes: PCI:0000:00:02.0,olddecodes=io+mem,decodes=io+mem:owns=io+mem
dmar: DRHD: handling fault status reg 2
dmar: DMAR:[DMA Write] Request device [00:02.0] fault addr 880000
DMAR:[fault reason 23] Unknown
fbcon: inteldrmfb (fb0) is primary device
Further commentary from Daniel:
I sugggested this change to David after staring at the offending patch
for a while. I have no idea and theory whatsoever why this would upset
the gpu less than the other way round. But it seems to work. David
promised to chase hw people a bit more to get a more meaningful answer.
Wrt the comment that this deletes: I've done some digging and afaict
loading context before ppgtt enable was once required before our recent
restructuring of the context/ppgtt init code: Before that context sw
setup (i.e. allocating the default context) and hw setup was smashed
together. Also the setup of the default context was the bit that
actually allocated the aliasing ppgtt structures. Which is the reason
for the context before ppgtt depency.
Or was, since with all the untangling there's no no real depency any
more (functional, who knows what the hw is doing), so the comment is
just stale.
Signed-off-by: David Woodhouse <[email protected]>
Cc: [email protected]
Reviewed-by: Daniel Vetter <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
drm_plane_helper_{update,disable} are not specific to primary planes;
fix some copy/paste summaries to avoid confusion.
Cc: [email protected]
Signed-off-by: Matt Roper <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
When commiting a plane update where the framebuffer doesn't change, we
can skip the prepare_fb/cleanup_fb steps. This also allows us to avoid
an unnecessary vblank wait at the end of the operation when we're just
moving a plane and not changing its image (e.g., for a cursor).
At the moment, i915 is the only upstream driver using the transitional
plane helpers, and thus the only driver affected by this change.
Note that this replicates a corresponding change in the atomic helpers
implemented in
commit ab58e3384b
Author: Daniel Vetter <[email protected]>
Date: Mon Nov 24 20:42:42 2014 +0100
drm/atomic-helper: Skip vblank waits for unchanged fbs
Reported-by: Jeremiah Mahler <[email protected]>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88540
Signed-off-by: Matt Roper <[email protected]>
Tested-by: Tested-by: Rodrigo Vivi <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
check error status for drm_iommu_attach_device() and make sure
it propagates till the caller.
Signed-off-by: Ajay Kumar <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
Split update plane in two parts, an initial check part that can fail
and the update part that can't fail.
This is a important step for the upcoming atomic modesetting support.
Signed-off-by: Gustavo Padovan <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
exynos_drm_manager was just a redundant struct to represent the crtc as
well. In this commit we merge exynos_drm_manager into exynos_drm_crtc to
remove an unnecessary level of indirection easing the understand of the
flow on exynos.
Signed-off-by: Gustavo Padovan <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
manager-drm_dev is only accessed by exynos_drm_crtc_create() so this patch
pass drm_dev as argument on exynos_drm_crtc_create() and remove it from
struct exynos_drm_manager.
Signed-off-by: Gustavo Padovan <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
'type' is now part of the struct exynos_drm_crtc. This is just another
step in the struct exynos_drm_manager removal.
Signed-off-by: Gustavo Padovan <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
It is not longer used. This is part of the process of removing
struct exynos_drm_manager entirely.
Signed-off-by: Gustavo Padovan <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
Get the pipe value from a parameter instead of getting it from
manager->pipe. We are removing manager->pipe.
Signed-off-by: Gustavo Padovan <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
'base' is more widely used name in the drm subsystem for the base object.
Signed-off-by: Gustavo Padovan <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
This was just as extra chain in the call stack. We just rename it to
_set_base() and let it do everything alone.
Signed-off-by: Gustavo Padovan <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
Avoid an extra call to exynos_drm_crtc_mode_set_commit() that only calls
exynos_update_plane().
Signed-off-by: Gustavo Padovan <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
We can safely use the exynos_update_plane() to update the plane
framebuffer for both the overlay and primary planes.
Note that this patch removes a call to manager->ops->commit() in
exynos_drm_crtc_mode_set_commit(). The commit() call is used only by the
fimd driver to set underlying timings and need only in full modeset
operations. For plane update only win_commit is needed.
Signed-off-by: Gustavo Padovan <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
It's doing nothing but calling exynos_crtc->ops->win_commit(), so let's
call this directly to avoid extra layers of abstraction.
Signed-off-by: Gustavo Padovan <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
DPMS only makes sense when the mode changes, for plane update changes do
not perform any dpms operation.
This move places the win_commit() and commit() calls directly in the code
instead of calling exynos_drm_crtc_commit() thus avoiding DPMS operations.
Signed-off-by: Gustavo Padovan <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
DPMS settings should only be changed by a full modeset.
exynos_plane_update() should only care about updating the planes itself
and nothing else.
Signed-off-by: Gustavo Padovan <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
We set it in the beginning of the function, thus no need to set it at
initialization.
Signed-off-by: Gustavo Padovan <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
struct exynos_drm_overlay has no practical advantage nor serves as
important piece of the exynos API design. The only place it was used
was inside the struct exynos_plane which was just causing a extra
access overhead. Users had to access the overlay first and just then
get the plane information it contains.
This patch merges struct exynos_drm_overlay into struct exynos_plane.
It also renames struct exynos_plane to struct exynos_drm_plane.
The rational is to cut one step to access plane information.
Signed-off-by: Gustavo Padovan <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
This functions were doing nothing but calling a manager op function,
so remove them and call the manager directly.
Signed-off-by: Gustavo Padovan <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
Let other pieces of the driver access struct exynos_drm_crtc as well.
struct exynos_drm_manager will be merged into struct exynos_drm_crtc, in
the sense we will move all its members to exynos_drm_crtc, so to start
this conversion exynos_drm_crtc need to be exposed as well.
Signed-off-by: Gustavo Padovan <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
With this change we allow other pieces of the code to use this macro.
Signed-off-by: Gustavo Padovan <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
radeon_vm_map_gart can use rdev->gart.pages_entry instead.
Also move the masking of the page address to radeon_vm_map_gart from its
callers.
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Michel Dänzer <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
The GART table BO has to be moved out of VRAM for suspend/resume. Any
updates to the GART table during that time were silently dropped without
this change. This caused GPU lockups on resume in some cases, see the bug
reports referenced below.
This might also make GPU reset more robust in some cases, as we no longer
rely on the GART table in VRAM being preserved across the GPU
lockup/reset.
v2: Add logic to radeon_gart_table_vram_pin directly instead of
reinstating radeon_gart_restore
v3: Move code after assignment of rdev->gart.table_addr so that the GART
TLB flush can work as intended, add code comment explaining why we're
doing this
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85204
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86267
Reviewed-by: Christian König <[email protected]>
Cc: [email protected]
Signed-off-by: Michel Dänzer <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
get_page_entry calculates the GART page table entry, which is just written
to the GART page table by set_page_entry.
This is a prerequisite for the following fix.
Reviewed-by: Christian König <[email protected]>
Cc: [email protected]
Signed-off-by: Michel Dänzer <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
drivers/gpu/drm/radeon/cik_sdma.c:293:6: sparse: symbol 'cik_sdma_ctx_switch_enable' was not declared. Should it be static?
Signed-off-by: Fengguang Wu <[email protected]>
Signed-off-by: Oded Gabbay <[email protected]>
In cases where MMU_NOTIFIER is not available, userptr will not be
available. Similar to i915, although not making an exception for
CAP_SYS_ADMIN.
The proposed userspace patches for userptr seem to handle the fall-
back properly, so a userptr-less kernel should not be a problem.
Signed-off-by: Rob Clark <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Clean up some formatting in radeon_audio.c to be
more consistent with the rest of the driver.
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>