Ville Syrjälä
5c857e6050
drm/i915: Pass the new crtc state to color management code
...
In an effort to eliminate the obj->state usage let's pass on the
new crtc state pointer (which we already have!) to the color management
code.
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20170823152226.22938-1-ville.syrjala@linux.intel.com
2017-08-31 21:22:44 +03:00
Ville Syrjälä
9c61de4c69
drm/i915: Consolidate max_cdclk_freq check in intel_crtc_compute_min_cdclk()
...
Currently the .modeset_calc_cdclk() hooks check the final cdclk value
against the max allowed. That's not really sufficient since the low
level calc_cdclk() functions effectively clamp the minimum required
cdclk to the max supported by the platform. Hence if the minimum
required exceeds the platforms capabilities we'd keep going anyway
using the max cdclk frequency.
To fix that let's move the check earlier into
intel_crtc_compute_min_cdclk() and we'll check the minimum required
cdclk of the pipe against the maximum supported by the platform.
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com >
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com >
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com >
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20170710193347.8734-2-ville.syrjala@linux.intel.com
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com >
2017-08-31 21:17:16 +03:00
Ville Syrjälä
d305e06146
drm/i915: Track minimum acceptable cdclk instead of "minimum dotclock"
...
Make the min_pixclk thing less confusing by changing it to track
the minimum acceptable cdclk frequency instead. This means moving
the application of the guardbands to a slightly higher level from
the low level platform specific calc_cdclk() functions.
The immediate benefit is elimination of the confusing 2x factors
on GLK/CNL+ in the audio workarounds (which stems from the fact
that the pipes produce two pixels per clock).
v2: Keep cdclk higher on CNL to workaround missing DDI clock voltage handling
v3: Squash with the CNL cdclk limits patch (DK)
v4: s/intel_min_cdclk/intel_pixel_rate_to_cdclk/ (DK)
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com >
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com >
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com >
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20170830185703.8189-1-ville.syrjala@linux.intel.com
2017-08-31 21:15:23 +03:00
Christian König
fd8bf087df
drm/amdgpu: bump version for support of local BOs
...
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-08-31 13:46:45 -04:00
Christian König
e1eb899b45
drm/amdgpu: add IOCTL interface for per VM BOs v3
...
Add the IOCTL interface so that applications can allocate per VM BOs.
Still WIP since not all corner cases are tested yet, but this reduces average
CS overhead for 10K BOs from 21ms down to 48us.
v2: add some extra checks, remove the WIP tag
v3: rename new flag to AMDGPU_GEM_CREATE_VM_ALWAYS_VALID
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-08-31 13:46:35 -04:00
Christian König
73fb16e7eb
drm/amdgpu: add support for per VM BOs v2
...
Per VM BOs are handled like VM PDs and PTs. They are always valid and don't
need to be specified in the BO lists.
v2: validate PDs/PTs first
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-08-31 13:46:26 -04:00
Christian König
4f5839c56e
drm/amdgpu: restrict userptr even more
...
Don't allow them to be GEM imported into another process.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Acked-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-08-31 13:46:17 -04:00
Christian König
0f2fc435d8
drm/amdgpu: fix new PD update code for Vega10 v2
...
We need to refer to the parent instead of the root BO for multi
level page tables on Vega10. Also don't set the PDE_PTE bit.
v2: Don't set the PDE_PTE bit either.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-and-Tested-by: Roger He <Hongbo.He@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-08-31 13:46:08 -04:00
Christian König
705e519e0e
drm/amdgpu: move hw generation check into amdgpu_doorbell_init v2
...
This way we can safely call it on SI as well.
v2: fix type in commit message
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-08-31 13:45:59 -04:00
Christian König
570144c652
drm/amdgpu: cleanup the VM code a bit more
...
The src isn't used any more after GART hack removal.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-08-31 13:45:47 -04:00
Christian König
ea09729c93
drm/amdgpu: rework page directory filling v2
...
Keep track off relocated PDs/PTs instead of walking and checking all PDs.
v2: fix root PD handling
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com > (v1)
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-08-31 13:45:24 -04:00
Rodrigo Vivi
5fcf34b1c5
drm/i915/cnl: Fix DP max voltage
...
On clock recovery this function is called to find out
the max voltage swing level that we could go.
However gen 9 functions use the old buffer translation tables
to figure that out. That table is not valid for CNL
causing an invalid number of entries and an invalid selection
on the max voltage swing level.
v2: Let's use same approach that previous platforms.
v3: Actually use n_entries and avoid duplicated -1.
v4: Avoid cnl_max_level and use current style.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Cc: Clint Taylor <clinton.a.taylor@intel.com >
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20170831145356.15932-1-rodrigo.vivi@intel.com
2017-08-31 09:31:58 -07:00
Rodrigo Vivi
bf50355645
drm/i915/cnl: Fix DDI hdmi level selection.
...
Let's get a proper HDMI DDI entry level for vswing programming
sequences on CNL.
Spec doesn't specify any default for HDMI tables,
so let's pick the last entry as the default for now.
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20170829232230.23051-7-rodrigo.vivi@intel.com
2017-08-31 09:30:09 -07:00
Rodrigo Vivi
cf3e0fb48c
drm/i915/cnl: Move ddi buf trans related functions up.
...
No functional changes. But those functions will be needed
to get max level for HDMI and DP, so let's move those
up closer to other similar functions existent for previous
platforms.
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20170829232230.23051-6-rodrigo.vivi@intel.com
2017-08-31 09:30:08 -07:00
Rodrigo Vivi
cc9cabfdec
drm/i915/cnl: Move voltage check into ddi buf trans functions.
...
Let's start converging CNL buf translations to same style
used on previous platforms. So first thing is to use the
standard signature so we don't need to propagate the voltage
check into other parts of the code, but only on the parts
that it is really useful.
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20170829232230.23051-5-rodrigo.vivi@intel.com
2017-08-31 09:30:08 -07:00
Rodrigo Vivi
381f957044
drm/i915: Enable voltage swing before enabling DDI_BUF_CTL.
...
Sequences for DisplayPort asks us to
" Configure voltage swing and related IO settings.
Refer to DDI Buffer section."
before "Configure and enable DDI_BUF_CTL"
On BXT and CNL this means to execute the ddi vswing sequences.
At this point these sequences calls are getting duplicated for DP
because they are all called from DP link trainning sequences.
However this patch is not yet removing it before a futher discussion
since spec also allows that during link training without disabling
anything:
"
Notes
Changing voltage swing during link training:
Change the swing setting following the DDI Buffer section.
The port does not need to be disabled.
"
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20170829232230.23051-4-rodrigo.vivi@intel.com
2017-08-31 09:30:07 -07:00
Rodrigo Vivi
2f7460a75a
drm/i915: Align vswing sequences with old ddi buffer registers.
...
Vswing sequences on BXT and CNL are equivalent
to the ddi buffer registers setting on other platforms.
For some reason it got aligned with skl_ddi_set_iboost what
is semantically incorrect. This forced us to keep skipping
ddi buffer translation tables on the platforms that has
the vswing sequences.
v2: Don't mess with DP signal levels on this patch.
Cc: Vandana Kannan <vandana.kannan@intel.com >
Cc: Imre Deak <imre.deak@intel.com >
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Cc: Ander Conselvan de Oliveira <conselvan2@gmail.com >
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20170829232230.23051-3-rodrigo.vivi@intel.com
2017-08-31 09:30:07 -07:00
Rodrigo Vivi
d509af6c85
drm/i915: decouple gen9 and gen10 dp signal levels.
...
Let's decouple bxt, glk and cnl dp signal levels
from other DDIs to avoid confusion.
No functional change. Only a reorg to avoid messing
with currently working DP signal levels when
moving voltage swing sequences around to match spec.
v2: ddi_signal_levels is also called from other ddi
platforms, so don't remove IS_GEN9_BC check from
skl_ddi_set_iboos. (Ville).
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20170829232230.23051-2-rodrigo.vivi@intel.com
2017-08-31 09:30:06 -07:00
Rodrigo Vivi
1b6e2fd289
drm/i915: Introduce intel_ddi_dp_level.
...
No functional changes. This only moves the DP level
selection to a separated function that will be later
used to organize better the vswing sequences.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20170829232230.23051-1-rodrigo.vivi@intel.com
2017-08-31 09:30:05 -07:00
Rodrigo Vivi
385db982b2
drm/i915/cnl: Avoid ioremap_wc on Cannonlake as well.
...
Driver’s CPU access to GTT is via the GTTMMADR BAR.
The current HW implementation of that BAR is to only
support <= DW (and maybe QW) writes—not 16/32/64B writes
that could occur with WC and/or SSE/AVX moves.
GTTMMADR must be marked uncacheable (UC).
Accesses to GTTMMADR(GTT), must be 64 bits or less (ie. 1 GTT entry).
v2: Get clarification on the reasons and spec is getting
updated to reflect it now.
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Suggested-by: Ben Widawsky <benjamin.widawsky@intel.com >
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20170829230907.21363-1-rodrigo.vivi@intel.com
2017-08-31 09:26:43 -07:00
Himanshu Jha
3ea0bf3779
drm/gma500: Remove null check before kfree
...
kfree on NULL pointer is a no-op and therefore checking is redundant.
Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/1504099556-3887-1-git-send-email-himanshujha199640@gmail.com
2017-08-31 09:24:15 +02:00
Rodrigo Vivi
86ebb015fa
drm/i915/cnl: WaDisableI2mCycleOnWRPort
...
On CNL B0 stepping GAM is not able to detect some deadlock
condition and then rise the rise the gam_coh_flush.
WA database and spec both mentions to set 4AB8[24]=1 as
workaround. Although register offset 0x4AB8 is not
documented for any platform.
References: HSD#1945815, BSID#1112
Cc: Mika Kuoppala <mika.kuoppala@intel.com >
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20170829230751.21047-1-rodrigo.vivi@intel.com
2017-08-30 21:57:10 -07:00
Rodrigo Vivi
392572feb0
drm/i915/cnl: WA FtrEnableFastAnisoL1BankingFix
...
WA to enable HW L1 Banking fix that allows aniso to operate
at full sample rate.
References: HSD#1937670
Cc: Mika Kuoppala <mika.kuoppala@intel.com >
Cc: Oscar Mateo <oscar.mateo@intel.com >
Cc: Ben Widawsky <ben@bwidawsk.net >
Cc: Anuj Phogat <anuj.phogat@intel.com >
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20170829230723.20898-1-rodrigo.vivi@intel.com
2017-08-30 21:56:06 -07:00
Rodrigo Vivi
91200c09d3
drm/i915: Stop using long platform names on clock gating functions.
...
No functional changes.
Our code was only a bit messy with mixed style there so
let's clean up a bit using the short codenames for the platforms.
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com >
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Acked-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20170829052026.15038-1-rodrigo.vivi@intel.com
2017-08-30 21:31:24 -07:00
Chris Wilson
fa3722f649
drm/i915: Ignore duplicate VMA stored within the per-object handle LUT
...
By using drm_gem_flink/drm_gem_open on an object using the same fd, it
is possible for a client to create multiple handles pointing to the same
object (tied to the same contexts and VMA), as exemplified by
igt::gem_handle_to_libdrm_bo(). Since this duplication has been possible
since forever, we cannot assume that the handle:(fpriv, object) is
unique and so must handle the multiple users of a single VMA.
v2: Added commentary noise.
Testcase: igt/gem_close
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102355
Fixes: d1b48c1e71 ("drm/i915: Replace execbuf vma ht with an idr")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20170822110517.22277-3-chris@chris-wilson.co.uk
Tested-by: Marta Lofstedt <marta.lofstedt@intel.com >
Reviewed-by: Michał Winiarski <michal.winiarski@intel.com >
(cherry-picked from commit 3ffff01749 )
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
2017-08-30 12:17:22 -07:00
Ville Syrjälä
18db229d30
drm/i915: Skip fence alignemnt check for the CCS plane
...
The CCS won't have the same stride as the main surface anyway so trying
to guard against the fence stride not matching the CCS stride is
not sensible. Just skip the fence vs. fb alignment check for the aux
plane.
Cc: Ben Widawsky <ben@bwidawsk.net >
Cc: Jason Ekstrand <jason@jlekstrand.net >
Cc: Daniel Stone <daniels@collabora.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20170824191100.10949-3-ville.syrjala@linux.intel.com
Reviewed-by: Ben Widawsky <ben@bwidawsk.net >
Fixes: 2e2adb0573 ("drm/i915: Add render decompression support")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
(cherry picked from commit 2ec4cf4057 )
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
2017-08-30 12:08:20 -07:00
Ville Syrjälä
e8837d98d2
drm/i915: Treat fb->offsets[] as a raw byte offset instead of a linear offset
...
Userspace wants to treat fb->offsets[] as raw byte offsets into the gem
bo. Adjust the kernel code to match.
Cc: Ben Widawsky <ben@bwidawsk.net >
Cc: Jason Ekstrand <jason@jlekstrand.net >
Cc: Daniel Stone <daniels@collabora.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20170824191100.10949-2-ville.syrjala@linux.intel.com
Acked-by: Ben Widawsky <ben@bwidawsk.net >
Fixes: 2e2adb0573 ("drm/i915: Add render decompression support")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
(cherry picked from commit 303ba69554 )
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
2017-08-30 12:08:17 -07:00
Chris Wilson
0168bdfc9c
drm/i915: Always wake the device to flush the GTT
...
Since we hold the device wakeref when writing through the GTT (otherwise
the writes would fail), we presumed that before the device sleeps those
writes would naturally be flushed and that we wouldn't need our mmio
read trick. However, that presumption seems false and a sleepy bxt seems
to require us to always manually flush the GTT writes prior to direct
access.
Fixes: e2a2aa36a5 ("drm/i915: Check we have an wake device before flushing GTT writes")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20170829192546.1087-1-chris@chris-wilson.co.uk
(cherry picked from commit b69a784f5e )
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
2017-08-30 12:08:14 -07:00
Chris Wilson
3b24e7e810
drm/i915: Recreate vmapping even when the object is pinned
...
Sometimes we know we are the only user of the bo, but since we take a
protective pin_pages early on, an attempt to change the vmap on the
object is denied because it is busy. i915_gem_object_pin_map() cannot
tell from our single pin_count if the operation is safe. Instead we must
pass that information down from the caller in the manner of
I915_MAP_OVERRIDE.
This issue has existed from the introduction of the mapping, but was
never noticed as the only place where this conflict might happen is for
cached kernel buffers (such as allocated by i915_gem_batch_pool_get()).
Until recently there was only a single user (the cmdparser) so no
conflicts ever occurred. However, we now use it to allocate batches for
different operations (using MAP_WC on !llc for writes) in addition to the
existing shadow batch (using MAP_WB for reads).
We could either keep both mappings cached, or use a different write
mechanism if we detect a MAP_WB already exists (i.e. clflush
afterwards), but as we haven't seen this issue in the wild (it requires
hitting the GPU reloc path in addition to the cmdparser) for simplicity
just allow the mappings to be recreated.
v2: Include the i915_MAP_OVERRIDE bit in the enum so the compiler knows
about all the valid values.
Fixes: 7dd4f6729f ("drm/i915: Async GPU relocation processing")
Testcase: igt/gem_lut_handle # byt, completely by accident
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20170828104631.8606-1-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
(cherry picked from commit a575c67617 )
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
2017-08-30 12:08:11 -07:00
Chris Wilson
9c8eb2d5cb
drm/i915: Quietly cancel FBC activation if CRTC is turned off before worker
...
Since we use a worker to enable FBC on the CRTC, it is possible for the
CRTC to be switched off before we run. In this case, the CRTC will not
allow us to wait upon a vblank, so remove the DRM_ERROR as this is very
much expected.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102410
Fixes: ca18d51d77 ("drm/i915/fbc: wait for a vblank instead of 50ms when enabling")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com >
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20170825150215.19236-1-chris@chris-wilson.co.uk
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
(cherry picked from commit 908b6e6e8a )
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
2017-08-30 12:08:07 -07:00
Ville Syrjälä
2ec4cf4057
drm/i915: Skip fence alignemnt check for the CCS plane
...
The CCS won't have the same stride as the main surface anyway so trying
to guard against the fence stride not matching the CCS stride is
not sensible. Just skip the fence vs. fb alignment check for the aux
plane.
Cc: Ben Widawsky <ben@bwidawsk.net >
Cc: Jason Ekstrand <jason@jlekstrand.net >
Cc: Daniel Stone <daniels@collabora.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20170824191100.10949-3-ville.syrjala@linux.intel.com
Reviewed-by: Ben Widawsky <ben@bwidawsk.net >
Fixes: 2e2adb0573 ("drm/i915: Add render decompression support")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
2017-08-30 20:03:53 +03:00
Ville Syrjälä
303ba69554
drm/i915: Treat fb->offsets[] as a raw byte offset instead of a linear offset
...
Userspace wants to treat fb->offsets[] as raw byte offsets into the gem
bo. Adjust the kernel code to match.
Cc: Ben Widawsky <ben@bwidawsk.net >
Cc: Jason Ekstrand <jason@jlekstrand.net >
Cc: Daniel Stone <daniels@collabora.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20170824191100.10949-2-ville.syrjala@linux.intel.com
Acked-by: Ben Widawsky <ben@bwidawsk.net >
Fixes: 2e2adb0573 ("drm/i915: Add render decompression support")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
2017-08-30 20:03:39 +03:00
Dave Airlie
58aec87265
Merge branch 'drm-vmwgfx-fixes' of git://people.freedesktop.org/~syeh/repos_linux into drm-fixes
...
Single vmwgfx fix.
* 'drm-vmwgfx-fixes' of git://people.freedesktop.org/~syeh/repos_linux:
drm/vmwgfx: Fix F26 Wayland screen update issue
2017-08-30 18:41:45 +10:00
Chris Wilson
b69a784f5e
drm/i915: Always wake the device to flush the GTT
...
Since we hold the device wakeref when writing through the GTT (otherwise
the writes would fail), we presumed that before the device sleeps those
writes would naturally be flushed and that we wouldn't need our mmio
read trick. However, that presumption seems false and a sleepy bxt seems
to require us to always manually flush the GTT writes prior to direct
access.
Fixes: e2a2aa36a5 ("drm/i915: Check we have an wake device before flushing GTT writes")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20170829192546.1087-1-chris@chris-wilson.co.uk
2017-08-30 09:10:35 +01:00
Rodrigo Vivi
b07b914663
drm/tve200: Pass NULL format_modifier to drm_simple_display_pipe_init
...
This Fixes build on branches where we already have format-modifier.
Reference: https://lists.freedesktop.org/archives/dri-devel/2017-August/151044.html
Fixes: 179c02fe90 ("drm/tve200: Add new driver for TVE200")
Cc: Linus Walleij <linus.walleij@linaro.org >
Cc: Janet Morgan <janet.morgan@intel.com >
Cc: Ben Widawsky <ben@bwidawsk.net >
Cc: Daniel Stone <daniels@collabora.com > (v2)
Cc: Liviu Dudau <Liviu.Dudau@arm.com >
Cc: Daniel Stone <daniels@collabora.com >
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Reviewed-by: Daniel Stone <daniels@collabora.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20170825201612.23056-1-rodrigo.vivi@intel.com
2017-08-30 09:18:42 +02:00
Sinclair Yeh
021aba761f
drm/vmwgfx: Fix F26 Wayland screen update issue
...
vmwgfx currently cannot support non-blocking commit because when
vmw_*_crtc_page_flip is called, drm_atomic_nonblocking_commit()
schedules the update on a thread. This means vmw_*_crtc_page_flip
cannot rely on the new surface being bound before the subsequent
dirty and flush operations happen.
Cc: <stable@vger.kernel.org > # 4.12.x
Signed-off-by: Sinclair Yeh <syeh@vmware.com >
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com >
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
2017-08-29 23:19:03 +02:00
Himanshu Jha
ebe02de2c6
drm/amd/powerplay/hwmgr: Remove null check before kfree
...
kfree on NULL pointer is a no-op and therefore checking is redundant.
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-08-29 15:57:33 -04:00
Himanshu Jha
c5927537dd
drm/amd: Remove null check before kfree
...
Kfree on NULL pointer is a no-op and therefore checking is redundant.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-08-29 15:57:32 -04:00
Dave Airlie
e38f5164ca
Merge tag 'drm-misc-fixes-2017-08-28' of git://anongit.freedesktop.org/git/drm-misc into drm-fixes
...
Driver Changes:
- bridge/sii8620: Fix out-of-bounds write to incorrect register
Cc: Maciej Purski <m.purski@samsung.com >
Cc: Andrzej Hajda <a.hajda@samsung.com >
* tag 'drm-misc-fixes-2017-08-28' of git://anongit.freedesktop.org/git/drm-misc:
drm/bridge/sii8620: Fix memory corruption
2017-08-30 05:53:13 +10:00
Christian König
3f3333f8a0
drm/amdgpu: track evicted page tables v2
...
Instead of validating all page tables when one was evicted,
track which one needs a validation.
v2: simplify amdgpu_vm_ready as well
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com > (v1)
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-08-29 15:28:04 -04:00
Christian König
00b5cc83c4
drm/amdgpu: fix comment on amdgpu_bo_va
...
Except for the reference count all other members are protected
by the VM PD being reserved.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-08-29 15:28:04 -04:00
Christian König
cb7b6ec2f8
drm/amdgpu: add bo_va cleared flag again v2
...
We changed this to use an extra list a while back, but for the next
series I need a separate flag again.
v2: reorder to avoid unlocked list access
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-08-29 15:28:03 -04:00
Christian König
3d7d4d3a1b
drm/amdgpu: rework moved handling in the VM v2
...
Instead of using the vm_state use a separate flag to note
that the BO was moved.
v2: reorder patches to avoid temporary lockless access
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-08-29 15:28:02 -04:00
Tom St Denis
08cab989f7
drm/amd/amdgpu: Add write() method to VRAM debugfs entry (v2)
...
Allows writing data to vram via debugfs.
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
(v2): Call get_user before holding spinlock.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-08-29 15:28:02 -04:00
Rex Zhu
841e3be124
drm/amd/powerplay: notify smu once display changed on Rv.
...
when User turn off display or screen idle timeout,
smu need this message to start S0i2 entry.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-08-29 15:28:01 -04:00
Rex Zhu
3b4ca9e649
drm/amd/powerplay: add dummy pp table for raven. (v2)
...
As there is no PPTable in RV, it is difficult to
cleanly decouple PPTABLE functionality in existing
codes.
v2: agd: squash in clean build fix
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-08-29 15:28:01 -04:00
Rex Zhu
e154162ef7
drm/amd/powerplay: refine pp code for raven
...
delete useless code.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-08-29 15:28:00 -04:00
Alex Deucher
ffe6d881e9
drm/amdgpu/gfx9: adjust mqd allocation size
...
To allocate additional space for the dynamic cu masks.
Confirmed with the hw team that we only need 1 dword
for the mask. The mask is the same for each SE so
you only need 1 dword.
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-08-29 15:28:00 -04:00
Alex Deucher
29696bd680
drm/amdgpu/gfx9: update mqd to include dynamic CU mask
...
Necessary for proper operation with KIQ.
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-08-29 15:27:59 -04:00
Alex Deucher
31bf29ab39
drm/amdgpu/gfx8: drop cz mqd
...
It was unused and according to hw team, it's the same for
all asics in a gfx family so remove it.
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-08-29 15:27:58 -04:00