]> Git Repo - linux.git/log
linux.git
8 years agodrm/i915: Combine loops within i915_gem_evict_something
Chris Wilson [Thu, 4 Aug 2016 15:32:17 +0000 (16:32 +0100)]
drm/i915: Combine loops within i915_gem_evict_something

Slight micro-optimise to produce combine loops so that gcc is able to
optimise the inner-loops concisely. Since we are reviewing the loops, we
can update the comments to describe the current state of affairs, in
particular the distinction between evicting from the global GTT (which
may contain untracked items and transient global pins) and the
per-process GTT.

Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Acquire audio powerwell for HD-Audio registers
Chris Wilson [Wed, 3 Aug 2016 16:09:00 +0000 (17:09 +0100)]
drm/i915: Acquire audio powerwell for HD-Audio registers

On Haswell/Broadwell, the HD-Audio block is inside the HDMI/display
power well and so the sna-hda audio codec acquires the display power
well while it is operational. However, Skylake separates the powerwells
again, but yet we still need the audio powerwell to setup the registers.
(But then the hardware uses those registers even while powered off???)

Acquiring the powerwell around setting the chicken bits when setting up
the audio channel does at least silence the WARNs from touching our
registers whilst unpowered. We silence our own test cases, but maybe
there is a latent bug in using the audio channel?

v2: Grab both rpm wakelock and audio wakelock

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96214
Fixes: 03b135cebc47 "ALSA: hda - remove dependency on i915 power well for SKL")
Signed-off-by: Chris Wilson <[email protected]>
Cc: Libin Yang <[email protected]>
Cc: Takashi Iwai <[email protected]>
Cc: Marius Vlad <[email protected]>
Tested-by: Hans de Goede <[email protected]>
Cc: [email protected]
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Daniel Vetter <[email protected]>
8 years agodrm/i915: Don't try to ack sink irqs when there are none
Ville Syrjälä [Thu, 28 Jul 2016 14:50:47 +0000 (17:50 +0300)]
drm/i915: Don't try to ack sink irqs when there are none

My ASUS PB278 at least doesn't seem to appreciate when you try to
ack sink irqs when there are none. Results in this sort of dmesg spam
[drm:drm_dp_dpcd_access] too many retries, giving up

Let's skip the ack if there are no pending irqs. I have no clue why we
do this in two places. One of them likely should just go away. Oh, and
MST has its own sink irq handler too...

Signed-off-by: Ville Syrjälä <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Daniel Vetter <[email protected]>
8 years agodrm/i915: Remove useless rate_to_index() usage
Ville Syrjälä [Thu, 28 Jul 2016 14:50:45 +0000 (17:50 +0300)]
drm/i915: Remove useless rate_to_index() usage

No need to iterate the rates array in intel_dp_max_link_rate(). We know
the max rate will be the last entry, and we already know the size.

Cc: Ander Conselvan de Oliveira <[email protected]>
Cc: Jim Bride <[email protected]>
Cc: Manasi D Navare <[email protected]>
Cc: Durgadoss R <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Daniel Vetter <[email protected]>
8 years agodrm/i915: Allow MST sinks to work even if drm_probe_ddc() fails
Ville Syrjälä [Fri, 29 Jul 2016 13:51:16 +0000 (16:51 +0300)]
drm/i915: Allow MST sinks to work even if drm_probe_ddc() fails

With HSW + Dell UP2414Q (at least) drm_probe_ddc() occasionally fails,
and then we'll assume that the entire display has been disconnected.
We don't need the EDID from the main link, so we can simply check if
the sink is MST capable, and if so treat is as connected.

v2: Skip drm_probe_ddc() entirely for MST (Daniel)

Cc: Ander Conselvan de Oliveira <[email protected]>
Cc: Jim Bride <[email protected]>
Cc: Manasi D Navare <[email protected]>
Cc: Durgadoss R <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
Reviewed-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Track active streams also for DP SST
Ville Syrjälä [Thu, 28 Jul 2016 14:50:41 +0000 (17:50 +0300)]
drm/i915: Track active streams also for DP SST

s/active_mst_links/active_streams/ and use it also for SST. We can then
use this information in the hpd handling to see if the link is active
or not, and thus whether we may need to retrain.

Cc: Ander Conselvan de Oliveira <[email protected]>
Cc: Jim Bride <[email protected]>
Cc: Manasi D Navare <[email protected]>
Cc: Durgadoss R <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Daniel Vetter <[email protected]>
8 years agodrm/i915: Reject mixing MST and SST/HDMI on the same digital port
Ville Syrjälä [Thu, 28 Jul 2016 14:50:40 +0000 (17:50 +0300)]
drm/i915: Reject mixing MST and SST/HDMI on the same digital port

We can't mix MST with SST/HDMI on the same physical port, so we'll need
to reject such configurations in check_digital_port_conflicts(). Nothing
else will prevent this as MST has its fake encoders and its own connectors
so the cloning checks won't catch this.

The same digital port can be used multiple times, but only if all the
encoders involved are MST encoders, so we only want to check MST vs.
SST/HDMI, not MST vs. MST. And SST/HDMI vs. SST/HDMI we already check.

Cc: Maarten Lankhorst <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Maarten Lankhorst <[email protected]>
Reviewed-by: Daniel Vetter <[email protected]>
8 years agodrm/i915: Avoid mixing up SST and MST in DDI setup
Ville Syrjälä [Thu, 28 Jul 2016 14:50:39 +0000 (17:50 +0300)]
drm/i915: Avoid mixing up SST and MST in DDI setup

The MST vs. SST selection should depend purely on the choice of the
connector/encoder. So don't try to determine the correct DDI mode
based on the intel_dp->is_mst, which simply tells us whether the sink
is in MST mode or not. Instead derive the information from the encoder
type. Since the link training code deals in non-fake encoders, we'll
also need to keep a second copy of that information around, which we'll
now designate as 'link_mst'.

Cc: Maarten Lankhorst <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Maarten Lankhorst <[email protected]>
Reviewed-by: Daniel Vetter <[email protected]>
8 years agodrm/i915: Read PSR caps/intermediate freqs/etc. only once on eDP
Ville Syrjälä [Fri, 29 Jul 2016 13:52:39 +0000 (16:52 +0300)]
drm/i915: Read PSR caps/intermediate freqs/etc. only once on eDP

Currently we re-read a bunch of static eDP panel caps from the DPCD
over and over again. Let's do it only once to save some time and effort.

v2: Make thing less confusing with intel_edp_init_dpcd() (Chris)
    Move no_aux_handshake setup in there as well
v3: Move tps3/rate printout to intel_dp_long_pulse() so that
    we'll still get them on eDP as well

Cc: Chris Wilson <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
Reviewed-by: Chris Wilson <[email protected]> (v1)
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Add missing rpm wakelock to GGTT pread
Chris Wilson [Thu, 4 Aug 2016 08:09:53 +0000 (09:09 +0100)]
drm/i915: Add missing rpm wakelock to GGTT pread

Joonas spotted a discrepancy between the pwrite and pread ioctls, in
that pwrite takes the rpm wakelock around its GGTT access, The wakelock
is required in order for the GTT to function. In disregard for the
current convention, we take the rpm wakelock around the access itself
rather than around the struct_mutex as the nesting is not strictly
required and such ordering will one day be fixed by explicitly noting
the barrier dependencies between the GGTT and rpm.

Fixes: b50a53715f09 ("drm/i915: Support for pread/pwrite ...")
Reported-by: Joonas Lahtinen <[email protected]>
Signed-off-by: Chris Wilson <[email protected]>
Cc: Ankitprasad Sharma <[email protected]>
Cc: Tvrtko Ursulin <[email protected]>
Cc: Joonas Lahtinen <[email protected]>
Cc: [email protected]
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Joonas Lahtinen <[email protected]>
8 years agodrm/i915/fbc: FBC causes display flicker when VT-d is enabled on Skylake
Chris Wilson [Thu, 4 Aug 2016 07:43:53 +0000 (08:43 +0100)]
drm/i915/fbc: FBC causes display flicker when VT-d is enabled on Skylake

Erratum SKL075: Display Flicker May Occur When Both VT-d And FBC Are Enabled

"Display flickering may occur when both FBC (Frame Buffer Compression)
and VT - d (Intel® Virtualization Technology for Directed I/O) are enabled
and in use by the display controller."

Ville found the w/a name in the database:
WaFbcTurnOffFbcWhenHyperVisorIsUsed:skl,bxt and also dug out that it
affects Broxton.

v2: Log when the quirk is applied.
v3: Ensure i915.enable_fbc is false when !HAS_FBC()
v4: Fix function name after rebase
v5: Add Broxton to the workaround

Note for backporting to stable, we need to add
  #define mkwrite_device_info(ptr) \
((struct intel_device_info *)INTEL_INFO(ptr))

Signed-off-by: Chris Wilson <[email protected]>
Cc: Paulo Zanoni <[email protected]>
Cc: Ville Syrjälä <[email protected]>
Reviewed-by: Ville Syrjälä <[email protected]>
Cc: [email protected]
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Fix use of engine->index for register offset
Chris Wilson [Wed, 27 Jul 2016 18:11:17 +0000 (19:11 +0100)]
drm/i915: Fix use of engine->index for register offset

Since commit de1add360522 ("drm/i915: Decouple execbuf uAPI from internal
implementation") the index of the engine (its engine->id) in the
internal list no longer matches the hardware id. However, in a couple of
locations we missed fixing up the difference. In this case,
RING_FAULT_REG() refers to engine->id which is now not what the register
offset actually should be. Fortunately, in both case we should be more
or less looping over 0..I915_NUM_ENGINES.

Fixes: de1add360522 ("drm/i915: Decouple execbuf uAPI from internal...")
Signed-off-by: Chris Wilson <[email protected]>
Cc: Joonas Lahtinen <[email protected]>
Cc: Tvrtko Ursulin <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Joonas Lahtinen <[email protected]>
Cc: [email protected]
8 years agoRevert "drm/i915: Clean up associated VMAs on context destruction"
Chris Wilson [Thu, 4 Aug 2016 06:52:47 +0000 (07:52 +0100)]
Revert "drm/i915: Clean up associated VMAs on context destruction"

This reverts commit e9f24d5fb7cf3628b195b18ff3ac4e37937ceeae.

The patch was only a stop-gap measure that fixed half the problem - the
leak of the fbcon when restarting X. A complete solution required
releasing the VMA when the object itself was closed rather than rely on
file/process exit. The previous patches add the VMA tracking necessary
to do close them along with the object, context or file, and so the time
has come to remove the partial fix.

Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Mark the context and address space as closed
Chris Wilson [Thu, 4 Aug 2016 06:52:46 +0000 (07:52 +0100)]
drm/i915: Mark the context and address space as closed

When the user closes the context mark it and the dependent address space
as closed. As we use an asynchronous destruct method, this has two
purposes.  First it allows us to flag the closed context and detect
internal errors if we to create any new objects for it (as it is removed
from the user's namespace, these should be internal bugs only). And
secondly, it allows us to immediately reap stale vma.

Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Release vma when the handle is closed
Chris Wilson [Thu, 4 Aug 2016 06:52:45 +0000 (07:52 +0100)]
drm/i915: Release vma when the handle is closed

In order to prevent a leak of the vma on shared objects, we need to
hook into the object_close callback to destroy the vma on the object for
this file. However, if we destroyed that vma immediately we may cause
unexpected application stalls as we try to unbind a busy vma - hence we
defer the unbind to when we retire the vma.

v2: Keep vma allocated until closed. This is useful for a later
optimisation, but it is required now in order to handle potential
recursion of i915_vma_unbind() by retiring itself.
v3: Comments are important.

Testcase: igt/gem_ppggtt/flink-and-close-vma-leak
Signed-off-by: Chris Wilson <[email protected]>
Cc: Tvrtko Ursulin <[email protected]>
Cc: Daniele Ceraolo Spurio <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Track active vma requests
Chris Wilson [Thu, 4 Aug 2016 06:52:44 +0000 (07:52 +0100)]
drm/i915: Track active vma requests

Hook the vma itself into the i915_gem_request_retire() so that we can
accurately track when a solitary vma is inactive (as opposed to having
to wait for the entire object to be idle). This improves the interaction
when using multiple contexts (with full-ppgtt) and eliminates some
frequent list walking when retiring objects after a completed request.

A side-effect is that we get an active vma reference for free. The
consequence of this is shown in the next patch...

v2: Update inline names to be consistent with
i915_gem_object_get_active()

Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: i915_vma_move_to_active prep patch
Chris Wilson [Thu, 4 Aug 2016 06:52:43 +0000 (07:52 +0100)]
drm/i915: i915_vma_move_to_active prep patch

This patch is broken out of the next just to remove the code motion from
that patch and make it more readable. What we do here is move the
i915_vma_move_to_active() to i915_gem_execbuffer.c and put the three
stages (read, write, fenced) together so that future modifications to
active handling are all located in the same spot. The importance of this
is so that we can more simply control the order in which the requests
are place in the retirement list (i.e. control the order at which we
retire and so control the lifetimes to avoid having to hold onto
references).

Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Move request list retirement to i915_gem_request.c
Chris Wilson [Thu, 4 Aug 2016 06:52:42 +0000 (07:52 +0100)]
drm/i915: Move request list retirement to i915_gem_request.c

As the list retirement is now clean of implementation details, we can
move it closer to the request management.

Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Double check activity before relocations
Chris Wilson [Thu, 4 Aug 2016 06:52:41 +0000 (07:52 +0100)]
drm/i915: Double check activity before relocations

If the object is active and we need to perform a relocation upon it, we
need to take the slow relocation path. Before we do, double check the
active requests to see if they have completed.

Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: s/__i915_wait_request/i915_wait_request/
Chris Wilson [Thu, 4 Aug 2016 06:52:40 +0000 (07:52 +0100)]
drm/i915: s/__i915_wait_request/i915_wait_request/

There is only one wait on request function now, so drop the "expert"
indication of leading __.

Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Disable waitboosting for a saturated engine
Chris Wilson [Thu, 4 Aug 2016 06:52:39 +0000 (07:52 +0100)]
drm/i915: Disable waitboosting for a saturated engine

If the user floods the GPU with so many requests that the engine stalls
waiting for free space, don't automatically promote the GPU to maximum
frequencies. If the GPU really is saturated with work, it will migrate
to high clocks by itself, otherwise it is merely a user flooding us with
busy-work.

Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Move the special case wait-request handling to its one caller
Chris Wilson [Thu, 4 Aug 2016 06:52:38 +0000 (07:52 +0100)]
drm/i915: Move the special case wait-request handling to its one caller

Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Convert intel_overlay to request tracking
Chris Wilson [Thu, 4 Aug 2016 06:52:37 +0000 (07:52 +0100)]
drm/i915: Convert intel_overlay to request tracking

intel_overlay already tracks its last flip request, along with action to
take after its completion. Refactor intel_overlay to reuse the common
i915_gem_active tracker.

v2: Now using i915_gem_retire_fn typedef

References: https://bugs.freedesktop.org/show_bug.cgi?id=93730
References: https://bugs.freedesktop.org/show_bug.cgi?id=96851
Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Track requests inside each intel_ring
Chris Wilson [Thu, 4 Aug 2016 06:52:36 +0000 (07:52 +0100)]
drm/i915: Track requests inside each intel_ring

By tracking each request occupying space inside an individual
intel_ring, we can greatly simplify the logic of tracking available
space and not worry about other timelines. (Each ring is an ordered
timeline of committed requests.)

Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Refactor activity tracking for requests
Chris Wilson [Thu, 4 Aug 2016 06:52:35 +0000 (07:52 +0100)]
drm/i915: Refactor activity tracking for requests

With the introduction of requests, we amplified the number of atomic
refcounted objects we use and update every execbuffer; from none to
several references, and a set of references that need to be changed. We
also introduced interesting side-effects in the order of retiring
requests and objects.

Instead of independently tracking the last request for an object, track
the active objects for each request. The object will reside in the
buffer list of its most recent active request and so we reduce the kref
interchange to a list_move. Now retirements are entirely driven by the
request, dramatically simplifying activity tracking on the object
themselves, and removing the ambiguity between retiring objects and
retiring requests.

Furthermore with the consolidation of managing the activity tracking
centrally, we can look forward to using RCU to enable lockless lookup of
the current active requests for an object. In the future, we will be
able to query the status or wait upon rendering to an object without
even touching the struct_mutex BKL.

All told, less code, simpler and faster, and more extensible.

v2: Add a typedef for the function pointer for convenience later.
v3: Make the noop retirement callback explicit. Allow passing NULL to
the init_request_active() which is expanded to a common noop function.

Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Remove obsolete i915_gem_object_flush_active()
Chris Wilson [Thu, 4 Aug 2016 06:52:34 +0000 (07:52 +0100)]
drm/i915: Remove obsolete i915_gem_object_flush_active()

Since we track requests, and requests are always added to the GPU fully
formed, we never have to flush the incomplete request and know that the
given request will eventually complete without any further action on our
part.

Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Rename request->list to link for consistency
Chris Wilson [Thu, 4 Aug 2016 06:52:33 +0000 (07:52 +0100)]
drm/i915: Rename request->list to link for consistency

We use "list" to denote the list and "link" to denote an element on that
list. Rename request->list to match this idiom.

Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Refactor blocking waits
Chris Wilson [Thu, 4 Aug 2016 06:52:32 +0000 (07:52 +0100)]
drm/i915: Refactor blocking waits

Tidy up the for loops that handle waiting for read/write vs read-only
access.

Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Mark up i915_gem_active for locking annotation
Chris Wilson [Thu, 4 Aug 2016 06:52:31 +0000 (07:52 +0100)]
drm/i915: Mark up i915_gem_active for locking annotation

The future annotations will track the locking used for access to ensure
that it is always sufficient. We make the preparations now to present
the API ahead and to make sure that GCC can eliminate the unused
parameter.

Before: 6298417 3619610  696320 10614347         a1f64b vmlinux
After: 6298417 3619610  696320 10614347         a1f64b vmlinux
(with i915 builtin)

Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Prepare i915_gem_active for annotations
Chris Wilson [Thu, 4 Aug 2016 06:52:30 +0000 (07:52 +0100)]
drm/i915: Prepare i915_gem_active for annotations

In the future, we will want to add annotations to the i915_gem_active
struct. The API is thus expanded to hide direct access to the contents
of i915_gem_active and mediated instead through a number of helpers.

Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Introduce i915_gem_active for request tracking
Chris Wilson [Thu, 4 Aug 2016 06:52:29 +0000 (07:52 +0100)]
drm/i915: Introduce i915_gem_active for request tracking

In the next patch, request tracking is made more generic and for that we
need a new expanded struct and to separate out the logic changes from
the mechanical churn, we split out the structure renaming into this
patch.

v2: Writer's block. Add some spiel about why we track requests.
v3: Now i915_gem_active.
v4: Now with i915_gem_active_set() for attaching to the active request.
v5: Use i915_gem_active_set() from inside the retirement handlers

Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Kill drop_pages()
Chris Wilson [Thu, 4 Aug 2016 06:52:28 +0000 (07:52 +0100)]
drm/i915: Kill drop_pages()

The drop_pages() function is a dangerous trap in that it can release the
passed in object pointer and so unless the caller is aware, it can
easily trick us into using the stale object afterwards. Move it into its
solitary callsite where we know it is safe.

Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Tvrtko Ursulin <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Be more careful when unbinding vma
Chris Wilson [Thu, 4 Aug 2016 06:52:27 +0000 (07:52 +0100)]
drm/i915: Be more careful when unbinding vma

When we call i915_vma_unbind(), we will wait upon outstanding rendering.
This will also trigger a retirement phase, which may update the object
lists. If, we extend request tracking to the VMA itself (rather than
keep it at the encompassing object), then there is a potential that the
obj->vma_list be modified for other elements upon i915_vma_unbind(). As
a result, if we walk over the object list and call i915_vma_unbind(), we
need to be prepared for that list to change.

Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Tvrtko Ursulin <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Count how many VMA are bound for an object
Chris Wilson [Thu, 4 Aug 2016 06:52:26 +0000 (07:52 +0100)]
drm/i915: Count how many VMA are bound for an object

Since we may have VMA allocated for an object, but we interrupted their
binding, there is a disparity between have elements on the obj->vma_list
and being bound. i915_gem_obj_bound_any() does this check, but this is
not rigorously observed - add an explicit count to make it easier.

Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Tvrtko Ursulin <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Store owning file on the i915_address_space
Chris Wilson [Thu, 4 Aug 2016 06:52:25 +0000 (07:52 +0100)]
drm/i915: Store owning file on the i915_address_space

For the global GTT (and aliasing GTT), the address space is owned by the
device (it is a global resource) and so the per-file owner field is
NULL. For per-process GTT (where we create an address space per
context), each is owned by the opening file. We can use this ownership
information to both distinguish GGTT and ppGTT address spaces, as well
as occasionally inspect the owner.

v2: Whitespace, tells us who owns i915_address_space

Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Rearrange GGTT probing to avoid needing a vfunc
Chris Wilson [Thu, 4 Aug 2016 06:52:24 +0000 (07:52 +0100)]
drm/i915: Rearrange GGTT probing to avoid needing a vfunc

Since we have a static if-else-chain for device probing of the global
GTT, we do not need to use a function pointer, let alone store it when
we never use it again. So use the if-else-chain to call down into the
device specific probe.

Signed-off-by: Chris Wilson <[email protected]>
Cc: Joonas Lahtinen <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Split early global GTT initialisation
Chris Wilson [Thu, 4 Aug 2016 06:52:23 +0000 (07:52 +0100)]
drm/i915: Split early global GTT initialisation

Initialising the global GTT is tricky as we wish to use the drm_mm range
manager during the modesetting initialisation (to capture stolen
allocations from the BIOS) before we actually enable GEM. To overcome
this, we currently setup the drm_mm first and then carefully rebind
them.

v2: Fixup after rebasing
v3: GGTT initialisation needs to be split around kicking out conflicts
v4: Restore an old UMS BUG_ON(mappable > total) as a DRM_ERROR plus
fixup of probe results.

Signed-off-by: Chris Wilson <[email protected]>
Cc: Joonas Lahtinen <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Update GGTT initialisation functions to take drm_i915_private
Chris Wilson [Thu, 4 Aug 2016 06:52:22 +0000 (07:52 +0100)]
drm/i915: Update GGTT initialisation functions to take drm_i915_private

Since these are internal functions they operate on drm_i915_private and
not the drm_device being passed in. So pass in the drm_i915_private
instead, and remove one layer of dancing. No space wins here, just
conforming to the norm in function parameters.

v2: Include all the probe functions

Signed-off-by: Chris Wilson <[email protected]>
Cc: Joonas Lahtinen <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Split GGTT initialisation between probing and setup
Chris Wilson [Thu, 4 Aug 2016 06:52:21 +0000 (07:52 +0100)]
drm/i915: Split GGTT initialisation between probing and setup

In order to handle conflicting drivers (i.e. vgacon) having a different
setup of hardware, we have to remove those other drivers before we try
to setup our own mappings. This requires us to split GGTT initialisation
between probing for the hardware location (part of the PCI BAR) and
later establishing the kernel resources for it.

Signed-off-by: Chris Wilson <[email protected]>
Cc: Joonas Lahtinen <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Amalgamate GGTT/ppGTT vma debug list walkers
Chris Wilson [Thu, 4 Aug 2016 06:52:20 +0000 (07:52 +0100)]
drm/i915: Amalgamate GGTT/ppGTT vma debug list walkers

As we can now have multiple VMA inside the global GTT (with partial
mappings, rotations, etc), it is no longer true that there may just be a
single GGTT entry and so we should walk the full vma_list to count up
the actual usage. In addition to unifying the two walkers, switch from
multiplying the object size for each vma to summing the bound vma sizes.

Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Clean up the extra RPM ref on CHV with i915.enable_rc6=0
Ville Syrjälä [Tue, 2 Aug 2016 11:07:33 +0000 (14:07 +0300)]
drm/i915: Clean up the extra RPM ref on CHV with i915.enable_rc6=0

Remove the CHV early bail out from intel_cleanup_gt_powersave() so that
we'll clean up the extra RPM reference held due to i915.enable_rc6=0.

Cc: Imre Deak <[email protected]>
Fixes: b268c699aca5 ("drm/i915: refactor RPM disabling due to RC6 being disabled")
Signed-off-by: Ville Syrjälä <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Imre Deak <[email protected]>
8 years agodrm/i915: Move the common engine cleanup to intel_engine_cs.c
Chris Wilson [Wed, 3 Aug 2016 12:19:16 +0000 (13:19 +0100)]
drm/i915: Move the common engine cleanup to intel_engine_cs.c

Now that we initialize the state to both legacy and execlists inside
intel_engine_cs, we should also clean up that state from the common
functions.

Signed-off-by: Chris Wilson <[email protected]>
Cc: Joonas Lahtinen <[email protected]>
Cc: Tvrtko Ursulin <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Joonas Lahtinen <[email protected]>
8 years agodrm/i915: Rename engine->semaphore.sync_to, engine->sempahore.signal locals
Chris Wilson [Tue, 2 Aug 2016 21:50:40 +0000 (22:50 +0100)]
drm/i915: Rename engine->semaphore.sync_to, engine->sempahore.signal locals

In order to be more consistent with the rest of the request construction
and ring emission, use the common names for the ring and request.

Rather than using signaler_req, waiter_req, and intel_ring *wait, we use
plain req and ring.

Signed-off-by: Chris Wilson <[email protected]>
Cc: Joonas Lahtinen <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Simplify calling engine->sync_to
Chris Wilson [Tue, 2 Aug 2016 21:50:39 +0000 (22:50 +0100)]
drm/i915: Simplify calling engine->sync_to

Since requests can no longer be generated as a side-effect of
intel_ring_begin(), we know that the seqno will be unchanged during
ring-emission. This predicatablity then means we do not have to check
for the seqno wrapping around whilst emitting the semaphore for
engine->sync_to().

Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Unify legacy/execlists submit_execbuf callbacks
Chris Wilson [Tue, 2 Aug 2016 21:50:38 +0000 (22:50 +0100)]
drm/i915: Unify legacy/execlists submit_execbuf callbacks

Now that emitting requests is identical between legacy and execlists, we
can use the same function to build up the ring for submitting to either
engine. (With the exception of i915_switch_contexts(), but in time that
will also be handled gracefully.)

Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Refactor golden render state emission to unconfuse gcc
Chris Wilson [Tue, 2 Aug 2016 21:50:37 +0000 (22:50 +0100)]
drm/i915: Refactor golden render state emission to unconfuse gcc

GCC was inlining the init and setup functions, but was getting itself
confused into thinking that variables could be used uninitialised. If we
do the inline for gcc, it is happy! As a bonus we shrink the code.

v2: A couple of minor tweaks from Joonas

Signed-off-by: Chris Wilson <[email protected]>
Cc: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Remove duplicate golden render state init from execlists
Chris Wilson [Tue, 2 Aug 2016 21:50:36 +0000 (22:50 +0100)]
drm/i915: Remove duplicate golden render state init from execlists

Now that we use the same vfuncs for emitting the batch buffer in both
execlists and legacy, the golden render state initialisation is
identical between both.

v2: gcc wants so.ggtt_offset initialised (even though it is not used)

Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915/ringbuffer: Specialise SNB+ request emission for semaphores
Chris Wilson [Tue, 2 Aug 2016 21:50:35 +0000 (22:50 +0100)]
drm/i915/ringbuffer: Specialise SNB+ request emission for semaphores

As gen6_emit_request() only differs from i9xx_emit_request() when
semaphores are enabled, only use the specialised vfunc in that scenario.

v2: Reorder semaphore init so as to keep engine->emit_request default
vfunc selection compact.

Signed-off-by: Chris Wilson <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Reuse legacy breadcrumbs + tail emission
Chris Wilson [Tue, 2 Aug 2016 21:50:34 +0000 (22:50 +0100)]
drm/i915: Reuse legacy breadcrumbs + tail emission

As GEN6+ is now a simple variant on the basic breadcrumbs + tail write,
reuse the common code.

Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Stop passing caller's num_dwords to engine->semaphore.signal()
Chris Wilson [Tue, 2 Aug 2016 21:50:33 +0000 (22:50 +0100)]
drm/i915: Stop passing caller's num_dwords to engine->semaphore.signal()

Rather than pass in the num_dwords that the caller wishes to use after
the signal command packet, split the breadcrumb emission into two phases
and have both the signal and breadcrumb individiually acquire space on
the ring. This makes the interface simpler for the reader, and will
simplify for patches.

Signed-off-by: Chris Wilson <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915/lrc: Update function names to match request flow
Chris Wilson [Tue, 2 Aug 2016 21:50:32 +0000 (22:50 +0100)]
drm/i915/lrc: Update function names to match request flow

With adding engine->submit_request, we now have a bunch of functions
with similar names used at different stages of the execlist submission.
Try a different coat of paint, to hopefully reduce confusion between the
requests, intel_engine_cs and the actual execlists submision process.

Signed-off-by: Chris Wilson <[email protected]>
Cc: Joonas Lahtinen <[email protected]>
Cc: Tvrtko Ursulin <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Unify request submission
Chris Wilson [Tue, 2 Aug 2016 21:50:31 +0000 (22:50 +0100)]
drm/i915: Unify request submission

Move request submission from emit_request into its own common vfunc
from i915_add_request().

v2: Convert I915_DISPATCH_flags to BIT(x) whilst passing
v3: Rename a few functions to match.
v4: Reenable execlists submission after disabling guc.
v5: Be aware that everyone calls i915_guc_submission_disable()!

Signed-off-by: Chris Wilson <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Move the modulus for ring emission to the register write
Chris Wilson [Tue, 2 Aug 2016 21:50:30 +0000 (22:50 +0100)]
drm/i915: Move the modulus for ring emission to the register write

Space reservation is already safe with respect to the ring->size
modulus, but hardware only expects to see values in the range
0...ring->size-1 (inclusive) and so requires the modulus to prevent us
writing the value ring->size instead of 0. As this is only required for
the register itself, we can defer the modulus to the register update and
not perform it after every command packet. We keep the
intel_ring_advance() around in the code to provide demarcation for the
end-of-packet (which then can be compared against intel_ring_begin() as
the number of dwords emitted must match the reserved space).

v2: Assert that the ring size is a power-of-two to match assumptions in
the code. Simplify the comment before writing the tail value to explain
why the modulus is necessary.

Signed-off-by: Chris Wilson <[email protected]>
Cc: Joonas Lahtinen <[email protected]>
Cc: Dave Gordon <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Convert engine->write_tail to operate on a request
Chris Wilson [Tue, 2 Aug 2016 21:50:29 +0000 (22:50 +0100)]
drm/i915: Convert engine->write_tail to operate on a request

If we rewrite the I915_WRITE_TAIL specialisation for the legacy
ringbuffer as submitting the request onto the ringbuffer, we can unify
the vfunc with both execlists and GuC in the next patch.

v2: Drop the modulus from the I915_WRITE_TAIL as it is currently being
applied in intel_ring_advance() after every command packet, and add a
comment explaining why we need the modulus at all.

Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Remove intel_ring_get_tail()
Chris Wilson [Tue, 2 Aug 2016 21:50:28 +0000 (22:50 +0100)]
drm/i915: Remove intel_ring_get_tail()

Joonas doesn't like the tiny function, especially if I go around making
it more complicated and using it elsewhere. To remove that temptation,
remove the function!

Signed-off-by: Chris Wilson <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Unify legacy/execlists emission of MI_BATCHBUFFER_START
Chris Wilson [Tue, 2 Aug 2016 21:50:27 +0000 (22:50 +0100)]
drm/i915: Unify legacy/execlists emission of MI_BATCHBUFFER_START

Both the ->dispatch_execbuffer and ->emit_bb_start callbacks do exactly
the same thing, add MI_BATCHBUFFER_START to the request's ringbuffer -
we need only one vfunc.

Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Simplify request_alloc by returning the allocated request
Chris Wilson [Tue, 2 Aug 2016 21:50:26 +0000 (22:50 +0100)]
drm/i915: Simplify request_alloc by returning the allocated request

If is simpler and leads to more readable code through the callstack if
the allocation returns the allocated struct through the return value.

The importance of this is that it no longer looks like we accidentally
allocate requests as side-effect of calling certain functions.

Signed-off-by: Chris Wilson <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Reduce engine->emit_flush() to a single mode parameter
Chris Wilson [Tue, 2 Aug 2016 21:50:25 +0000 (22:50 +0100)]
drm/i915: Reduce engine->emit_flush() to a single mode parameter

Rather than passing a complete set of GPU cache domains for either
invalidation or for flushing, or even both, just pass a single parameter
to the engine->emit_flush to determine the required operations.

engine->emit_flush(GPU, 0) -> engine->emit_flush(EMIT_INVALIDATE)
engine->emit_flush(0, GPU) -> engine->emit_flush(EMIT_FLUSH)
engine->emit_flush(GPU, GPU) -> engine->emit_flush(EMIT_FLUSH | EMIT_INVALIDATE)

This allows us to extend the behaviour easily in future, for example if
we want just a command barrier without the overhead of flushing.

Signed-off-by: Chris Wilson <[email protected]>
Cc: Dave Gordon <[email protected]>
Cc: Joonas Lahtinen <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Remove obsolete engine->gpu_caches_dirty
Chris Wilson [Tue, 2 Aug 2016 21:50:24 +0000 (22:50 +0100)]
drm/i915: Remove obsolete engine->gpu_caches_dirty

Space for flushing the GPU cache prior to completing the request is
preallocated and so cannot fail - the GPU caches will always be flushed
along with the completed request. This means we no longer have to track
whether the GPU cache is dirty between batches like we had to with the
outstanding_lazy_seqno.

With the removal of the duplication in the per-backend entry points for
emitting the obsolete lazy flush, we can then further unify the
engine->emit_flush.

v2: Expand a bit on the legacy of gpu_caches_dirty

Signed-off-by: Chris Wilson <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Rename intel_pin_and_map_ring()
Chris Wilson [Tue, 2 Aug 2016 21:50:23 +0000 (22:50 +0100)]
drm/i915: Rename intel_pin_and_map_ring()

For more consistent oop-naming, we would use intel_ring_verb, so pick
intel_ring_pin() and intel_ring_unpin().

Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Rename residual ringbuf parameters
Chris Wilson [Tue, 2 Aug 2016 21:50:22 +0000 (22:50 +0100)]
drm/i915: Rename residual ringbuf parameters

Now that we have a clear ring/engine split and a struct intel_ring, we
no longer need the stopgap ringbuf names.

Signed-off-by: Chris Wilson <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Rename struct intel_ringbuffer to struct intel_ring
Chris Wilson [Tue, 2 Aug 2016 21:50:21 +0000 (22:50 +0100)]
drm/i915: Rename struct intel_ringbuffer to struct intel_ring

The state stored in this struct is not only the information about the
buffer object, but the ring used to communicate with the hardware. Using
buffer here is overly specific and, for me at least, conflates with the
notion of buffer objects themselves.

s/struct intel_ringbuffer/struct intel_ring/
s/enum intel_ring_hangcheck/enum intel_engine_hangcheck/
s/describe_ctx_ringbuf()/describe_ctx_ring()/
s/intel_ring_get_active_head()/intel_engine_get_active_head()/
s/intel_ring_sync_index()/intel_engine_sync_index()/
s/intel_ring_init_seqno()/intel_engine_init_seqno()/
s/ring_stuck()/engine_stuck()/
s/intel_cleanup_engine()/intel_engine_cleanup()/
s/intel_stop_engine()/intel_engine_stop()/
s/intel_pin_and_map_ringbuffer_obj()/intel_pin_and_map_ring()/
s/intel_unpin_ringbuffer()/intel_unpin_ring()/
s/intel_engine_create_ringbuffer()/intel_engine_create_ring()/
s/intel_ring_flush_all_caches()/intel_engine_flush_all_caches()/
s/intel_ring_invalidate_all_caches()/intel_engine_invalidate_all_caches()/
s/intel_ringbuffer_free()/intel_ring_free()/

Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Rename intel_context[engine].ringbuf
Chris Wilson [Tue, 2 Aug 2016 21:50:20 +0000 (22:50 +0100)]
drm/i915: Rename intel_context[engine].ringbuf

Perform s/ringbuf/ring/ on the context struct for consistency with the
ring/engine split.

v2: Kill an outdated error_ringbuf label

Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Rename request->ringbuf to request->ring
Chris Wilson [Tue, 2 Aug 2016 21:50:19 +0000 (22:50 +0100)]
drm/i915: Rename request->ringbuf to request->ring

Now that we have disambuigated ring and engine, we can use the clearer
and more consistent name for the intel_ringbuffer pointer in the
request.

@@
struct drm_i915_gem_request *r;
@@
- r->ringbuf
+ r->ring

Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Unify intel_logical_ring_emit and intel_ring_emit
Chris Wilson [Tue, 2 Aug 2016 21:50:18 +0000 (22:50 +0100)]
drm/i915: Unify intel_logical_ring_emit and intel_ring_emit

Both perform the same actions with more or less indirection, so just
unify the code.

v2: Add back a few intel_engine_cs locals

Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915/gen9: Update i915_drpc_info debugfs for coarse pg & forcewake info
Akash Goel [Mon, 27 Jun 2016 14:40:01 +0000 (20:10 +0530)]
drm/i915/gen9: Update i915_drpc_info debugfs for coarse pg & forcewake info

Updated the i915_drpc_info debugfs with coarse power gating & forcewake
info for Gen9.

v2: Change all IS_GEN9() by gen >= 9 (Damien)

v3: Rebase

Cc: Damien Lespiau <[email protected]>
Signed-off-by: Akash Goel <[email protected]>
Reviewed-by: Sagar Arun Kamble <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: cleanup_plane_fb: also drop reference to current state wait_req
Keith Packard [Sun, 31 Jul 2016 07:54:51 +0000 (00:54 -0700)]
drm/i915: cleanup_plane_fb: also drop reference to current state wait_req

There are two paths into intel_cleanup_plane_fb, the normal completion
path and the failure path.

In the failure case, intel_cleanup_plane_fb is called before
drm_atomic_helper_swap_state, so any wait_req reference made in
intel_prepare_plane_fb will be in old_intel_state->wait_req.

In the normal completion path, drm_atomic_helper_swap_state has
already been called, so the plane state holding the just-used wait_req
will not be in old_intel_state->wait_req, rather it will be in the
state associated with the plane itself.

Clearing this reference ensures that the wait_req will be freed as
soon as it the related mode setting operation is complete, rather than
waiting for some future mode setting operation to eventually
dereference it.

The existing dereference of old_intel_state->wait_req is still
required as that will hold the wait_req when the mode setting
operation fails.

cc: Daniel Vetter <[email protected]>
cc: David Airlie <[email protected]>
cc: [email protected]
cc: [email protected]
Signed-off-by: Keith Packard <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
8 years agodrm/i915: Warn about aux msg buffer vs. size mismatch
Ville Syrjälä [Thu, 28 Jul 2016 14:55:04 +0000 (17:55 +0300)]
drm/i915: Warn about aux msg buffer vs. size mismatch

If we have have a buffer, we should also have a size, and vice versa.
Let's check it both ways instead of just one.

Signed-off-by: Ville Syrjälä <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Daniel Vetter <[email protected]>
8 years agodrm/i915: Program FW_BLC_SELF on 915G as well
Ville Syrjälä [Fri, 29 Jul 2016 14:57:02 +0000 (17:57 +0300)]
drm/i915: Program FW_BLC_SELF on 915G as well

According to Bspec FW_BLC_SELF exists on 915G also. Let's program it.
The only open question is whether there's is a memory self-refresh
enable bit somewhere as well. For 945G/GM it's in FW_BLC_SELF, for
915GM it's in INSTPM. For 915G I can't find one in the docs. Let's drop
a FIXME about this, in case someone with the hardware is ever bored
enough to look for it.

Cc: Daniel Vetter <[email protected]>
Cc: Chris Wilson <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Chris Wilson <[email protected]>
8 years agodrm/i915: Always use cpp==4 for FW_BLC_SELF on 915GM/945GM
Ville Syrjälä [Fri, 29 Jul 2016 14:57:01 +0000 (17:57 +0300)]
drm/i915: Always use cpp==4 for FW_BLC_SELF on 915GM/945GM

Bspec says:
"FW_BLC_SELF
 ...
 Programming Note [DevALV] and [DevCST]: When calculating watermark
 values for 15/16bpp, assume 32bpp for purposes of calculation using
 the high priority bandwidth analysis spreadsheet."

Let's do that.

Perhaps this might even help with the problem that resulted in
commit 2ab1bc9df01d ("drm/i915: Disable self-refresh for untiled fbs on i915gm")

Cc: Daniel Vetter <[email protected]>
Cc: Chris Wilson <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Chris Wilson <[email protected]>
8 years agodrm/i915: Extract bdw_get_buf_trans_edp()
Ville Syrjälä [Tue, 12 Jul 2016 12:59:36 +0000 (15:59 +0300)]
drm/i915: Extract bdw_get_buf_trans_edp()

Make the BDW and SKL code a bit more similar by extracting the
low vswing handling for BDW into a helper, as we already have
it like that for SKL+.

Cc: Mika Kahola <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Imre Deak <[email protected]>
8 years agodrm/i915: Simplify intel_ddi_get_encoder_port()
Ville Syrjälä [Tue, 12 Jul 2016 12:59:35 +0000 (15:59 +0300)]
drm/i915: Simplify intel_ddi_get_encoder_port()

We no longer have any need to look up the intel_digital_port based
on the passed in intel_encoder, but we still want to look up the port.
Let's just move that logic into intel_ddi_get_encoder_port() and drop
the dig_port stuff.

Signed-off-by: Ville Syrjälä <[email protected]>
Reviewed-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Get the iboost setting based on the port type
Ville Syrjälä [Tue, 12 Jul 2016 12:59:34 +0000 (15:59 +0300)]
drm/i915: Get the iboost setting based on the port type

Program the 'iboost_bit' based on what the VBT says it should be for
the specific port type, rather than assume it's always the same
for DP and HDMI.

Signed-off-by: Ville Syrjälä <[email protected]>
Reviewed-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Split DP/eDP/FDI and HDMI/DVI DDI buffer programming apart
Ville Syrjälä [Tue, 12 Jul 2016 12:59:33 +0000 (15:59 +0300)]
drm/i915: Split DP/eDP/FDI and HDMI/DVI DDI buffer programming apart

DDI buffer prorgramming works quite differently depending on
the mode of the DDI port (DP/eDP/FDI vs. HDMI/DVI). Let's split
the function that does the programming into two matching variants
as well.

Signed-off-by: Ville Syrjälä <[email protected]>
Reviewed-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Explicitly use ddi buf trans entry 9 for hdmi
Ville Syrjälä [Tue, 12 Jul 2016 12:59:32 +0000 (15:59 +0300)]
drm/i915: Explicitly use ddi buf trans entry 9 for hdmi

When the DDI port is in HDMI/DVI mode, it automagically uses the buffer
translations values from entry 9. Let's make that explicit in the code.

Signed-off-by: Ville Syrjälä <[email protected]>
Reviewed-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Move bxt_ddi_vswing_sequence() call into intel_ddi_pre_enable() for HDMI
Ville Syrjälä [Tue, 12 Jul 2016 12:59:31 +0000 (15:59 +0300)]
drm/i915: Move bxt_ddi_vswing_sequence() call into intel_ddi_pre_enable() for HDMI

Now that the SKL iboost programming is done from intel_ddi_pre_enable()
for HDMI, let's move the BXT bxt_ddi_vswing_sequence() call there as
well. This makes things look more similar to the DP/eDP case which
is handled in ddi_signal_levels().

Cc: Imre Deak <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Imre Deak <[email protected]>
8 years agodrm/i915: Program iboost settings for HDMI/DVI on SKL
Ville Syrjälä [Tue, 12 Jul 2016 12:59:30 +0000 (15:59 +0300)]
drm/i915: Program iboost settings for HDMI/DVI on SKL

Currently we fail to program the iboost stuff for HDMI/DVI. Let's remedy
that.

Cc: [email protected]
Fixes: f8896f5d58e6 ("drm/i915/skl: Buffer translation improvements")
Cc: David Weinehall <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: David Weinehall <[email protected]>
8 years agodrm/i915: Name the "iboost bit"
Ville Syrjälä [Tue, 12 Jul 2016 12:59:29 +0000 (15:59 +0300)]
drm/i915: Name the "iboost bit"

Give a proper name for the SKL DDI_BUF_TRANS iboost bit.

Cc: David Weinehall <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: David Weinehall <[email protected]>
8 years agodrm/i915: Fix iboost setting for DDI with 4 lanes on SKL
Ville Syrjälä [Tue, 12 Jul 2016 12:59:28 +0000 (15:59 +0300)]
drm/i915: Fix iboost setting for DDI with 4 lanes on SKL

Bspec says:
"For DDIA with x4 capability (DDI_BUF_CTL DDIA Lane Capability Control =
 DDIA x4), the I_boost value has to be programmed in both
 tx_blnclegsctl_0 and tx_blnclegsctl_4."

Currently we only program tx_blnclegsctl_0. Let's do the other one as
well.

Cc: [email protected]
Fixes: f8896f5d58e6 ("drm/i915/skl: Buffer translation improvements")
Cc: David Weinehall <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: David Weinehall <[email protected]>
8 years agodrm/i915: remove redundant fbc warnings
Matthew Auld [Tue, 5 Jul 2016 09:28:34 +0000 (10:28 +0100)]
drm/i915: remove redundant fbc warnings

The fbc enabled/active sanity checks are already done in
__intel_fbc_disable so no need to do them again.

Signed-off-by: Matthew Auld <[email protected]>
Reviewed-by: Paulo Zanoni <[email protected]>
Signed-off-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Protect older gen against intel_gt_init_powersave()
Chris Wilson [Tue, 2 Aug 2016 10:15:27 +0000 (11:15 +0100)]
drm/i915: Protect older gen against intel_gt_init_powersave()

In the middle of intel_gt_init_powersave() we have an if-chain that ends
with a universal else clause to read gen6+ registers. Older platforms
like Pineview that end up here do not like those registers and may even
OOPS whilst reading them!

Fixes: 3ea9a80132 ("drm/i915: Perform static RPS frequency setup ...")
Signed-off-by: Chris Wilson <[email protected]>
Cc: Ville Syrjälä <[email protected]>
Cc: Mika Kuoppala <[email protected]>
Cc: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Ville Syrjälä <[email protected]>
8 years agodrm/i915/debugfs: Take runtime_pm ref for sseu
David Weinehall [Mon, 1 Aug 2016 14:33:27 +0000 (17:33 +0300)]
drm/i915/debugfs: Take runtime_pm ref for sseu

When reading the SSEU statistics, we need to call
intel_runtime_pm_get() first, otherwise we might end up
triggering "Device suspended during HW access".

Signed-off-by: David Weinehall <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/1470062007-26996-1-git-send-email-david.weinehall@linux.intel.com
Reviewed-by: Joonas Lahtinen <[email protected]>
Signed-off-by: Chris Wilson <[email protected]>
8 years agoMerge tag 'imx-drm-fixes-2016-07-27' of git://git.pengutronix.de/git/pza/linux into...
Dave Airlie [Fri, 29 Jul 2016 19:45:30 +0000 (05:45 +1000)]
Merge tag 'imx-drm-fixes-2016-07-27' of git://git.pengutronix.de/git/pza/linux into drm-next

imx-drm ldb mode set fix

- fix imx-ldb mode setting, which was broken by commit 49f98bc4d44a4 ("drm/imx:
  store internal bus configuration in crtc state")

* tag 'imx-drm-fixes-2016-07-27' of git://git.pengutronix.de/git/pza/linux:
  drm/imx: imx-ldb: do not try to dereference crtc->state->state in encoder mode_set

8 years agoMerge branch 'drm-next-4.8' of git://people.freedesktop.org/~agd5f/linux into drm...
Dave Airlie [Fri, 29 Jul 2016 19:37:36 +0000 (05:37 +1000)]
Merge branch 'drm-next-4.8' of git://people.freedesktop.org/~agd5f/linux into drm-next

A few more patches for amdgpu and radeon for 4.8.  The big change is
the additional power feature enablement for polaris that was pending
the 4.7 back merge.  The rest are mainly bug fixes and cleanups.

* 'drm-next-4.8' of git://people.freedesktop.org/~agd5f/linux: (59 commits)
  drm/amd/powerplay: remove enable_clock_power_gatings_tasks from initialize and resume events
  drm/amd/powerplay: move clockgating to after ungating power in pp for uvd/vce
  drm/amdgpu: add query device id and revision id into system info entry at CGS
  drm/amdgpu: add new definition in bif header
  drm/amd/powerplay: rename smum header guards
  drm/amdgpu: enable UVD context buffer for older HW
  drm/amdgpu: fix default UVD context size
  drm/amdgpu: fix incorrect type of info_id
  drm/amdgpu: make amdgpu_cgs_call_acpi_method as static
  drm/amdgpu: comment out unused defaults_staturn_pro static const structure to fix the build
  drm/amdgpu: enable UVD VM only on polaris
  drm/amdgpu: increase timeout of IB test
  drm/amdgpu: add destroy session when generate VCE destroy msg.
  drm/amd: fix deadlock of job_list_lock V2
  drm/amd: reset hw count when reset job
  drm/amdgpu: free handles after fini the context
  drm/ttm: partial revert "cleanup ttm_tt_(unbind|destroy)" v3
  drm/amdgpu: add a fence timeout for the IB tests v2
  drm/amdgpu: move UVD IB test into common code v2
  drm/amdgpu: use begin/end_use for VCE power/clock gating
  ...

8 years agoMerge tag 'topic/drm-misc-2016-07-28' of git://anongit.freedesktop.org/drm-intel...
Dave Airlie [Fri, 29 Jul 2016 19:26:07 +0000 (05:26 +1000)]
Merge tag 'topic/drm-misc-2016-07-28' of git://anongit.freedesktop.org/drm-intel into drm-next

A few more simple fixes that Sean&I collected. There's a bunch of bigger
things on dri-devel, but I think those are all too late for 4.8 really.
I'll try and go collect them after -rc1 for 4.9.

* tag 'topic/drm-misc-2016-07-28' of git://anongit.freedesktop.org/drm-intel:
  drm/arm: mali-dp: Fix error return code in malidp_bind()
  drm/arm: mali-dp: Remove redundant dev_err call in malidp_bind()
  drm/gma500: remove unnecessary stub for fb_ioctl()
  apple-gmux: Sphinxify docs
  drm/arm: mali-dp: Set crtc.port to the port instead of the endpoint
  drm/sti: use new Reset API
  drm/etnaviv: Optimize error handling in etnaviv_gem_new_userptr()
  drm/etnaviv: Delete unnecessary checks before two function calls
  drm/vmwgfx: Delete an unnecessary check before the function call "vfree"
  drm/qxl: Delete an unnecessary check before drm_gem_object_unreference_unlocked()
  drm/mgag200: Delete an unnecessary check before drm_gem_object_unreference_unlocked()
  drm/bridge: ps8622: Delete an unnecessary check before backlight_device_unregister()
  GPU-DRM-GMA500: Delete unnecessary checks before two function calls
  GPU-DRM-OMAP: Delete unnecessary checks before two function calls

8 years agodrm/amd/powerplay: remove enable_clock_power_gatings_tasks from initialize and resume...
Tom St Denis [Thu, 28 Jul 2016 13:46:28 +0000 (09:46 -0400)]
drm/amd/powerplay: remove enable_clock_power_gatings_tasks from initialize and resume events

Setting PG state this early would cause lock ups in the IP block
initialized functions.

Signed-off-by: Tom St Denis <[email protected]>
Reviewed-by: Rex Zhu <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
8 years agodrm/amd/powerplay: move clockgating to after ungating power in pp for uvd/vce
Tom St Denis [Thu, 28 Jul 2016 13:47:12 +0000 (09:47 -0400)]
drm/amd/powerplay: move clockgating to after ungating power in pp for uvd/vce

Cannot set clockgating state before ungating power.

Signed-off-by: Tom St Denis <[email protected]>
Reviewed-by: Rex Zhu <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
8 years agodrm/amdgpu: add query device id and revision id into system info entry at CGS
Huang Rui [Tue, 12 Jul 2016 05:54:05 +0000 (13:54 +0800)]
drm/amdgpu: add query device id and revision id into system info entry at CGS

This patch adds device id and revision into system info entry at CGS,
it's able to get PCI device id and revision id from amdgpu, it might
get more info in future.

PCI device id will be also used on powerplay part at current.

Suggested-by: Alex Deucher <[email protected]>
Signed-off-by: Huang Rui <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
8 years agodrm/amdgpu: add new definition in bif header
Huang Rui [Thu, 14 Jul 2016 16:31:05 +0000 (00:31 +0800)]
drm/amdgpu: add new definition in bif header

This patch adds new definition in bif header, and will be used on
iceland HW powertune part.

Signed-off-by: Huang Rui <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
8 years agodrm/amd/powerplay: rename smum header guards
Huang Rui [Mon, 25 Jul 2016 08:54:34 +0000 (16:54 +0800)]
drm/amd/powerplay: rename smum header guards

This patch renames the smum header guards to align with the file name.

Reported-by: Edward O'Callaghan <[email protected]>
Signed-off-by: Huang Rui <[email protected]>
Reviewed-by: Ken Wang <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
8 years agodrm/amdgpu: enable UVD context buffer for older HW
Christian König [Tue, 26 Jul 2016 10:05:40 +0000 (12:05 +0200)]
drm/amdgpu: enable UVD context buffer for older HW

Supported starting on certain FW versions.

Signed-off-by: Christian König <[email protected]>
Reviewed-by: Leo Liu <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
8 years agodrm/amdgpu: fix default UVD context size
Christian König [Tue, 26 Jul 2016 08:51:29 +0000 (10:51 +0200)]
drm/amdgpu: fix default UVD context size

Context buffers should be denied by default, not allowed.

Signed-off-by: Christian König <[email protected]>
Reviewed-by: Leo Liu <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
8 years agodrm/amdgpu: fix incorrect type of info_id
Huang Rui [Sat, 16 Jul 2016 05:24:45 +0000 (13:24 +0800)]
drm/amdgpu: fix incorrect type of info_id

Signed-off-by: Huang Rui <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
8 years agodrm/amdgpu: make amdgpu_cgs_call_acpi_method as static
Huang Rui [Sat, 16 Jul 2016 05:04:22 +0000 (13:04 +0800)]
drm/amdgpu: make amdgpu_cgs_call_acpi_method as static

Signed-off-by: Huang Rui <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
8 years agodrm/amdgpu: comment out unused defaults_staturn_pro static const structure to fix...
Slava Grigorev [Tue, 19 Jul 2016 04:24:10 +0000 (00:24 -0400)]
drm/amdgpu: comment out unused defaults_staturn_pro static const structure to fix the build

Signed-off-by: Slava Grigorev <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
8 years agodrm/amdgpu: enable UVD VM only on polaris
Christian König [Mon, 25 Jul 2016 14:37:06 +0000 (16:37 +0200)]
drm/amdgpu: enable UVD VM only on polaris

Stoney support it, but doesn't has unlimited session support.

Signed-off-by: Christian König <[email protected]>
Reviewed-by: Leo Liu <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
8 years agodrm/amdgpu: increase timeout of IB test
Chunming Zhou [Tue, 26 Jul 2016 05:56:31 +0000 (13:56 +0800)]
drm/amdgpu: increase timeout of IB test

we should give enough time to IB test.

Signed-off-by: Chunming Zhou <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
8 years agodrm/amdgpu: add destroy session when generate VCE destroy msg.
Rex Zhu [Thu, 21 Jul 2016 12:46:55 +0000 (20:46 +0800)]
drm/amdgpu: add destroy session when generate VCE destroy msg.

Signed-off-by: David Mao <[email protected]>
Signed-off-by: Rex Zhu <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
8 years agodrm/amd: fix deadlock of job_list_lock V2
Chunming Zhou [Mon, 25 Jul 2016 05:55:35 +0000 (13:55 +0800)]
drm/amd: fix deadlock of job_list_lock V2

run_job involves mutex, which could sleep.

V2: use list_for_each_entry_safe, since the job might complete
while we dropped the lock.

Signed-off-by: Chunming Zhou <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
8 years agodrm/amd: reset hw count when reset job
Chunming Zhou [Fri, 22 Jul 2016 05:01:02 +0000 (13:01 +0800)]
drm/amd: reset hw count when reset job

Means the hw ring is empty after gpu reset.

Signed-off-by: Chunming Zhou <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
This page took 0.112662 seconds and 4 git commands to generate.