]> Git Repo - linux.git/log
linux.git
8 years agodrm/amdgpu: also track late init state
Grazvydas Ignotas [Sun, 2 Oct 2016 21:06:44 +0000 (00:06 +0300)]
drm/amdgpu: also track late init state

Successful sw_init() and hw_init() states are tracked, but not
late_init(). Various error paths may result in amdgpu_fini() being
called before .late init is done, so late_init needs to be tracked
to avoid unexpected or multiple .late_fini() calls.

Signed-off-by: Grazvydas Ignotas <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
8 years agodrm/i915: Add spurious CRT DMI match for Intel DZ77BH-55K
Ville Syrjälä [Mon, 26 Sep 2016 09:20:46 +0000 (12:20 +0300)]
drm/i915: Add spurious CRT DMI match for Intel DZ77BH-55K

Intel DZ77BH-55K board doest't have a physical VGA connector,
and yet it always detects that something is connected there.
Add it to the DMI blacklist to ignore the spurious detection
results.

Allows me to drop 'video=VGA-1:d' from my kernel cmdline.

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: Register shadow VGA even when it produces spurious detection results
Ville Syrjälä [Mon, 26 Sep 2016 09:20:45 +0000 (12:20 +0300)]
drm/i915: Register shadow VGA even when it produces spurious detection results

Having a shadow VGA connector is useful for testing purposes. We
currently skip registering the connector on machines where the
CRT detect falsely reports it as connected. Let's instead move the
the blacklist check to the detect callback (and hpd setup) and
if we get a match we always report the connector as disconnected.
This way we get a shadow VGA connector to help with testing, while
we still avoid the user facing problems from the incorrect
detection results.

commit 8ca4013d702d ("CHROMIUM: i915: Add DMI override to skip CRT
initialization on ZGB") doesn't provide much in the way of details
as to why 'ACER ZGB' was added to the blacklist. Trying to trace it
further leads me to a chromeos bugreport I can't access. So based on
the fact that the commit added the
"/* Skip machines without VGA that falsely report hotplug events */"
comment, I'm going to assume that it was just spurious CRT detection.
So it should be safe to move the blacklist to just block the detection
and hpd without causing a regression on said machine.

In fact Stéphane confirmed on irc that the problem was indeed just
crappy hotplug detect:
"22:29 < marcheu> vsyrjala: the port isn't there, but the load detect is
 improperly stubbed in hw
 22:29 < marcheu> vsyrjala: so it floats"
so this change should be perfectly fine.

v2: Add irc quote from Stéphane

Cc: Duncan Laurie <[email protected]>
Cc: Olof Johansson <[email protected]>
Cc: Stéphane Marchesin <[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 agoRevert "Skip intel_crt_init for Dell XPS 8700"
Ville Syrjälä [Mon, 26 Sep 2016 09:20:44 +0000 (12:20 +0300)]
Revert "Skip intel_crt_init for Dell XPS 8700"

This reverts commit 10b6ee4a87811a110cb01eaca01eb04da6801baf.

According to [1] Dell XPS8700 VBT says 'int_crt_support 0', so thanks
to commit e4abb733bb72 ("drm/i915: Check VBT for CRT port presence on
HSW/BDW") we no longer need to blacklist it based on DMI.

Looking through the bug report, SFUSE_STRAP based detection was
apparently also tried and failed, but the VBT based one should still
work just fine.

The commit says that the symptom was a frozen machine, but based on the
bug report it doesn't look like the CRT detection was at least directly
responsible for such a drastic outcome.

Cc: Giacomo Comes <[email protected]>
References: https://bugs.freedesktop.org/show_bug.cgi?id=73559
References: http://lists.freedesktop.org/archives/intel-gfx/2014-January/038178.html [1]
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/prime: Take a ref on the drm_dev when exporting a dma_buf
Chris Wilson [Wed, 5 Oct 2016 12:21:44 +0000 (13:21 +0100)]
drm/prime: Take a ref on the drm_dev when exporting a dma_buf

dma_buf may live a long time, longer than the last direct user of the
driver. We already hold a reference to the owner module (that prevents
the object code from disappearing), but there is no reference to the
drm_dev - so the pointers to the driver backend themselves may vanish.

v2: Resist temptation to fix the bug in armada_gem.c not setting the
correct flags on the exported dma-buf (it should pass the flags through
and not be arbitrarily setting O_RDWR).

Use a common wrapper for exporting the dmabuf and acquiring the
reference to the drm_device.

Testcase: igt/vgem_basic/unload
Suggested-by: Daniel Vetter <[email protected]>
Signed-off-by: Chris Wilson <[email protected]>
Cc: Petri Latvala <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: [email protected]
Tested-by: Petri Latvala <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/prime: Pass the right module owner through to dma_buf_export()
Chris Wilson [Wed, 5 Oct 2016 12:21:43 +0000 (13:21 +0100)]
drm/prime: Pass the right module owner through to dma_buf_export()

dma_buf_export() adds a reference to the owning module to the dmabuf (to
prevent the driver from being unloaded whilst a third party still refers
to the dmabuf). However, drm_gem_prime_export() was passing its own
THIS_MODULE (i.e. drm.ko) rather than the driver. Extract the right
owner from the device->fops instead.

v2: Use C99 initializers to zero out unset elements of
dma_buf_export_info
v3: Extract the right module from dev->fops.

Testcase: igt/vgem_basic/unload
Reported-by: Petri Latvala <[email protected]>
Signed-off-by: Chris Wilson <[email protected]>
Cc: Petri Latvala <[email protected]>
Cc: Christian König <[email protected]>
Cc: [email protected]
Tested-by: Petri Latvala <[email protected]>
Reviewed-by: Petri Latvala <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/bridge: Call drm_connector_cleanup directly
Marek Vasut [Tue, 4 Oct 2016 22:23:31 +0000 (00:23 +0200)]
drm/bridge: Call drm_connector_cleanup directly

Remove the unnecessary wrapper functions around drm_connector_cleanup().

Signed-off-by: Marek Vasut <[email protected]>
Cc: Daniel Vetter <[email protected]>
Reviewed-by: Gustavo Padovan <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm: simple_kms_helper: Add prepare_fb and cleanup_fb hooks
Marek Vasut [Sun, 2 Oct 2016 17:01:24 +0000 (19:01 +0200)]
drm: simple_kms_helper: Add prepare_fb and cleanup_fb hooks

Add .prepare_fb and .cleanup_fb plane hooks into the drm_simple_kms.
These can be used by drivers to call ie. the drm_fb_cma_setup_fence()
helper.

Signed-off-by: Marek Vasut <[email protected]>
Cc: Noralf Trønnes <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: David Airlie <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm: Release resources with a safer function
Christophe JAILLET [Sun, 2 Oct 2016 06:01:22 +0000 (08:01 +0200)]
drm: Release resources with a safer function

We should use 'ida_simple_remove()' instead of 'ida_remove()' when freeing
resources allocated with 'ida_simple_get()'.

This as been spotted with the following coccinelle script which tries to
detect missing 'ida_simple_remove()' call in error handling paths.

///////////////
@@
expression x;
identifier l;
@@

*   x = ida_simple_get(...);
    ...
    if (...) {
    ...
    }
    ...
    if (...) {
       ...
       goto l;
    }
    ...
*   l: ... when != ida_simple_remove(...);

Signed-off-by: Christophe JAILLET <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Sort DEV_INFO_FOR_EACH_FLAG
Joonas Lahtinen [Wed, 5 Oct 2016 10:50:17 +0000 (13:50 +0300)]
drm/i915: Sort DEV_INFO_FOR_EACH_FLAG

Sort DEV_INFO_FOR_EACH_FLAG to alphabetical order (except is_*).

v2:
- Add comments in the hope of maintaining order (Chris)

Cc: Chris Wilson <[email protected]>
Reviewed-by: Chris Wilson <[email protected]>
Signed-off-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/1475664617-24541-1-git-send-email-joonas.lahtinen@linux.intel.com
8 years agodrm/i915: Reduce trickery in DEV_INFO_FOR_EACH_FLAG
Joonas Lahtinen [Wed, 5 Oct 2016 10:50:16 +0000 (13:50 +0300)]
drm/i915: Reduce trickery in DEV_INFO_FOR_EACH_FLAG

Get rid of SEP_SEMICOLON and SEP_BLANK in DEV_INFO_FOR_EACH_FLAG.
Consolidate the debug output so that instead of one huge line with
"cap1,cap2,capN" each capability is split to own line and displayed
as "capN: [yes|no]" to make the dumps more historically informative.

v2:
- Do not break auto-indent by keeping semicolon after macro (Jani)
- Consolidate and use yesno() in all locations (Chris)

Cc: Jani Nikula <[email protected]>
Cc: Chris Wilson <[email protected]>
Reviewed-by: Chris Wilson <[email protected]>
Signed-off-by: Joonas Lahtinen <[email protected]>
8 years agodrm/i915: Allow DP to work w/o EDID
Ville Syrjälä [Mon, 3 Oct 2016 07:55:16 +0000 (10:55 +0300)]
drm/i915: Allow DP to work w/o EDID

Allow returning "connected" or "unknown" connector status for DP branch
devices that don't have an EDID. Currently we'd claim the thing as
"disconnected" if there is no EDID.

This stuff used to broken already, I think, but it got more broken by
commit f21a21983ef1 ("drm/i915: Splitting intel_dp_detect")

Cc: Damien Cassou <[email protected]>
Cc: [email protected]
Cc: Arno <[email protected]>
Cc: Shubhangi Shrivastava <[email protected]>
Cc: Sivakumar Thulasimani <[email protected]>
Cc: Ander Conselvan de Oliveira <[email protected]>
Cc: [email protected]
Tested-by: Arno <[email protected]>
Fixes: f21a21983ef1 ("drm/i915: Splitting intel_dp_detect")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83348
Signed-off-by: Ville Syrjälä <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Ander Conselvan de Oliveira <[email protected]>
8 years agodrm/i915: Move long hpd handling into the hotplug work
Ville Syrjälä [Mon, 3 Oct 2016 07:55:15 +0000 (10:55 +0300)]
drm/i915: Move long hpd handling into the hotplug work

We can't rely on connector->status in the detect() hook if the long hpd
was already handled by the dig_port_work as that won't update
connector->status. Thus we have to defer the long hpd handling entirely
until the hotplug work runs to avoid the double long hpd handling
the "detect_done" flag is trying to prevent.

We'll start to depend on connector->status being up to date in a
following patch.

Cc: Damien Cassou <[email protected]>
Cc: [email protected]
Cc: Arno <[email protected]>
Cc: Shubhangi Shrivastava <[email protected]>
Cc: Sivakumar Thulasimani <[email protected]>
Cc: Ander Conselvan de Oliveira <[email protected]>
Cc: [email protected]
Tested-by: Arno <[email protected]>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83348
Signed-off-by: Ville Syrjälä <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Ander Conselvan de Oliveira <[email protected]>
8 years agodrm/i915: Show waiters in i915_hangcheck_info
Chris Wilson [Tue, 4 Oct 2016 20:11:32 +0000 (21:11 +0100)]
drm/i915: Show waiters in i915_hangcheck_info

It is convenient to know what processes are waiting when looking at
hangcheck status in debugfs.

Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Mika Kuoppala <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Show RING registers through debugfs
Chris Wilson [Tue, 4 Oct 2016 20:11:31 +0000 (21:11 +0100)]
drm/i915: Show RING registers through debugfs

Knowing where the RINGs are pointing is extremely useful in diagnosing
if the engines are executing the ringbuffers you expect - and igt may be
suppressing the usual method of looking in the GPU error state.

Signed-off-by: Chris Wilson <[email protected]>
Cc: Mika Kuoppala <[email protected]>
Reviewed-by: Mika Kuoppala <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Show bounds of active request in the ring on GPU hang
Chris Wilson [Tue, 4 Oct 2016 20:11:30 +0000 (21:11 +0100)]
drm/i915: Show bounds of active request in the ring on GPU hang

Include the position of the active request in the ring, and display that
alongside the current RING registers (on a GPU hang).

Signed-off-by: Chris Wilson <[email protected]>
Cc: Mika Kuoppala <[email protected]>
Reviewed-by: Mika Kuoppala <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Double check hangcheck.seqno after reset
Chris Wilson [Tue, 4 Oct 2016 20:11:29 +0000 (21:11 +0100)]
drm/i915: Double check hangcheck.seqno after reset

Check that there was not a late recovery between us declaring the GPU
hung and processing the reset. If the GPU did recover by itself, let the
request remain on the active list and see if it hangs again!

Signed-off-by: Chris Wilson <[email protected]>
Cc: Mika Kuoppala <[email protected]>
Reviewed-by: Mika Kuoppala <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Disable irqs across GPU reset
Chris Wilson [Tue, 4 Oct 2016 20:11:28 +0000 (21:11 +0100)]
drm/i915: Disable irqs across GPU reset

Whilst we reset the GPU, we want to prevent execlists from submitting
new work (which it does via an interrupt handler). To achieve this we
disable the irq (and drain the irq tasklet) around the reset. When we
enable it again afters, the interrupt queue should be empty and we can
reinitialise from a known state without fear of the tasklet running
concurrently.

Signed-off-by: Chris Wilson <[email protected]>
Cc: Mika Kuoppala <[email protected]>
Reviewed-by: Mika Kuoppala <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915/execlists: Move clearing submission count from reset to init
Chris Wilson [Tue, 4 Oct 2016 20:11:27 +0000 (21:11 +0100)]
drm/i915/execlists: Move clearing submission count from reset to init

After a GPU reset, we want to replay our queue of requests. However, the
GPU reset clobbered the state and we only fixup the state for the guilty
request - and engines deemed innocent we try to leave untouched so that
we recover as completely as possible. However, we need to clear the sw
tracking of the ELSP ports even for innocent requests, so move the clear
to the common path of init_hw (from reset_hw).

Reported-by: Mika Kuoppala <[email protected]>
Signed-off-by: Chris Wilson <[email protected]>
Cc: Mika Kuoppala <[email protected]>
Reviewed-by: Mika Kuoppala <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915/execlists: Reinitialise context image after GPU hang
Chris Wilson [Tue, 4 Oct 2016 20:11:26 +0000 (21:11 +0100)]
drm/i915/execlists: Reinitialise context image after GPU hang

On Braswell, at least, we observe that the context image is written in
multiple phases. The first phase is to clear the register state, and
subsequently rewrite it. A GPU reset at the right moment can interrupt
the context update leaving it corrupt, and our update of the RING_HEAD
is not sufficient to restart the engine afterwards. To recover, we need
to reset the registers back to their original values. The context state
is lost. What we need is a better mechanism to serialise the reset with
pending flushes from the GPU.

Fixes: 821ed7df6e2a ("drm/i915: Update reset path to fix incomplete requests")
Signed-off-by: Chris Wilson <[email protected]>
Cc: Mika Kuoppala <[email protected]>
Reviewed-by: Mika Kuoppala <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Share the computation of ring size for RING_CTL register
Chris Wilson [Tue, 4 Oct 2016 20:11:25 +0000 (21:11 +0100)]
drm/i915: Share the computation of ring size for RING_CTL register

Since both legacy and execlists want to populate the RING_CTL register,
share the computation of the right bits for the ring->size. We can then
stop masking errors and explicitly forbid them during creation!

Signed-off-by: Chris Wilson <[email protected]>
Cc: Mika Kuoppala <[email protected]>
Reviewed-by: Mika Kuoppala <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/amdgpu/virtual_dce: adjust config ifdef
Alex Deucher [Fri, 30 Sep 2016 03:20:29 +0000 (23:20 -0400)]
drm/amdgpu/virtual_dce: adjust config ifdef

Include the CIK asics in the ifdef.

Reviewed-By: Emily Deng <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
8 years agodrm/amdgpu/vce: add support for hw config packet (v2)
Alex Deucher [Fri, 23 Sep 2016 21:22:42 +0000 (17:22 -0400)]
drm/amdgpu/vce: add support for hw config packet (v2)

This is needed for proper VCE DPM on some APUs.

v2: fix the asic list

Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
8 years agodrm/amdgpu: clean up to set fw_offset as 0 twice
Huang Rui [Wed, 28 Sep 2016 08:04:33 +0000 (16:04 +0800)]
drm/amdgpu: clean up to set fw_offset as 0 twice

Signed-off-by: Huang Rui <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
8 years agodrm/amdgpu: remove DRM_AMD_POWERPLAY
Alex Deucher [Wed, 28 Sep 2016 20:37:15 +0000 (16:37 -0400)]
drm/amdgpu: remove DRM_AMD_POWERPLAY

Powerplay is no longer optional after the recently cleanups

Reviewed-by: Edward O'Callaghan <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
8 years agodrm/radeon: Prevent races on pre DCE4 between flip submission and completion.
Mario Kleiner [Sat, 17 Sep 2016 12:25:39 +0000 (14:25 +0200)]
drm/radeon: Prevent races on pre DCE4 between flip submission and completion.

Pre DCE4 hw doesn't have reliable pageflip completion
interrupts, so instead polling for flip completion is
used from within the vblank irq handler to complete
page flips.

This causes a race if pageflip ioctl is called close to
vblank:

1. pageflip ioctl queues execution of radeon_flip_work_func.

2. vblank irq fires, radeon_crtc_handle_vblank checks for
   flip_status == FLIP_SUBMITTED finds none, no-ops.

3. radeon_flip_work_func runs inside vblank, decides to
   set flip_status == FLIP_SUBMITTED and programs the
   flip into hw.

4. hw executes flip immediately (because in vblank), but
   as 2 already happened, the flip completion routine only
   emits the flip completion event one refresh later ->
   wrong vblank count/timestamp for completion and no
   performance gain, as instead of delaying the flip until
   next vblank, we now delay the next flip by 1 refresh
   while waiting for the delayed flip completion event.

Given we often don't gain anything due to this race, but
lose precision, prevent the programmed flip from executing
in vblank on pre DCE4 asics to avoid this race.

On pre-AVIVO hw we can't program the hw for edge-triggered
flips, they always execute anywhere in vblank. Therefore delay
the actual flip programming until after vblank on pre-AVIVO.

Reviewed-by: Michel Dänzer <[email protected]>
Signed-off-by: Mario Kleiner <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
8 years agodrm/radeon: Slightly more robust flip completion handling for < DCE-4
Mario Kleiner [Sat, 17 Sep 2016 12:25:38 +0000 (14:25 +0200)]
drm/radeon: Slightly more robust flip completion handling for < DCE-4

Pre DCE4 hardware doesn't have (reliable) pageflip completion
irqs, therefore we have to use the old polling method for flip
completion handling in vblank irq.

As vblank irqs fire a bit before start of vblank (when the
linebuffer fifo read position reaches end of scanout), we
have some fudge for flip completion handling in the last
lines of active scanout. Old code assumed the threshold to
be 99% of active scanout height, a ballpark estimate which
worked ok. Since we know since a while how to calculate the
actual threshold from linebuffer size, lets make use of it
to get a more accurate threshold.

This completion path is still prone to some races in corner
cases, especially on pre-AVIVO hardware, so document them
a bit better in the code comments.

Acked-by: Michel Dänzer <[email protected]>
Signed-off-by: Mario Kleiner <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
8 years agodrm/i915: silence io mapping/unmapping sparse warnings on different address spaces
Jani Nikula [Tue, 4 Oct 2016 09:54:13 +0000 (12:54 +0300)]
drm/i915: silence io mapping/unmapping sparse warnings on different address spaces

drivers/gpu/drm/i915/i915_gem_execbuffer.c:432:52: warning: incorrect type in argument 1 (different address spaces)
drivers/gpu/drm/i915/i915_gem_execbuffer.c:432:52:    expected void [noderef] <asn:2>*vaddr
drivers/gpu/drm/i915/i915_gem_execbuffer.c:432:52:    got void *
drivers/gpu/drm/i915/i915_gem_execbuffer.c:477:15: warning: incorrect type in assignment (different address spaces)
drivers/gpu/drm/i915/i915_gem_execbuffer.c:477:15:    expected void *vaddr
drivers/gpu/drm/i915/i915_gem_execbuffer.c:477:15:    got void [noderef] <asn:2>*

Cc: Chris Wilson <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: make skl_ddb_add_affected_planes static
Jani Nikula [Tue, 4 Oct 2016 09:29:17 +0000 (12:29 +0300)]
drm/i915: make skl_ddb_add_affected_planes static

Fix sparse warning:

drivers/gpu/drm/i915/intel_pm.c:3970:1: warning: symbol
'skl_ddb_add_affected_planes' was not declared. Should it be static?

Fixes: 7f60e200e254 ("drm/i915/gen9: only add the planes actually affected by ddb changes")
Cc: Lyude <[email protected]>
Cc: Paulo Zanoni <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Inline binary search
Tvrtko Ursulin [Tue, 4 Oct 2016 08:29:29 +0000 (09:29 +0100)]
drm/i915: Inline binary search

Instead of using bsearch library function make a local generator
macro out of it so the comparison callback can be inlined.

Signed-off-by: Tvrtko Ursulin <[email protected]>
Suggested-by: Chris Wilson <[email protected]>
Reviewed-by: Chris Wilson <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Use binary search when looking for shadowed registers
Tvrtko Ursulin [Tue, 4 Oct 2016 08:29:28 +0000 (09:29 +0100)]
drm/i915: Use binary search when looking for shadowed registers

Simply replace the linear search with the kernel's binary
search implementation. There is only six registers currently
in that table so this may not be that interesting. It adds a
function call so hopefully remains performance neutral for now.

v2: No need for manual conversion to bool for return.
    (Joonas Lahtinen)

Signed-off-by: Tvrtko Ursulin <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Reviewed-by: Chris Wilson <[email protected]>
8 years agodrm/i915: Sort the shadow register table
Tvrtko Ursulin [Tue, 4 Oct 2016 08:29:27 +0000 (09:29 +0100)]
drm/i915: Sort the shadow register table

Also verify the order at runtime. This was we can start using
binary search on it in a following patch.

v2: Add comment on the sorted array and only check it when
    debug option is enabled.

v3: Use IS_ENABLED. (Chris Wilson)

Signed-off-by: Tvrtko Ursulin <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]> (v1)
Reviewed-by: Chris Wilson <[email protected]>
8 years agodrm/i915: Remove identical write mmmio functions
Tvrtko Ursulin [Tue, 4 Oct 2016 08:29:26 +0000 (09:29 +0100)]
drm/i915: Remove identical write mmmio functions

We notice two identical copies of the shadow register table and
following from that removal can also unify CHV and Gen9 write
mmio functions and macros into a single implementation.

v2: Name fwtable consistently and use HAS_FWTABLE. (Joonas Lahtinen)

Signed-off-by: Tvrtko Ursulin <[email protected]>
Reviewed-by: Chris Wilson <[email protected]>
8 years agodrm/i915: Remove identical mmio read functions
Tvrtko Ursulin [Tue, 4 Oct 2016 08:29:25 +0000 (09:29 +0100)]
drm/i915: Remove identical mmio read functions

It is now obvious VLV, CHV and Gen9 mmio read fcuntions are
completely identical so we can remove the three copies and
just keep the newly named generic implementation.

v2: Use fwtable naming consistently. (Joonas Lahtinen)

Signed-off-by: Tvrtko Ursulin <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Reviewed-by: Chris Wilson <[email protected]>
8 years agodrm/i915: Remove identical macros
Tvrtko Ursulin [Tue, 4 Oct 2016 08:29:24 +0000 (09:29 +0100)]
drm/i915: Remove identical macros

Remove some macros which are now obviously identical.

v2: Added HAS_FWTABLE macro and simplified intel_uncore_forcewake_for_read.
    (Joonas Lahtinen)

Signed-off-by: Tvrtko Ursulin <[email protected]>
Reviewed-by: Chris Wilson <[email protected]>
8 years agodrm/i915: Store the active forcewake range table pointer
Tvrtko Ursulin [Tue, 4 Oct 2016 08:29:23 +0000 (09:29 +0100)]
drm/i915: Store the active forcewake range table pointer

If we store this in the uncore structure we are on a good way to
show more commonality between the per-platform implementations.

v2: Constify table pointer and correct coding style. (Chris Wilson)
v3: Rebase.

Signed-off-by: Tvrtko Ursulin <[email protected]>
Reviewed-by: Chris Wilson <[email protected]>
8 years agodrm/i915: Eliminate Gen9 special case
Tvrtko Ursulin [Tue, 4 Oct 2016 08:29:22 +0000 (09:29 +0100)]
drm/i915: Eliminate Gen9 special case

If we insert blitter forcewake domain entries in the range
table we can eliminate that special case and simplify the
code in a few macros. This will enable more unification later.

Signed-off-by: Tvrtko Ursulin <[email protected]>
Reviewed-by: Chris Wilson <[email protected]>
8 years agodrm/i915: Use binary search when looking up forcewake domains
Tvrtko Ursulin [Tue, 4 Oct 2016 08:29:21 +0000 (09:29 +0100)]
drm/i915: Use binary search when looking up forcewake domains

Instead of the existing linear seach, now that we have sorted
range tables, we can do a binary search on them for some
potential miniscule performance gain, but more importantly
for elegance and code size. Hopefully the perfomance gain is
sufficient to offset the function calls which were not there
before.

v2: Removed const cast away.

Signed-off-by: Tvrtko Ursulin <[email protected]>
Reviewed-by: Chris Wilson <[email protected]>
8 years agodrm/i915: Sort forcewake mapping tables
Tvrtko Ursulin [Tue, 4 Oct 2016 08:29:20 +0000 (09:29 +0100)]
drm/i915: Sort forcewake mapping tables

Sorting the tables (verified at runtime to help during
development) is another prerequisite for interesting
work which will follow.

v2:
 * Remove const away cast and improve comments. (Chris Wilson)
 * Check tables only when debug option is enabled.

v3: Use IS_ENABLED. (Chris Wilson)

Signed-off-by: Tvrtko Ursulin <[email protected]>
Reviewed-by: Chris Wilson <[email protected]>
8 years agodrm/i915: Data driven register to forcewake domains lookup
Tvrtko Ursulin [Tue, 4 Oct 2016 08:29:19 +0000 (09:29 +0100)]
drm/i915: Data driven register to forcewake domains lookup

Move finding the correct forcewake domains to take for
register access from code to a mapping table. This will
allow more interesting work in the following patches
and is easier to review if singled out early.

Signed-off-by: Tvrtko Ursulin <[email protected]>
Reviewed-by: Chris Wilson <[email protected]>
8 years agodrm/i915: Do not inline forcewake taking in mmio accessors
Tvrtko Ursulin [Tue, 4 Oct 2016 08:29:18 +0000 (09:29 +0100)]
drm/i915: Do not inline forcewake taking in mmio accessors

Once we know we need to take new forcewakes, that being
a slow operation, it does not make sense to inline that
code into every mmio accessor.

Move it to a separate function and save some code.

v2: Be explicit with noinline and remove stale comment.
    (Chris Wilson)

Signed-off-by: Tvrtko Ursulin <[email protected]>
Reviewed-by: Chris Wilson <[email protected]>
8 years agodrm/i915: Keep track of active forcewake domains in a bitmask
Tvrtko Ursulin [Tue, 4 Oct 2016 08:29:17 +0000 (09:29 +0100)]
drm/i915: Keep track of active forcewake domains in a bitmask

There are current places in the code, and there will be more in the
future, which iterate the forcewake domains to find out which ones
are currently active.

To save them from doing this iteration, we can cheaply keep a mask
of active domains in dev_priv->uncore.fw_domains_active.

This has no cost in terms of object size, even manages to shrink it
overall by 368 bytes on my config.

Signed-off-by: Tvrtko Ursulin <[email protected]>
Cc: "Paneri, Praveen" <[email protected]>
Reviewed-by: Chris Wilson <[email protected]>
8 years agodrm/i915: Remove redundant hsw_write* mmio functions
Tvrtko Ursulin [Tue, 4 Oct 2016 08:29:16 +0000 (09:29 +0100)]
drm/i915: Remove redundant hsw_write* mmio functions

They are completely identical to gen6_write* ones.

Signed-off-by: Tvrtko Ursulin <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
Reviewed-by: Chris Wilson <[email protected]>
8 years agodrm/i915: workaround sparse warning on variable length arrays
Jani Nikula [Tue, 4 Oct 2016 09:54:12 +0000 (12:54 +0300)]
drm/i915: workaround sparse warning on variable length arrays

Fix sparse warning:

drivers/gpu/drm/i915/intel_device_info.c:195:31: warning: Variable
length array is used.

In truth the array does have constant length, but sparse is too dumb to
realize. This is a bit ugly, but silence the warning no matter what.

Fixes: 91bedd34abf0 ("drm/i915/bdw: Check for slice, subslice and EU count for BDW")
Reviewed-by: Joonas Lahtinen <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: keep CONFIG_DRM_FBDEV_EMULATION=n function stubs together
Jani Nikula [Tue, 4 Oct 2016 07:53:48 +0000 (10:53 +0300)]
drm/i915: keep CONFIG_DRM_FBDEV_EMULATION=n function stubs together

Move the outcast intel_fbdev_output_poll_changed() stub for
CONFIG_DRM_FBDEV_EMULATION=n next to its friends.

Reviewed-by: Chris Wilson <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/rockchip: analogix_dp: Refuse to enable PSR if panel doesn't support it
Tomeu Vizoso [Fri, 23 Sep 2016 14:06:40 +0000 (16:06 +0200)]
drm/rockchip: analogix_dp: Refuse to enable PSR if panel doesn't support it

There's no point in enabling PSR when the panel doesn't support it.

This also avoids a problem when PSR gets enabled when a CRTC is being
disabled, because sometimes in that situation the DSP_HOLD_VALID_INTR
interrupt on which we wait will never arrive. This was observed on
RK3288 with a panel without PSR (veyron-jaq Chromebook).

It's very easy to reproduce by running the kms_rmfb test in IGT a few
times.

Cc: Yakir Yang <[email protected]>
Reviewed-by: Sean Paul <[email protected]>
Signed-off-by: Tomeu Vizoso <[email protected]>
Signed-off-by: Archit Taneja <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/bridge: analogix_dp: Add analogix_dp_psr_supported
Tomeu Vizoso [Fri, 23 Sep 2016 14:06:39 +0000 (16:06 +0200)]
drm/bridge: analogix_dp: Add analogix_dp_psr_supported

So users know whether PSR should be enabled or not.

Cc: Yakir Yang <[email protected]>
Reviewed-by: Sean Paul <[email protected]>
Signed-off-by: Tomeu Vizoso <[email protected]>
Signed-off-by: Archit Taneja <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/fb-helper: add DRM_FB_HELPER_DEFAULT_OPS for fb_ops
Stefan Christ [Thu, 29 Sep 2016 20:48:37 +0000 (22:48 +0200)]
drm/fb-helper: add DRM_FB_HELPER_DEFAULT_OPS for fb_ops

The define DRM_FB_HELPER_DEFAULT_OPS provides the drm_fb_helper default
implementations for functions in struct fb_ops. A drm driver can use it
like:

    static struct fb_ops drm_fbdev_cma_ops = {
        .owner          = THIS_MODULE,
        DRM_FB_HELPER_DEFAULT_OPS,
        /* driver specific implementations */
    };

Suggested-by: Daniel Vetter <[email protected]>
Signed-off-by: Stefan Christ <[email protected]>
Reviewed-by: Gustavo Padovan <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm: Document caveats around atomic event handling
Daniel Vetter [Fri, 30 Sep 2016 10:04:56 +0000 (12:04 +0200)]
drm: Document caveats around atomic event handling

It's not that obvious how a driver can all race the atomic commit with
handling the completion event. And there's unfortunately a pile of
drivers with rather bad event handling which misdirect people into the
wrong direction.

Try to remedy this by documenting everything better.

v2: Type fixes Alex spotted.

v3: More typos Alex spotted.

Cc: Andrzej Hajda <[email protected]>
Cc: Alex Deucher <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agouapi: add missing install of sync_file.h
Emilio López [Tue, 27 Sep 2016 14:31:42 +0000 (11:31 -0300)]
uapi: add missing install of sync_file.h

As part of the sync framework destaging, the sync_file.h header
was moved, but an entry was not added on Kbuild to install it.
This patch resolves this omission so that "make headers_install"
installs this header.

Fixes: 460bfc41fd52 ("dma-buf/sync_file: de-stage sync_file headers")
Reported-by: Michael Ellerman <[email protected]>
Reviewed-by: Gustavo Padovan <[email protected]>
Signed-off-by: Emilio López <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm: Simplify drm_printk to reduce object size quite a bit
Joe Perches [Mon, 26 Sep 2016 02:18:34 +0000 (19:18 -0700)]
drm: Simplify drm_printk to reduce object size quite a bit

Remove function name and special " *ERROR*" from argument list

$ size drivers/gpu/drm/built-in.o* (x86-32 defconfig, most drm selected)
   text    data     bss     dec     hex filename
5635366  182579   14328 5832273  58fe51 drivers/gpu/drm/built-in.o.new
5779552  182579   14328 5976459  5b318b drivers/gpu/drm/built-in.o.old

Using "%ps", __builtin_return_address(0) is the same as "%s", __func__
except for static inlines, but it's more or less the same output.

Miscellanea:

o Convert args... to ##__VA_ARGS__
o The equivalent DRM_DEV_<FOO> macros are rarely used and not
  worth conversion

Reviewed-by: Chris Wilson <[email protected]>
Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/01f976d5ab93c985756fc1b2e83656fb0a2a28c8.1474856262.git.joe@perches.com
8 years agodrm/i915: Account for sink max TMDS clock when checking the port clock
Ville Syrjälä [Wed, 28 Sep 2016 13:51:43 +0000 (16:51 +0300)]
drm/i915: Account for sink max TMDS clock when checking the port clock

It's perfectly legal for the sink to support 12bpc only for
some lower resolution modes, while the higher resolution modes
can only be used with 8bpc. So let's take the sink's max TMDS clock
into account before we go and decide that a particular mode can
be used with 12bpc.

Signed-off-by: Ville Syrjälä <[email protected]>
Reviewed-by: Ander Conselvan de Oliveira <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Replace a bunch of connector->base.display_info with a local variable
Ville Syrjälä [Wed, 28 Sep 2016 13:51:42 +0000 (16:51 +0300)]
drm/i915: Replace a bunch of connector->base.display_info with a local variable

Reduce the eyesore with a local variable.

Signed-off-by: Ville Syrjälä <[email protected]>
Reviewed-by: Ander Conselvan de Oliveira <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/edid: Move dvi_dual/max_tmds_clock parsing out from drm_edid_to_eld()
Ville Syrjälä [Wed, 28 Sep 2016 13:51:41 +0000 (16:51 +0300)]
drm/edid: Move dvi_dual/max_tmds_clock parsing out from drm_edid_to_eld()

drm_edid_to_eld() is just mean to cook up the ELD for the audio driver,
so having it parse non-audio related stuff seems just wrong, and
potentially could lead to that information not being even filled out
if the function doesn't even get called. Let's move that stuff to the
place where we parse the color formats and whatnot from the CEA ext
block.

Signed-off-by: Ville Syrjälä <[email protected]>
Acked-by: Christian König <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/edid: Clear the old cea_rev when there's no CEA extension in the new EDID
Ville Syrjälä [Wed, 28 Sep 2016 13:51:40 +0000 (16:51 +0300)]
drm/edid: Clear the old cea_rev when there's no CEA extension in the new EDID

It's not a good idea to leave stale cea_rev in the drm_display_info. The
current EDID might not even have a CEA ext block in which case we'd end
up leaving the stale value in place.

Signed-off-by: Ville Syrjälä <[email protected]>
Acked-by: Christian König <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/edid: Reduce the number of times we parse the CEA extension block
Ville Syrjälä [Wed, 28 Sep 2016 13:51:39 +0000 (16:51 +0300)]
drm/edid: Reduce the number of times we parse the CEA extension block

Instead of parsing parts of the CEA extension block in two places
to determine supported color formats and whatnot, let's just
consolidate it to one function. This also makes it possible to neatly
flatten drm_assign_hdmi_deep_color_info().

Signed-off-by: Ville Syrjälä <[email protected]>
Acked-by: Christian König <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/edid: Don't pass around drm_display_info needlessly
Ville Syrjälä [Wed, 28 Sep 2016 13:51:38 +0000 (16:51 +0300)]
drm/edid: Don't pass around drm_display_info needlessly

We already pass the connector to drm_add_display_info() and
drm_assign_hdmi_deep_color_info(), so passing the
connector->display_info also is pointless.

Signed-off-by: Ville Syrjälä <[email protected]>
Acked-by: Christian König <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/edid: Move dvi_dual/max_tmds_clock to drm_display_info
Ville Syrjälä [Wed, 28 Sep 2016 13:51:37 +0000 (16:51 +0300)]
drm/edid: Move dvi_dual/max_tmds_clock to drm_display_info

We have the drm_display_info for storing information about the sink, so
let's move dvi_dual and max_tmds_clock in there.

v2: Deal with superfluous code shuffling
    Document dvi_dual and max_tmds_clock too

Cc: Alex Deucher <[email protected]>
Cc: "Christian König" <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
Reviewed-by: Christian König <[email protected]> (v1)
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/edid: Make max_tmds_clock kHz instead of MHz
Ville Syrjälä [Wed, 28 Sep 2016 13:51:36 +0000 (16:51 +0300)]
drm/edid: Make max_tmds_clock kHz instead of MHz

We generally store clocks in kHz, so let's do that for the
HDMI max TMDS clock value as well. Less surpising.

v2: Deal with superfluous code shuffling

Cc: Alex Deucher <[email protected]>
Cc: "Christian König" <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
Reviewed-by: Christian König <[email protected]> (v1)
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/edid: Clear old dvi_dual/max_tmds_clock before parsing the new EDID
Ville Syrjälä [Wed, 28 Sep 2016 13:51:35 +0000 (16:51 +0300)]
drm/edid: Clear old dvi_dual/max_tmds_clock before parsing the new EDID

Clear out old max_tmds_clock and dvi_dual information (possibly from a
previous EDID) before parsing the current EDID. Tne current EDID might
not even have these in its HDMI VSDB, which would mean that we'd leave
the old stale values in place.

Signed-off-by: Ville Syrjälä <[email protected]>
Acked-by: Christian König <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/edid: Clear old audio latency values before parsing the new EDID
Ville Syrjälä [Wed, 28 Sep 2016 13:51:34 +0000 (16:51 +0300)]
drm/edid: Clear old audio latency values before parsing the new EDID

Clear out stale audio latency information (potentially from a previous
EDID) before constructing the ELD from the EDID.

Signed-off-by: Ville Syrjälä <[email protected]>
Acked-by: Christian König <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm: Convert prime dma-buf <-> handle to rbtree
Chris Wilson [Mon, 26 Sep 2016 20:44:14 +0000 (21:44 +0100)]
drm: Convert prime dma-buf <-> handle to rbtree

Currently we use a linear walk to lookup a handle and return a dma-buf,
and vice versa. A long overdue TODO task is to convert that to a
hashtable. Since the initial implementation of dma-buf/prime, we now
have resizeable hashtables we can use (and now a future task is to RCU
enable the lookup!). However, this patch opts to use an rbtree instead
to provide O(lgN) lookups (and insertion, deletion). rbtrees were chosen
over using the RCU backed resizable hashtable to firstly avoid the
reallocations (rbtrees can be embedded entirely within the parent
struct) and to favour simpler code with predictable worst case
behaviour. In simple testing, the difference between using the constant
lookup and insertion of the rhashtable and the rbtree was less than 10%
of the wall time (igt/benchmarks/prime_lookup) - both are dramatic
improvements over the existing linear lists.

v2: Favour rbtree over rhashtable

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94631
Signed-off-by: Chris Wilson <[email protected]>
Cc: Sean Paul <[email protected]>
Cc: David Herrmann <[email protected]>
Reviewed-by: David Herrmann <[email protected]>
Reviewed-by: Sean Paul <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/mediatek: mark symbols static where possible
Baoyou Xie [Sun, 25 Sep 2016 07:38:29 +0000 (15:38 +0800)]
drm/mediatek: mark symbols static where possible

We get 4 warnings when building kernel with W=1:
drivers/gpu/drm/mediatek/mtk_hdmi.c:1089:6: warning: no previous prototype for 'mtk_hdmi_audio_enable' [-Wmissing-prototypes]
drivers/gpu/drm/mediatek/mtk_hdmi.c:1095:6: warning: no previous prototype for 'mtk_hdmi_audio_disable' [-Wmissing-prototypes]
drivers/gpu/drm/mediatek/mtk_hdmi.c:1101:5: warning: no previous prototype for 'mtk_hdmi_audio_set_param' [-Wmissing-prototypes]
drivers/gpu/drm/mediatek/mtk_hdmi.c:1627:5: warning: no previous prototype for 'mtk_hdmi_audio_digital_mute' [-Wmissing-prototypes]

In fact, both functions are only used in the file in which they are
declared and don't need a declaration, but can be made static.
So this patch marks both functions with 'static'.

Signed-off-by: Baoyou Xie <[email protected]>
[seanpaul fixed checkpatch warning for argument alignment]
Signed-off-by: Sean Paul <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/rockchip: mark symbols static where possible
Baoyou Xie [Sun, 25 Sep 2016 07:43:08 +0000 (15:43 +0800)]
drm/rockchip: mark symbols static where possible

We get 2 warnings when building kernel with W=1:
drivers/gpu/drm/rockchip/rockchip_drm_drv.c:309:6: warning: no previous prototype for 'rockchip_drm_fb_suspend' [-Wmissing-prototypes]
drivers/gpu/drm/rockchip/rockchip_drm_drv.c:318:6: warning: no previous prototype for 'rockchip_drm_fb_resume' [-Wmissing-prototypes]

In fact, these functions are only used in the file in which they are
declared and don't need a declaration, but can be made static.
So this patch marks these functions with 'static'.

Signed-off-by: Baoyou Xie <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/rockchip: add missing header dependencies
Baoyou Xie [Sun, 25 Sep 2016 07:38:28 +0000 (15:38 +0800)]
drm/rockchip: add missing header dependencies

We get 2 warnings when building kernel with W=1:
drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c:130:5: warning: no previous prototype for 'rockchip_drm_fbdev_init' [-Wmissing-prototypes]
drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c:173:6: warning: no previous prototype for 'rockchip_drm_fbdev_fini' [-Wmissing-prototypes]

In fact, these functions are declared
in drivers/gpu/drm/rockchip/rockchip_drm_fbdev.h,
so this patch adds missing header dependencies.

Signed-off-by: Baoyou Xie <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm: virtio: reinstate drm_virtio_set_busid()
Laszlo Ersek [Mon, 3 Oct 2016 17:43:03 +0000 (19:43 +0200)]
drm: virtio: reinstate drm_virtio_set_busid()

Before commit a325725633c2 ("drm: Lobotomize set_busid nonsense for !pci
drivers"), several DRM drivers for platform devices used to expose an
explicit "drm_driver.set_busid" callback, invariably backed by
drm_platform_set_busid().

Commit a325725633c2 removed drm_platform_set_busid(), along with the
referring .set_busid field initializations. This was justified because
interchangeable functionality had been implemented in drm_dev_alloc() /
drm_dev_init(), which DRM_IOCTL_SET_VERSION would rely on going forward.

However, commit a325725633c2 also removed drm_virtio_set_busid(), for
which the same consolidation was not appropriate: this .set_busid callback
had been implemented with drm_pci_set_busid(), and not
drm_platform_set_busid(). The error regressed Xorg/xserver on QEMU's
"virtio-vga" card; the drmGetBusid() function from libdrm would no longer
return stable PCI identifiers like "pci:0000:00:02.0", but rather unstable
platform ones like "virtio0".

Reinstate drm_virtio_set_busid() with judicious use of

  git checkout -p a325725633c2^ -- drivers/gpu/drm/virtio

Cc: Daniel Vetter <[email protected]>
Cc: Emil Velikov <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Cc: Gustavo Padovan <[email protected]>
Cc: Hans de Goede <[email protected]>
Cc: Joachim Frieben <[email protected]>
Cc: [email protected] # v4.8
Reported-by: Joachim Frieben <[email protected]>
Fixes: a325725633c26aa66ab940f762a6b0778edf76c0
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1366842
Signed-off-by: Laszlo Ersek <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
8 years agodrm: Undo damage to page_flip_ioctl
Daniel Vetter [Mon, 3 Oct 2016 08:28:27 +0000 (10:28 +0200)]
drm: Undo damage to page_flip_ioctl

I screwed up rebasing of my patch in

commit 43968d7b806d7a7e021261294c583a216fddf0e5
Author: Daniel Vetter <[email protected]>
Date:   Wed Sep 21 10:59:24 2016 +0200

    drm: Extract drm_plane.[hc]

which meant on error paths drm_crtc_vblank_put could be called without
a get, leading to an underrun of the refcount.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98020
Reported-and-tested-by: Andy Furniss <[email protected]>
Cc: Sean Paul <[email protected]>
Cc: Michel Dänzer <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Dave Airlie <[email protected]>
8 years agodrm: Restore lost drm_framebuffer_unreference in drm_mode_page_flip_ioctl
Chris Wilson [Wed, 28 Sep 2016 22:25:00 +0000 (23:25 +0100)]
drm: Restore lost drm_framebuffer_unreference in drm_mode_page_flip_ioctl

Commit 43968d7b806d ("drm: Extract drm_plane.[hc]") was not the simple
cut'n'paste we presumed, somehow it introduced a leak of the page flip
target's framebuffer.

Fixes: 43968d7b806d ("drm: Extract drm_plane.[hc]")
Signed-off-by: Chris Wilson <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Sean Paul <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Dave Airlie <[email protected]>
8 years agoMerge branch 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daein...
Dave Airlie [Tue, 4 Oct 2016 02:43:31 +0000 (12:43 +1000)]
Merge branch 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next

This pull request includes,
    - Code refactoring on HDMI DDC and PHY.
    - Regression fixup on deadlock issue with G2D pm integration.
    - Fixup on page fault issue with wait_for_vblank mechianism specific to Exynos drm.
    - And some cleanups.

* 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos:
  drm/exynos: g2d: simplify g2d_free_runqueue_node()
  drm/exynos: g2d: use autosuspend mode for PM runtime
  drm/exynos: g2d: wait for engine to finish
  drm/exynos: g2d: remove runqueue nodes in g2d_{close,remove}()
  drm/exynos: g2d: move PM management to runqueue worker
  Revert "drm/exynos: g2d: fix system and runtime pm integration"
  drm/exynos: use drm core to handle page-flip event
  drm/exynos: mark exynos_dp_crtc_clock_enable() static
  drm/exynos/fimd: add clock rate checking
  drm/exynos: fix pending update handling
  drm/exynos/vidi: use timer for vblanks instead of sleeping worker
  drm/exynos: g2d: beautify probing message
  drm/exynos: mixer: simplify loop in vp_win_reset()
  drm/exynos: mixer: convert booleans to flags in mixer context
  gpu: drm: exynos_hdmi: Remove duplicate initialization of regulator bulk consumer
  gpu: drm: exynos_hdmi: Move PHY logic into single function
  gpu: drm: exynos_hdmi: Move DDC logic into single function

8 years agodrm/i915: Use correct index for backtracking HUNG semaphores
Chris Wilson [Mon, 3 Oct 2016 12:45:16 +0000 (13:45 +0100)]
drm/i915: Use correct index for backtracking HUNG semaphores

When decoding the semaphores inside hangcheck, we need to use the hw-id
and not the local array index.

Fixes: de1add360522 ("drm/i915: Decouple execbuf uAPI ...")
Testcase: igt/gem_exec_whisper/hang # gen6-7
Signed-off-by: Chris Wilson <[email protected]>
Cc: Mika Kuoppala <[email protected]>
Cc: Tvrtko Ursulin <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: [email protected]
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Unalias obj->phys_handle and obj->userptr
Chris Wilson [Mon, 3 Oct 2016 12:45:15 +0000 (13:45 +0100)]
drm/i915: Unalias obj->phys_handle and obj->userptr

We use obj->phys_handle to choose the pread/pwrite path, but as
obj->phys_handle is a union with obj->userptr, we then mistakenly use
the phys_handle path for userptr objects within pread/pwrite.

Testcase: igt/gem_userptr_blits/forbidden-operations
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97519
Signed-off-by: Chris Wilson <[email protected]>
Cc: [email protected]
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915: Just clear the mmiodebug before a register access
Chris Wilson [Mon, 3 Oct 2016 12:45:14 +0000 (13:45 +0100)]
drm/i915: Just clear the mmiodebug before a register access

When we enable the per-register access mmiodebug, it is to detect which
access is illegal. Reporting on earlier untraced access outside of the
mmiodebug does not help debugging (as the suspicion is immediately put
upon the current register which is not at fault)!

References: https://bugs.freedesktop.org/show_bug.cgi?id=97985
Signed-off-by: Chris Wilson <[email protected]>
Cc: Mika Kuoppala <[email protected]>
Reviewed-by: Mika Kuoppala <[email protected]>
Cc: [email protected]
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/i915/gen9: only add the planes actually affected by ddb changes
Paulo Zanoni [Thu, 29 Sep 2016 19:36:48 +0000 (16:36 -0300)]
drm/i915/gen9: only add the planes actually affected by ddb changes

We were previously adding all the planes owned by the CRTC even when
the ddb partitioning didn't change for them. As a consequence, a lot
of functions were being called when we were just moving the cursor
around the screen, such as skylake_update_primary_plane().

This was causing flickering on the primary plane when moving the
cursor. I'm not 100% sure which operation caused the flickering, but
we were writing to a lot of registers, so it could be any of these
writes. With this patch, just moving the mouse won't add the primary
plane to the commit since it won't trigger a change in DDB
partitioning.

v2: Use skl_ddb_entry_equal() (Lyude).
v3: Change Reported-and-bisected-by: to Reported-by: for checkpatch

Fixes: 05a76d3d6ad1 ("drm/i915/skl: Ensure pipes with changed wms get added to the state")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97888
Cc: Mike Lothian <[email protected]>
Cc: [email protected]
Reported-by: Mike Lothian <[email protected]>
Signed-off-by: Paulo Zanoni <[email protected]>
Signed-off-by: Lyude <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/exynos: g2d: simplify g2d_free_runqueue_node()
Tobias Jakobi [Tue, 27 Sep 2016 15:59:57 +0000 (17:59 +0200)]
drm/exynos: g2d: simplify g2d_free_runqueue_node()

The function is never called with zero 'runqueue_node'.

Signed-off-by: Tobias Jakobi <[email protected]>
Acked-by: Marek Szyprowski <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
8 years agodrm/exynos: g2d: use autosuspend mode for PM runtime
Tobias Jakobi [Tue, 27 Sep 2016 15:59:56 +0000 (17:59 +0200)]
drm/exynos: g2d: use autosuspend mode for PM runtime

The runqueue worker currently issues a get() when a new
node is processed, and a put() once a node is completed.

The corresponding suspend and resume calls currently only
do clock gating, but with the upcoming introduction of
IOMMU runpm also the corresponding IOMMU domain gets
enabled (for get()) and disabled (for put()). This
introduces performance regressions with we mitigate here.

Switch PM runtime to autosuspend, such that clock gating
and IOMMU control only happens when the engine is idle for
a 'long' time.

Signed-off-by: Tobias Jakobi <[email protected]>
Acked-by: Marek Szyprowski <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
8 years agodrm/exynos: g2d: wait for engine to finish
Tobias Jakobi [Tue, 27 Sep 2016 15:50:09 +0000 (17:50 +0200)]
drm/exynos: g2d: wait for engine to finish

While the engine works on a runqueue node it does memory access to
the buffers associated with that node.
Make sure that the engine is idle when g2d_close() and/or
g2d_remove() are called, i.e. buffer associated with the process (for
g2d_close()), or all buffers (for g2d_remove()) can be safely be
unmapped.

We have to take into account that the engine might be in an undefined
state, i.e. it hangs and doesn't become idle. In this case, we issue
a hardware reset to return the hardware and the driver context into a
proper state.

Signed-off-by: Tobias Jakobi <[email protected]>
Acked-by: Marek Szyprowski <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
8 years agodrm/exynos: g2d: remove runqueue nodes in g2d_{close,remove}()
Tobias Jakobi [Tue, 27 Sep 2016 15:50:08 +0000 (17:50 +0200)]
drm/exynos: g2d: remove runqueue nodes in g2d_{close,remove}()

The driver might be closed (and/or removed) while there are still
nodes queued for processing.
Make sure to remove these nodes, which means all of them in
the case of g2d_remove() and only those belonging to the
corresponding process in g2d_close().

Signed-off-by: Tobias Jakobi <[email protected]>
Acked-by: Marek Szyprowski <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
8 years agodrm/exynos: g2d: move PM management to runqueue worker
Tobias Jakobi [Tue, 27 Sep 2016 15:50:07 +0000 (17:50 +0200)]
drm/exynos: g2d: move PM management to runqueue worker

Do all pm_runtime_{get,put}() calls in the runqueue worker.
Also keep track of the engine's idle/busy state.

Signed-off-by: Tobias Jakobi <[email protected]>
Acked-by: Marek Szyprowski <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
8 years agoRevert "drm/exynos: g2d: fix system and runtime pm integration"
Tobias Jakobi [Tue, 27 Sep 2016 15:50:06 +0000 (17:50 +0200)]
Revert "drm/exynos: g2d: fix system and runtime pm integration"

This reverts commit b05984e21a7e000bf5074ace00d7a574944b2c16.

The change, i.e. merging the sleep and runpm operations, produces
a deadlock situation:
(1) exynos_g2d_exec_ioctl() prepares a runqueue node and
    calls g2d_exec_runqueue()
(2) g2d_exec_runqueue() calls g2d_dma_start() which gets
    runtime PM sync
(3) runtime PM core calls g2d_runtime_resume()
(4) g2d_runtime_resume() calls g2d_exec_runqueue(), which
    loops back to (2)

Due to mutexes that are in place, a deadlock situation is created.

Signed-off-by: Tobias Jakobi <[email protected]>
Acked-by: Marek Szyprowski <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
8 years agodrm/exynos: use drm core to handle page-flip event
Andrzej Hajda [Fri, 23 Sep 2016 13:21:38 +0000 (15:21 +0200)]
drm/exynos: use drm core to handle page-flip event

Exynos DRM framework handled page-flip event with custom code.
The patch replaces it with drm-core vblank queue.

Signed-off-by: Andrzej Hajda <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
8 years agodrm/exynos: mark exynos_dp_crtc_clock_enable() static
Baoyou Xie [Sun, 25 Sep 2016 07:54:59 +0000 (15:54 +0800)]
drm/exynos: mark exynos_dp_crtc_clock_enable() static

We get 1 warning when building kernel with W=1:
drivers/gpu/drm/exynos/exynos_dp.c:46:5: warning: no previous prototype for 'exynos_dp_crtc_clock_enable' [-Wmissing-prototypes]

In fact, this function is only used in the file in which it is
declared and don't need a declaration, but can be made static.
So this patch marks it 'static'.

Signed-off-by: Baoyou Xie <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
8 years agodrm/exynos/fimd: add clock rate checking
Andrzej Hajda [Fri, 23 Sep 2016 10:43:29 +0000 (12:43 +0200)]
drm/exynos/fimd: add clock rate checking

In case of some platforms fimd clocks can be configured to
very low values, as a result refresh rate can be very low and
driver/drm-core will timeout waiting for vblanks, it will result
in premature removal of framebuffers and will cause oopses.
The patch adds atomic_check callback to fimd to prevent setting
such modes.

Reported-by: Tobias Jakobi <[email protected]>
Signed-off-by: Andrzej Hajda <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
8 years agodrm/exynos: fix pending update handling
Andrzej Hajda [Mon, 26 Sep 2016 07:50:21 +0000 (16:50 +0900)]
drm/exynos: fix pending update handling

Exynos DRM devices update their registers at vblank time. Exynos-DRM uses
custom mechanism to wait for vblank. This mechanism is error prone -
variables are not updated atomically. As a result in certain circumstances
user space can try to free buffers which are still in use by hardware,
in such cases IOMMU can throw OOPS.
The patch instead of fixing the mechanism replaces it with drm core helper.

Signed-off-by: Andrzej Hajda <[email protected]>
Reviewed-by: Gustavo Padovan <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
8 years agodrm/exynos/vidi: use timer for vblanks instead of sleeping worker
Andrzej Hajda [Fri, 23 Sep 2016 08:15:23 +0000 (10:15 +0200)]
drm/exynos/vidi: use timer for vblanks instead of sleeping worker

VIDI driver uses fake vblank handler to generate vblank events.
It was implemented using worker which slept for vblank time, additionally
it did not work if there were no page flips. The patch replaces it with
timer, uses drm_crtc_vblank_(on|off) helpers to manage it and fixes
behavior for non-page-flip cases.
This change allows further improvements of vblank in exynos-drm framework.

Signed-off-by: Andrzej Hajda <[email protected]>
Reviewed-by: Gustavo Padovan <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
8 years agodrm/exynos: g2d: beautify probing message
Tobias Jakobi [Thu, 22 Sep 2016 14:57:20 +0000 (16:57 +0200)]
drm/exynos: g2d: beautify probing message

Apply some 'make-up' in g2d_probe().

Signed-off-by: Tobias Jakobi <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
8 years agodrm/exynos: mixer: simplify loop in vp_win_reset()
Tobias Jakobi [Thu, 22 Sep 2016 14:57:19 +0000 (16:57 +0200)]
drm/exynos: mixer: simplify loop in vp_win_reset()

A simple while loop should do the same here.

Signed-off-by: Tobias Jakobi <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
8 years agodrm/exynos: mixer: convert booleans to flags in mixer context
Tobias Jakobi [Thu, 22 Sep 2016 02:36:13 +0000 (11:36 +0900)]
drm/exynos: mixer: convert booleans to flags in mixer context

The mixer context struct already has a 'flags' field, so
we can use it to store the 'interlace', 'vp_enabled' and
'has_sclk' booleans.
We use the non-atomic helper functions to access these bits.

Signed-off-by: Tobias Jakobi <[email protected]>
Reviewed-by: Andrzej Hajda <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
8 years agogpu: drm: exynos_hdmi: Remove duplicate initialization of regulator bulk consumer
Milo Kim [Wed, 31 Aug 2016 06:14:27 +0000 (15:14 +0900)]
gpu: drm: exynos_hdmi: Remove duplicate initialization of regulator bulk consumer

The helper, devm_regulator_bulk_get() initializes the consumer as NULL,
so this code can be ignored.

Signed-off-by: Milo Kim <[email protected]>
Reviewed-by: Andrzej Hajda <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
8 years agogpu: drm: exynos_hdmi: Move PHY logic into single function
Milo Kim [Wed, 31 Aug 2016 06:14:26 +0000 (15:14 +0900)]
gpu: drm: exynos_hdmi: Move PHY logic into single function

Paring DT properties and getting PHY IO (memory mapped or I2C) in one
function.

Signed-off-by: Milo Kim <[email protected]>
Reviewed-by: Andrzej Hajda <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
8 years agogpu: drm: exynos_hdmi: Move DDC logic into single function
Milo Kim [Wed, 31 Aug 2016 06:14:25 +0000 (15:14 +0900)]
gpu: drm: exynos_hdmi: Move DDC logic into single function

Paring DT properties and getting the I2C adapter in one function.

Signed-off-by: Milo Kim <[email protected]>
Reviewed-by: Andrzej Hajda <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
8 years agoMerge branch 'drm-next-4.9' of git://people.freedesktop.org/~agd5f/linux into drm...
Dave Airlie [Fri, 30 Sep 2016 03:18:26 +0000 (13:18 +1000)]
Merge branch 'drm-next-4.9' of git://people.freedesktop.org/~agd5f/linux into drm-next

Some additional fixes for 4.9:
- The rest of Christian's GTT rework which fixes a long standing bug
  in the GPUVM code among other things
- Changes to the pci shutdown callbacks for certain hypervisors
- Fix hpd interrupt storms on eDP panels which have the hpd interrupt
  enabled by the bios
- misc cleanups and bug fixes

* 'drm-next-4.9' of git://people.freedesktop.org/~agd5f/linux: (33 commits)
  drm/radeon: always apply pci shutdown callbacks
  drm/amdgpu: always apply pci shutdown callbacks (v2)
  drm/amdgpu: improve VM PTE trace points
  drm/amdgpu: fix GART_DEBUGFS define
  drm/amdgpu: free userptrs even if GTT isn't bound
  drm/amd/amdgpu: Various cleanups for DCEv6
  drm/amdgpu: fix BO move offsets
  drm/amdgpu: fix amdgpu_move_blit on 32bit systems
  drm/amdgpu: fix gtt_mgr bo's offset
  drm/amdgpu: fix initializing the VM BO shadow
  drm/amdgpu: fix initializing the VM last eviction counter
  drm/amdgpu: cleanup VM shadow BO unreferencing
  drm/amdgpu: allocate GTT space for shadow VM page tables
  drm/amdgpu: rename all rbo variable to abo v2
  drm/amdgpu: remove unused member from struct amdgpu_bo
  drm/amdgpu: add a custom GTT memory manager v2
  drm/amdgpu/dce6: disable hpd on local panels
  drm/amdgpu/dce8: disable hpd on local panels
  drm/amdgpu/dce11: disable hpd on local panels
  drm/amdgpu/dce10: disable hpd on local panels
  ...

8 years agoMerge tag 'drm/tegra/for-4.9-rc1' of git://anongit.freedesktop.org/tegra/linux into...
Dave Airlie [Fri, 30 Sep 2016 03:00:36 +0000 (13:00 +1000)]
Merge tag 'drm/tegra/for-4.9-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next

drm/tegra: Changes for v4.9-rc1

One bugfix that avoids overwriting the Y plane base address when
displaying buffers with one of the YUV/YVU formats.

* tag 'drm/tegra/for-4.9-rc1' of git://anongit.freedesktop.org/tegra/linux:
  drm/tegra: Fix window[0] base address corruption

8 years agoMerge tag 'drm/panel/for-4.9-rc1' of git://anongit.freedesktop.org/tegra/linux into...
Dave Airlie [Fri, 30 Sep 2016 02:56:31 +0000 (12:56 +1000)]
Merge tag 'drm/panel/for-4.9-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next

drm/panel: Changes for v4.9-rc1

Adds support for one more panel to the simple-panel driver, fixes up a
couple of delays and flags for existing panels and finally adds a new
driver for the DSI panel found on Nexus 7 devices.

* tag 'drm/panel/for-4.9-rc1' of git://anongit.freedesktop.org/tegra/linux:
  drm/panel: Add JDI LT070ME05000 WUXGA DSI Panel
  dt-bindings: Add JDI LT070ME05000 panel bindings
  drm/panel: simple: Fix bus_format for the Olimex LCD-OLinuXino-4.3TS
  drm/panel: simple-panel: Add delay timings for Starry KR122EA0SRA
  drm/panel: simple: Fix bus flags for Ortustech com43h4m85ulc
  drm/panel: simple: Add Innolux G101ICE-L01 panel
  drm/panel: simple: Add delay timing for Sharp LQ123P1JX31
  drm/dsi: Implement DCS set/get display brightness
  drm/dsi: Order DCS helpers by command code

8 years agoRevert "drm/i915: start adding dp mst audio"
Dhinakaran Pandiyan [Thu, 29 Sep 2016 06:55:04 +0000 (23:55 -0700)]
Revert "drm/i915: start adding dp mst audio"

This reverts 'commit 3708d5e082c3 ("drm/i915: start adding dp mst audio")'
because it breaks MST multi-monitor setups on some platforms.

Fixes: 3708d5e082c3 ("drm/i915: start adding dp mst audio")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97907
Signed-off-by: Dhinakaran Pandiyan <[email protected]>
Reported-by: Kim Lidström <[email protected]>
Cc: Libin Yang <[email protected]>
Cc: Lyude <[email protected]>
Cc: Jani Nikula <[email protected]>
Cc: Rodrigo Vivi <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
8 years agodrm/radeon: always apply pci shutdown callbacks
Alex Deucher [Thu, 22 Sep 2016 18:43:50 +0000 (14:43 -0400)]
drm/radeon: always apply pci shutdown callbacks

We can't properly detect all hypervisors and we
need this to properly tear down the hardware.

Signed-off-by: Alex Deucher <[email protected]>
8 years agodrm/amdgpu: always apply pci shutdown callbacks (v2)
Alex Deucher [Thu, 22 Sep 2016 18:40:29 +0000 (14:40 -0400)]
drm/amdgpu: always apply pci shutdown callbacks (v2)

We can't properly detect all hypervisors and we
need this to properly tear down the hardware.

v2: trivial warning fix

Signed-off-by: Alex Deucher <[email protected]>
8 years agodrm/amdgpu: improve VM PTE trace points
Christian König [Sun, 25 Sep 2016 14:11:52 +0000 (16:11 +0200)]
drm/amdgpu: improve VM PTE trace points

Use a separate one for the copy operation and
log all the interesting parameters.

Signed-off-by: Christian König <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
8 years agodrm/amdgpu: fix GART_DEBUGFS define
Christian König [Sun, 25 Sep 2016 14:10:06 +0000 (16:10 +0200)]
drm/amdgpu: fix GART_DEBUGFS define

Obviously missed during the rename.

Signed-off-by: Christian König <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
8 years agodrm/amdgpu: free userptrs even if GTT isn't bound
Christian König [Thu, 22 Sep 2016 12:19:50 +0000 (14:19 +0200)]
drm/amdgpu: free userptrs even if GTT isn't bound

This fixes a memory leak since binding GTT only on demand.

Signed-off-by: Christian König <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
8 years agodrm/amd/amdgpu: Various cleanups for DCEv6
Tom St Denis [Thu, 22 Sep 2016 16:29:40 +0000 (12:29 -0400)]
drm/amd/amdgpu: Various cleanups for DCEv6

Signed-off-by: Tom St Denis <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
This page took 0.165506 seconds and 4 git commands to generate.