Commit Graph
37138 Commits
Author SHA1 Message Date
Wei Yongjun 4ad3e92c28 gpu: ipu-v3: Use ERR_CAST instead of ERR_PTR(PTR_ERR())
Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)).

Generated by: scripts/coccinelle/api/err_cast.cocci

Signed-off-by: Wei Yongjun <[email protected]>
Signed-off-by: Philipp Zabel <[email protected]>
2016-10-17 08:21:53 +02:00
Arnd Bergmann 3e3affe549 drm/imx: hide an unused label
The imx_drm_bind function causes a warning in linux-next when
CONFIG_DRM_FBDEV_EMULATION is not set:

drivers/gpu/drm/imx/imx-drm-core.c: In function 'imx_drm_bind':
drivers/gpu/drm/imx/imx-drm-core.c:441:1: error: label 'err_unbind' defined but not used [-Werror=unused-label]

I don't understand why the warning only showed up now, as the
code has not been modified recently, but there is an obvious
fix in adding another #if for the symbol.

Signed-off-by: Arnd Bergmann <[email protected]>
Fixes: c1ff5a7aa3 ("drm/imx: Remove local fbdev emulation Kconfig option")
Signed-off-by: Philipp Zabel <[email protected]>
2016-10-17 08:21:53 +02:00
Dmitry Vyukov 49521b13cb drivers/gpu/vga: allocate vga_arb_write() buffer on stack
Size of kmalloc() in vga_arb_write() is controlled by user.
Too large kmalloc() size triggers WARNING message on console.
Allocate the buffer on stack to avoid the WARNING.
The string must be small (e.g "target PCI:domain:bus:dev.fn").

Signed-off-by: Dmitry Vyukov <[email protected]>
Reviewed-by: Ville Syrjälä <[email protected]>
Cc: Dave Airlie <[email protected]>
Cc: Ville Syrjälä <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-10-17 08:21:14 +02:00
Daniel Vetter fa860a1751 drm: Print device information again in debugfs
I was a bit over-eager in my cleanup in

commit 95c081c17f
Author: Daniel Vetter <[email protected]>
Date:   Tue Jun 21 10:54:12 2016 +0200

    drm: Move master pointer from drm_minor to drm_device

Noticed by Chris Wilson.

Fixes: 95c081c17f ("drm: Move master pointer from drm_minor to drm_device")
Cc: Chris Wilson <[email protected]>
Cc: Chris Wilson <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Emil Velikov <[email protected]>
Cc: Julia Lawall <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Tested-by: Chris Wilson <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
2016-10-17 16:20:53 +10:00
Chris Wilson 0853695c3b drm: Add reference counting to drm_atomic_state
drm_atomic_state has a complicated single owner model that tracks the
single reference from allocation through to destruction on another
thread - or perhaps on a local error path. We can simplify this tracking
by using reference counting (at a cost of a few more atomics). This is
even more beneficial when the lifetime of the state becomes more
convoluted than being passed to a single worker thread for the commit.

v2: Double check !intel atomic_commit functions for missing gets
v3: Update kerneldocs

Signed-off-by: Chris Wilson <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: [email protected]
Reviewed-by: Eric Engestrom <[email protected]>
Reviewed-by: Sean Paul <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-10-17 08:19:57 +02:00
Brian Starkey d807ed1c55 drm: atomic: Clarify documentation around drm_atomic_crtc_needs_modeset
Add some additional comments to more explicitly describe the meaning and
usage of the three CRTC modeset detection booleans: mode_changed,
connectors_changed and active_changed.

Suggested-by: Daniel Vetter <[email protected]>
Signed-off-by: Brian Starkey <[email protected]>
Acked-by: Alex Deucher <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-10-17 08:07:11 +02:00
Lyude 1bab7502dd drm/i915/gen9: Cleanup skl_pipe_wm_active_state
This function is a wreck, let's help it get its life back together and
cleanup all of the copy pasta here.

Signed-off-by: Lyude <[email protected]>
Reviewed-by: Maarten Lankhorst <[email protected]>
Reviewed-by: Paulo Zanoni <[email protected]>
Cc: Ville Syrjälä <[email protected]>
2016-10-16 19:09:07 -04:00
Lyude a62163e97b drm/i915/gen9: Make skl_wm_level per-plane
Having skl_wm_level contain all of the watermarks for each plane is
annoying since it prevents us from having any sort of object to
represent a single watermark level, something we take advantage of in
the next commit to cut down on all of the copy paste code in here.

Changes since v1:
- Style nitpicks
- Fix accidental usage of i vs. PLANE_CURSOR
- Split out skl_pipe_wm_active_state simplification into separate patch

Signed-off-by: Lyude <[email protected]>
Reviewed-by: Paulo Zanoni <[email protected]>
Reviewed-by: Maarten Lankhorst <[email protected]>
Cc: Ville Syrjälä <[email protected]>
2016-10-16 19:08:43 -04:00
Lyude b707aa5041 drm/i915/skl: Remove linetime from skl_wm_values
Next part of cleaning up the watermark code for skl. This is easy, since
it seems that we never actually needed to keep track of the linetime in
the skl_wm_values struct anyway.

Signed-off-by: Lyude <[email protected]>
Reviewed-by: Paulo Zanoni <[email protected]>
Reviewed-by: Maarten Lankhorst <[email protected]>
Cc: Ville Syrjälä <[email protected]>
2016-10-16 19:08:10 -04:00
Lyude ce0ba283f6 drm/i915/skl: Move per-pipe ddb allocations into crtc states
First part of cleaning up all of the skl watermark code. This moves the
structures for storing the ddb allocations of each pipe into
intel_crtc_state, along with moving the structures for storing the
current ddb allocations active on hardware into intel_crtc.

Changes since v1:
- Don't replace alloc->start = alloc->end = 0;

Signed-off-by: Lyude <[email protected]>
Reviewed-by: Maarten Lankhorst <[email protected]>
Reviewed-by: Paulo Zanoni <[email protected]>
Cc: Ville Syrjälä <[email protected]>
2016-10-16 19:07:58 -04:00
Maxime Ripard 0df03b4303 drm/sun4i: rgb: Remove the bridge enable/disable functions
The atomic helpers already call the drm_bridge_enable on our behalf,
there's no need to do it a second time.

Reported-by: Sean Paul <[email protected]>
Reviewed-by: Sean Paul <[email protected]>
Signed-off-by: Maxime Ripard <[email protected]>
2016-10-16 14:32:23 +02:00
Jonathan Liu 5647b25c33 drm/sun4i: rgb: Enable panel after controller
The panel should be enabled after the controller so that we do not have
visual glitches on the panel while the controller is setup. Similarly,
the panel should be disabled before the controller.

Signed-off-by: Jonathan Liu <[email protected]>
Reviewed-by: Sean Paul <[email protected]>
Signed-off-by: Maxime Ripard <[email protected]>
2016-10-16 14:32:23 +02:00
Tvrtko Ursulin c13fb77890 drm/i915: Fix cxsr_latency_table reorg
I have re-ordered some struct members in patch:

  commit 44a655cae3
  Author: Tvrtko Ursulin <[email protected]>
  Date:   Thu Oct 13 11:09:23 2016 +0100

      drm/i915: Shrink cxsr_latency_table

but that particular one is not initialized with named
initializers which broke it.

Move the bitfields back at the beginning. Space saving
is still there.

Signed-off-by: Tvrtko Ursulin <[email protected]>
Fixes: 44a655cae3 ("drm/i915: Shrink cxsr_latency_table")
Cc: Joonas Lahtinen <[email protected]>
Cc: Jani Nikula <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-10-14 17:23:28 +01:00
Rex Zhu f28a9b65c9 drm/amd/powerplay: fix bug stop dpm can't work on Vi.
Signed-off-by: Rex Zhu <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
2016-10-14 12:10:00 -04:00
Rex Zhu 36c285c533 drm/amd/powerplay: notify smu no display by default.
Signed-off-by: Rex Zhu <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
2016-10-14 12:09:44 -04:00
Alex Deucher 154061db88 drm/amdgpu/dpm: implement thermal sensor for CZ/ST
Previous code was just a copy/paste from KV.

Reviewed-by: Tom St Denis <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
2016-10-14 11:52:29 -04:00
Alex Deucher ca3d28de62 drm/amdgpu/powerplay: implement thermal sensor for CZ/ST
Add missing functionality.

Reviewed-by: Tom St Denis <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
2016-10-14 11:51:47 -04:00
Alex Deucher 3e96dbfd58 drm/amdgpu: disable smu hw first on tear down
Otherwise, you can't disable dpm.

Tested-by and Reviewed-by: Rex Zhu <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
2016-10-14 11:51:33 -04:00
Alex Deucher da146d3b52 drm/amdgpu: fix amdgpu_need_full_reset (v2)
IP types are not an index.  Each asic may have number and
type of IPs.  Properly check the the type rather than
using the type id as an index.

v2: fix all the IPs to not use IP type as an idx as well.

Reviewed-by: Chunming Zhou <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Cc: [email protected]
2016-10-14 11:51:04 -04:00
Michał Winiarski 2ce5179fe8 drm/i915/gtt: Free unused lower-level page tables
Since "Dynamic page table allocations" were introduced, our page tables
can grow (being dynamically allocated) with address space range usage.
Unfortunately, their lifetime is bound to vm. This is not a huge problem
when we're not using softpin - drm_mm is creating an upper bound on used
range by causing addresses for our VMAs to eventually be reused.

With softpin, long lived contexts can drain the system out of memory
even with a single "small" object. For example:

bo = bo_alloc(size);
while(true)
    offset += size;
    exec(bo, offset);

Will cause us to create new allocations until all memory in the system
is used for tracking GPU pages (even though almost all PTEs in this vm
are pointing to scratch).

Let's free unused page tables in clear_range to prevent this - if no
entries are used, we can safely free it and return this information to
the caller (so that higher-level entry is pointing to scratch).

v2: Document return value and free semantics (Joonas)
v3: No newlines in vars block (Joonas)
v4: Drop redundant local 'reduce' variable
v5: Handle CI fail with enable_ppgtt=2

Cc: Michel Thierry <[email protected]>
Cc: Mika Kuoppala <[email protected]>
Reviewed-by: Chris Wilson <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Signed-off-by: Michał Winiarski <[email protected]>
Signed-off-by: Chris Wilson <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-10-14 12:42:23 +01:00
Michał Winiarski d209b9c3cd drm/i915/gtt: Split gen8_ppgtt_clear_pte_range
Let's use more top-down approach, where each gen8_ppgtt_clear_* function
is responsible for clearing the struct passed as an argument and calling
relevant clear_range functions on lower-level tables.
Doing this rather than operating on PTE ranges makes the implementation
of shrinking page tables quite simple.

v2: Drop min when calculating num_entries, no negation in 48b ppgtt
check, no newlines in vars block (Joonas)

Cc: Chris Wilson <[email protected]>
Cc: Joonas Lahtinen <[email protected]>
Cc: Michel Thierry <[email protected]>
Cc: Mika Kuoppala <[email protected]>
Signed-off-by: Michał Winiarski <[email protected]>
Signed-off-by: Chris Wilson <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-10-14 12:40:33 +01:00
Michał Winiarski 4fb84d991e drm/i915: Remove unused "valid" parameter from pte_encode
We never used any invalid ptes, those were put in place for
a possibility of doing gpu faults. However our batchbuffers are not
restricted in length, so everything needs to be pointing to something
and thus out-of-bounds is pointing to scratch.

Remove the valid flag as it is always true.

v2: Expand commit msg, patch reorder (Mika)

Cc: Chris Wilson <[email protected]>
Cc: Michel Thierry <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Reviewed-by: Mika Kuoppala <[email protected]>
Signed-off-by: Michał Winiarski <[email protected]>
Signed-off-by: Chris Wilson <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-10-14 12:40:32 +01:00
Imre Deak 4c494a5769 drm/i915: Fix mismatched INIT power domain disabling during suspend
Currently the display INIT power domain disabling/enabling happens in a
mismatched way in the suspend/resume_early hooks respectively. This can
leave display power wells incorrectly disabled in the resume hook if the
suspend sequence is aborted for some reason resulting in the
suspend/resume hooks getting called but the suspend_late/resume_early
hooks being skipped. In particular this change fixes "Unclaimed read
from register 0x1e1204" on BYT/BSW triggered from i915_drm_resume()->
intel_pps_unlock_regs_wa() when suspending with /sys/power/pm_test set
to devices.

Fixes: 85e9067933 ("drm/i915: disable power wells on suspend")
Cc: Ville Syrjälä <[email protected]>
Cc: David Weinehall <[email protected]>
Signed-off-by: Imre Deak <[email protected]>
Reviewed-by: Ville Syrjälä <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-10-14 14:33:57 +03:00
Tvrtko Ursulin 5db9401983 drm/i915: Make IS_GEN macros only take dev_priv
Saves 1416 bytes of .rodata strings.

v2: Add parantheses around dev_priv. (Ville Syrjala)

Signed-off-by: Tvrtko Ursulin <[email protected]>
Reviewed-by: David Weinehall <[email protected]>
Acked-by: Daniel Vetter <[email protected]>
Acked-by: Jani Nikula <[email protected]>
Acked-by: Chris Wilson <[email protected]>
Acked-by: Maarten Lankhorst <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-10-14 12:23:22 +01:00
Tvrtko Ursulin 55b8f2a76d drm/i915: Make INTEL_GEN only take dev_priv
Saves 968 bytes of .rodata strings.

v2: Add parantheses around dev_priv. (Ville Syrjala)
v3: Rebase.

Signed-off-by: Tvrtko Ursulin <[email protected]>
Reviewed-by: David Weinehall <[email protected]>
Acked-by: Daniel Vetter <[email protected]>
Acked-by: Jani Nikula <[email protected]>
Acked-by: Chris Wilson <[email protected]>
Acked-by: Maarten Lankhorst <[email protected]>
2016-10-14 12:23:19 +01:00
Tvrtko Ursulin 11a914c286 drm/i915: Make IS_VALLEYVIEW only take dev_priv
Saves 944 bytes of .rodata strings and 128 bytes of .text.

v2: Add parantheses around dev_priv. (Ville Syrjala)

Signed-off-by: Tvrtko Ursulin <[email protected]>
Reviewed-by: David Weinehall <[email protected]>
Acked-by: Daniel Vetter <[email protected]>
Acked-by: Jani Nikula <[email protected]>
Acked-by: Chris Wilson <[email protected]>
Acked-by: Maarten Lankhorst <[email protected]>
2016-10-14 12:23:19 +01:00
Tvrtko Ursulin 920a14b245 drm/i915: Make IS_CHERRYVIEW only take dev_priv
Saves 864 bytes of .rodata strings and ~100 of .text.

v2: Add parantheses around dev_priv. (Ville Syrjala)
v3: Rebase.

Signed-off-by: Tvrtko Ursulin <[email protected]>
Reviewed-by: David Weinehall <[email protected]>
Acked-by: Daniel Vetter <[email protected]>
Acked-by: Jani Nikula <[email protected]>
Acked-by: Chris Wilson <[email protected]>
Acked-by: Maarten Lankhorst <[email protected]>
2016-10-14 12:23:19 +01:00
Tvrtko Ursulin 9beb5fea04 drm/i915: Make IS_G4X only take dev_priv
Saves 472 bytes of .rodata strings.

v2: Add parantheses around dev_priv. (Ville Syrjala)

Signed-off-by: Tvrtko Ursulin <[email protected]>
Reviewed-by: David Weinehall <[email protected]>
Acked-by: Daniel Vetter <[email protected]>
Acked-by: Jani Nikula <[email protected]>
Acked-by: Chris Wilson <[email protected]>
Acked-by: Maarten Lankhorst <[email protected]>
2016-10-14 12:23:19 +01:00
Tvrtko Ursulin 3c9192bc08 drm/i915: Make HAS_L3_DPF only take dev_priv
Saves 472 bytes of .rodata strings.

v2: Add parantheses around dev_priv. (Ville Syrjala)

Signed-off-by: Tvrtko Ursulin <[email protected]>
Reviewed-by: David Weinehall <[email protected]>
Acked-by: Daniel Vetter <[email protected]>
Acked-by: Jani Nikula <[email protected]>
Acked-by: Chris Wilson <[email protected]>
Acked-by: Maarten Lankhorst <[email protected]>
2016-10-14 12:23:19 +01:00
Tvrtko Ursulin e2d214ae2b drm/i915: Make IS_BROXTON only take dev_priv
Saves 1392 bytes of .rodata strings.

Also change a few function/macro prototypes in i915_gem_gtt.c
from dev to dev_priv where it made more sense to do so.

v2: Add parantheses around dev_priv. (Ville Syrjala)
v3: Mention function prototype changes. (David Weinehall)

Signed-off-by: Tvrtko Ursulin <[email protected]>
Cc: David Weinehall <[email protected]>
Acked-by: Daniel Vetter <[email protected]>
Acked-by: Jani Nikula <[email protected]>
Acked-by: Chris Wilson <[email protected]>
Acked-by: Maarten Lankhorst <[email protected]>
Reviewed-by: David Weinehall <[email protected]>
2016-10-14 12:23:19 +01:00
Tvrtko Ursulin d9486e6501 drm/i915: Make IS_SKYLAKE only take dev_priv
Saves 1016 bytes of .rodata strings and couple hundred of .text.

v2: Add parantheses around dev_priv. (Ville Syrjala)

Signed-off-by: Tvrtko Ursulin <[email protected]>
Reviewed-by: David Weinehall <[email protected]>
Acked-by: Daniel Vetter <[email protected]>
Acked-by: Jani Nikula <[email protected]>
Acked-by: Chris Wilson <[email protected]>
Acked-by: Maarten Lankhorst <[email protected]>
2016-10-14 12:23:19 +01:00
Tvrtko Ursulin 0853723b89 drm/i915: Make IS_KABYLAKE only take dev_priv
Saves 1320 bytes of .rodata strings.

v2: Add parantheses around dev_priv. (Ville Syrjala)

Signed-off-by: Tvrtko Ursulin <[email protected]>
Reviewed-by: David Weinehall <[email protected]>
Acked-by: Daniel Vetter <[email protected]>
Acked-by: Jani Nikula <[email protected]>
Acked-by: Chris Wilson <[email protected]>
Acked-by: Maarten Lankhorst <[email protected]>
2016-10-14 12:23:19 +01:00
Tvrtko Ursulin 772c2a519c drm/i915: Make IS_HASWELL only take dev_priv
Saves 2432 bytes of .rodata strings.

v2: Add parantheses around dev_priv. (Ville Syrjala)

Signed-off-by: Tvrtko Ursulin <[email protected]>
Reviewed-by: David Weinehall <[email protected]>
Acked-by: Daniel Vetter <[email protected]>
Acked-by: Jani Nikula <[email protected]>
Acked-by: Chris Wilson <[email protected]>
Acked-by: Maarten Lankhorst <[email protected]>
2016-10-14 12:23:19 +01:00
Tvrtko Ursulin 8652744b64 drm/i915: Make IS_BROADWELL only take dev_priv
Saves 1808 bytes of .rodata strings.

v2: Add parantheses around dev_priv. (Ville Syrjala)

Signed-off-by: Tvrtko Ursulin <[email protected]>
Reviewed-by: David Weinehall <[email protected]>
Acked-by: Daniel Vetter <[email protected]>
Acked-by: Jani Nikula <[email protected]>
Acked-by: Chris Wilson <[email protected]>
Acked-by: Maarten Lankhorst <[email protected]>
2016-10-14 12:23:19 +01:00
Tvrtko Ursulin fd6b8f43c9 drm/i915: Make IS_IVYBRIDGE only take dev_priv
Saves 848 bytes of .rodata strings.

v2: Add parantheses around dev_priv. (Ville Syrjala)
v3: Rebase.

Signed-off-by: Tvrtko Ursulin <[email protected]>
Reviewed-by: David Weinehall <[email protected]>
Acked-by: Daniel Vetter <[email protected]>
Acked-by: Jani Nikula <[email protected]>
Acked-by: Chris Wilson <[email protected]>
Acked-by: Maarten Lankhorst <[email protected]>
2016-10-14 12:23:19 +01:00
Tvrtko Ursulin 50a0bc9054 drm/i915: Make INTEL_DEVID only take dev_priv
Saves 4472 bytes of .rodata strings.

v2: Add parantheses around dev_priv. (Ville Syrjala)

Signed-off-by: Tvrtko Ursulin <[email protected]>
Reviewed-by: David Weinehall <[email protected]>
Acked-by: Daniel Vetter <[email protected]>
Acked-by: Jani Nikula <[email protected]>
Acked-by: Chris Wilson <[email protected]>
Acked-by: Maarten Lankhorst <[email protected]>
2016-10-14 12:23:19 +01:00
Tvrtko Ursulin c1812bdbe0 drm/i915: Make IS_GEN-range macro only take dev_priv
Saves 944 bytes of .rodata strings.

v2: Add parantheses around dev_priv. (Ville Syrjala)

Signed-off-by: Tvrtko Ursulin <[email protected]>
Reviewed-by: David Weinehall <[email protected]>
Acked-by: Daniel Vetter <[email protected]>
Acked-by: Jani Nikula <[email protected]>
Acked-by: Chris Wilson <[email protected]>
Acked-by: Maarten Lankhorst <[email protected]>
2016-10-14 12:23:19 +01:00
Tvrtko Ursulin 70006ad6d8 drm/i915: Do not use INTEL_INFO(dev_priv)->ring_mask inside WARNs
Saves 1520 bytes of .rodata strings.

Signed-off-by: Tvrtko Ursulin <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Acked-by: Daniel Vetter <[email protected]>
Acked-by: Jani Nikula <[email protected]>
Acked-by: Chris Wilson <[email protected]>
Acked-by: Maarten Lankhorst <[email protected]>
2016-10-14 12:23:19 +01:00
Tvrtko Ursulin 6772ffe023 drm/i915: Make HAS_RUNTIME_PM only take dev_priv
Saves 960 bytes of .rodata strings.

v2: Add parantheses around dev_priv. (Ville Syrjala)

Signed-off-by: Tvrtko Ursulin <[email protected]>
Reviewed-by: David Weinehall <[email protected]>
Acked-by: Daniel Vetter <[email protected]>
Acked-by: Jani Nikula <[email protected]>
Acked-by: Chris Wilson <[email protected]>
Acked-by: Maarten Lankhorst <[email protected]>
2016-10-14 12:23:19 +01:00
Tvrtko Ursulin 49cff963dd drm/i915: Make HAS_GMCH_DISPLAY only take dev_priv
More .rodata string saving by avoid __I915__ magic inside WARNs.

v2: Add parantheses around dev_priv. (Ville Syrjala)

Signed-off-by: Tvrtko Ursulin <[email protected]>
Reviewed-by: David Weinehall <[email protected]>
Acked-by: Daniel Vetter <[email protected]>
Acked-by: Jani Nikula <[email protected]>
Acked-by: Chris Wilson <[email protected]>
Acked-by: Maarten Lankhorst <[email protected]>
2016-10-14 12:23:19 +01:00
Tvrtko Ursulin 6e266956a5 drm/i915: Make INTEL_PCH_TYPE & co only take dev_priv
This saves 1872 bytes of .rodata strings.

v2:
 * Rebase.
 * Add parantheses around dev_priv. (Ville Syrjala)

Signed-off-by: Tvrtko Ursulin <[email protected]>
Reviewed-by: David Weinehall <[email protected]>
Acked-by: Daniel Vetter <[email protected]>
Acked-by: Jani Nikula <[email protected]>
Acked-by: Chris Wilson <[email protected]>
Acked-by: Maarten Lankhorst <[email protected]>
2016-10-14 12:23:19 +01:00
Tvrtko Ursulin 4f8036a281 drm/i915: Make HAS_DDI and HAS_PCH_LPT_LP only take dev_priv
This saves 3248 bytes of .rodata strings.

v2: Add parantheses around dev_priv. (Ville Syrjala)

Signed-off-by: Tvrtko Ursulin <[email protected]>
Reviewed-by: David Weinehall <[email protected]>
Acked-by: Daniel Vetter <[email protected]>
Acked-by: Jani Nikula <[email protected]>
Acked-by: Chris Wilson <[email protected]>
Acked-by: Maarten Lankhorst <[email protected]>
2016-10-14 12:23:19 +01:00
Zhi Wang 21196a81c2 drm/i915/gvt: Support GVT-g on Skylake
GVT-g supports Intel Skylake platform. Enable it.

Signed-off-by: Zhi Wang <[email protected]>
Signed-off-by: Zhenyu Wang <[email protected]>
2016-10-14 18:15:36 +08:00
Zhi Wang be1da7070a drm/i915/gvt: vGPU command scanner
This patch introduces a command scanner to scan guest command buffers.

Signed-off-by: Yulei Zhang <[email protected]>
Signed-off-by: Zhi Wang <[email protected]>
Signed-off-by: Zhenyu Wang <[email protected]>
2016-10-14 18:15:25 +08:00
Zhi Wang 1786571393 drm/i915/gvt: vGPU context switch
As different VM may configure different render MMIOs when executing
workload, to schedule workloads between different VM, the render MMIOs
have to be switched.

Signed-off-by: Zhi Wang <[email protected]>
Signed-off-by: Zhenyu Wang <[email protected]>
2016-10-14 18:15:13 +08:00
Zhi Wang 4b63960ebd drm/i915/gvt: vGPU schedule policy framework
This patch introduces a vGPU schedule policy framework, with a timer based
schedule policy module for now

Signed-off-by: Zhi Wang <[email protected]>
Signed-off-by: Zhenyu Wang <[email protected]>
2016-10-14 18:15:02 +08:00
Zhi Wang e473405783 drm/i915/gvt: vGPU workload scheduler
This patch introduces the vGPU workload scheduler routines.

GVT workload scheduler is responsible for picking and executing GVT workload
from current scheduled vGPU. Before the workload is submitted to host i915,
the guest execlist context will be shadowed in the host GVT shadow context.
the instructions in guest ring buffer will be copied into GVT shadow ring
buffer. Then GVT-g workload scheduler will scan the instructions in guest
ring buffer and submit it to host i915.

Signed-off-by: Zhi Wang <[email protected]>
Signed-off-by: Zhenyu Wang <[email protected]>
2016-10-14 18:14:50 +08:00
Zhi Wang 28c4c6ca7f drm/i915/gvt: vGPU workload submission
This patch introduces the vGPU workload submission logics.

Under virtualization environment, guest will submit workload through
virtual execlist submit port. The submitted workload load will be wrapped
into an gvt workload which will be picked by GVT workload scheduler and
executed on host i915 later.

Signed-off-by: Zhi Wang <[email protected]>
Signed-off-by: Zhenyu Wang <[email protected]>
2016-10-14 18:14:37 +08:00
Zhi Wang 8453d674ae drm/i915/gvt: vGPU execlist virtualization
This patch introduces the vGPU execlist virtualization.

Under virtulization environment, HW execlist interface are fully emulated
including virtual CSB emulation, virtual execlist emulation. The framework
will emulate the virtual CSB according to the guest workload running status

Signed-off-by: Zhi Wang <[email protected]>
Signed-off-by: Zhenyu Wang <[email protected]>
2016-10-14 18:14:28 +08:00
Zhi Wang 04d348ae3f drm/i915/gvt: vGPU display virtualization
This patch introduces the GVT-g display virtualization.

It consists a collection of display MMIO handlers, like power well register
handler, pipe register handler, plane register handler, which will emulate
all display MMIOs behavior to support virtual mode setting sequence for
guest.

Signed-off-by: Bing Niu <[email protected]>
Signed-off-by: Zhi Wang <[email protected]>
Signed-off-by: Zhenyu Wang <[email protected]>
2016-10-14 18:13:06 +08:00