platform/kernel/linux-exynos.git
9 years agodrm/i915: Drop some more CHV pre-production workarounds
Ville Syrjälä [Wed, 21 Jan 2015 17:37:59 +0000 (19:37 +0200)]
drm/i915: Drop some more CHV pre-production workarounds

Drop WaDisablePwrmtrEvent:chv as it's no longer needed.

Also remove the WaSetMaskForGfxBusyness:chv note, but we still
leave the GEN6_RP_MEDIA_IS_GFX bit enabled as that's still the
recommended setting.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Arun Siluvery <arun.siluvery@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Implement Wa4x4STCOptimizationDisable:chv
Ville Syrjälä [Wed, 21 Jan 2015 17:37:58 +0000 (19:37 +0200)]
drm/i915: Implement Wa4x4STCOptimizationDisable:chv

Wa4x4STCOptimizationDisable got only implemented for BDW, but according
to the w/a database CHV needs it too, so add it.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Arun Siluvery <arun.siluvery@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Simplify flush_cpu_write_domain
Daniel Vetter [Wed, 21 Jan 2015 13:53:48 +0000 (14:53 +0100)]
drm/i915: Simplify flush_cpu_write_domain

We can push down the decision whether to force flushing into the
implementation since in all places that matter obj->pin_display is
accurate already. The only place where the optimization really matters
is the sw_finish_ioctl, and that already checks for obj->pin_display
on its own.

I suspect that this was simply an artifact of how

commit 2c22569bba8af6c2976d5f9479fe54a53a39966b
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Aug 9 12:26:45 2013 +0100

    drm/i915: Update rules for writing through the LLC with the cpu

evolved - only v2 added the pin_display tracking.

Note that we still retain the gist of this logic from the above commit
with the explicit force argument for the low-level clflush function.

Ville noted in his review that there's a slight behavioural change in
the set_to_gtt_domain function, which now also will flush display
plane data. This opens-open the potential for userspace to start doing
buggy things by omitting the sw_finish_ioctl, which is why I've
rejected a functional equivalent patch from Ville a while ago:

http://lists.freedesktop.org/archives/intel-gfx/2013-November/036421.html

But on second consideration it's not that evil, and in any case the
justification here is more clarity, not allowing crazy userspace.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Use sizeof(*fb) not sizeof(struct ...) in get_initial_plane_config()
Damien Lespiau [Wed, 21 Jan 2015 14:07:19 +0000 (14:07 +0000)]
drm/i915: Use sizeof(*fb) not sizeof(struct ...) in get_initial_plane_config()

Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Fix kzalloc() smatch warnings in get_initial_plane_config()
Damien Lespiau [Wed, 21 Jan 2015 13:50:54 +0000 (13:50 +0000)]
drm/i915: Fix kzalloc() smatch warnings in get_initial_plane_config()

Smatch doesn't like:

  struct drm_framebuffer *fb;
  fb = kzalloc(sizeof(struct intel_framebuffer), GFP_KERNEL);

and warns with:

  warn: struct type mismatch 'drm_framebuffer vs intel_framebuffer'

This implicit cast was correct as struct intel_framebuffer has struct
drm_framebuffer as its first member, but in case someone want to reorder
the fields for some reason, it's slightly safer to access the underlying
drm_framebuffer through intel_fb->base.

Also, having fewer static analysis warnings is a worthy goal.

Cc: kbuild@01.org
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Performed deferred clflush inside set-cache-level
Chris Wilson [Tue, 13 Jan 2015 13:32:52 +0000 (13:32 +0000)]
drm/i915: Performed deferred clflush inside set-cache-level

Currently we are hitting the WARN inside
i915_gem_object_set_cache_level() as we can now have an unbound object
in the GTT write domain (due to 43566dedde54f9 "drm/i915: Broaden
application of set-domain(GTT)"). To avoid the warning, we need to track
when we elided the clflush on a cacheable object and then evict the
cache for the object when we move the object out of a cacheable domain.

Reported-by: Jani Nikula <jani.nikula@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Tested-by: Jani Nikula <jani.nikula@intel.com>
Testcase: igt/gem_mmap_wc/set-cache-level
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88607
Tested-by: huax.lu@intel.com
[danvet: Split if into nested if as discussion on the m-l.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Rename unpin_count to pin_count
Mika Kuoppala [Tue, 13 Jan 2015 09:32:25 +0000 (11:32 +0200)]
drm/i915: Rename unpin_count to pin_count

We increase it when we pin, so for the casual reader
rename it to cause less confusion.

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Thomas Daniel <thomas.daniel@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Balance context pinning on reset cleanup
Mika Kuoppala [Tue, 13 Jan 2015 09:32:24 +0000 (11:32 +0200)]
drm/i915: Balance context pinning on reset cleanup

We pin when we submit to execlist queue. Balance
the pinning when the submitted queue is cleaned on reset.

Cc: Dave Gordon <david.s.gordon@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Thomas Daniel <thomas.daniel@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: add I915_PARAM_HAS_BSD2 to i915_getparam
Zhipeng Gong [Tue, 13 Jan 2015 00:48:25 +0000 (08:48 +0800)]
drm/i915: add I915_PARAM_HAS_BSD2 to i915_getparam

This will let userland only try to use the new ring
when the appropriate kernel is present

v2: change the number to be consistent with upstream (Zhipeng)

Signed-off-by: Zhipeng Gong <zhipeng.gong@intel.com>
Reviewed--by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Specify bsd rings through exec flag
Zhipeng Gong [Tue, 13 Jan 2015 00:48:24 +0000 (08:48 +0800)]
drm/i915: Specify bsd rings through exec flag

On Skylake GT3 we have 2 Video Command Streamers (VCS), which is asymmetrical.
For example, HEVC GPU commands can be only dispatched to VCS1 ring.
But userspace has no control when using VCS1 or VCS2. This patch introduces
a mechanism to avoid the default ping-pong mode and use one specific ring
through execution flag. This mechanism is usable for all the platforms
with 2 VCS rings.

The open source usage is from these two commits in vaapi/intel:
commit 702050f04131a44ef8ac16651708ce8a8d98e4b8
Author: Zhao, Yakui <yakui.zhao@intel.com>
Date:   Mon Nov 17 12:44:19 2014 +0800

    Allow the batchbuffer to be submitted with override flag

commit a56efcdf27d11ad9b21664b4a2cda72d7f90f5a8
Author: Zhao Yakui <yakui.zhao@intel.com>
Date:   Mon Nov 17 12:44:22 2014 +0800

    Add the override flag to assure that HEVC video command
always uses BSD ring0 for SKL GT3 machine

v2: fix whitespace (Rodrigo)
v3: remove incorrect chunk that came on -collector rebase. (Rodrigo)
v4: change the comment (Zhipeng)
v5: address Daniel's comment (Zhipeng)

Signed-off-by: Zhipeng Gong <zhipeng.gong@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Rename plane_config to initial_plane_config
Damien Lespiau [Tue, 20 Jan 2015 12:51:52 +0000 (12:51 +0000)]
drm/i915: Rename plane_config to initial_plane_config

This vfunc and related structure are only used for fast boot, so let's
rename them to not take them as general purpose ones.

v2: Fix conflicts caused by the introduction of struct intel_crtc_state

Reviewed-By: Tvrtko Ursulin <tvrtko.ursulin@intel.com> (v1)
Suggested-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915/skl: Provide a Skylake version of get_plane_config()
Damien Lespiau [Tue, 20 Jan 2015 12:51:51 +0000 (12:51 +0000)]
drm/i915/skl: Provide a Skylake version of get_plane_config()

Universal planes have changed a bit the register organization.

v2: Rebase on top of the latest drm-intel-nightly

v3: Use PLANE_SIZE to retrieve the fb size (Tvrtko)
    Don't use BUG() (Tvrtko)

v4: Use MISSING_CASE (Daniel)

Reviewed-By: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915/skl: intel_format_to_fourcc() doesn't work for SKL planes
Damien Lespiau [Tue, 20 Jan 2015 12:51:50 +0000 (12:51 +0000)]
drm/i915/skl: intel_format_to_fourcc() doesn't work for SKL planes

We will have a skl_ version shortly!

Reviewed-By: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Make intel_format_to_fourcc() static
Damien Lespiau [Tue, 20 Jan 2015 12:51:49 +0000 (12:51 +0000)]
drm/i915: Make intel_format_to_fourcc() static

v2: Fix conflict caused by the introduction of struct intel_crtc_state

Reviewed-By: Tvrtko Ursulin <tvrtko.ursulin@intel.com> (v1)
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Use pipe_name() in the get_plane_config() functions
Damien Lespiau [Tue, 20 Jan 2015 12:51:48 +0000 (12:51 +0000)]
drm/i915: Use pipe_name() in the get_plane_config() functions

We may as well try to be consistent everywhere and know the pipes by
their name.

Reviewed-By: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Don't use crtc->plane in ILK+ get_config()
Damien Lespiau [Tue, 20 Jan 2015 12:51:47 +0000 (12:51 +0000)]
drm/i915: Don't use crtc->plane in ILK+ get_config()

crtc->plane can only be different from crtc->pipe pre-Gen4. Don't use it
in new-ish code.

Reviewed-By: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Unclutter the get_plane() functions
Damien Lespiau [Tue, 20 Jan 2015 12:51:46 +0000 (12:51 +0000)]
drm/i915: Unclutter the get_plane() functions

crtc->base.primary->fb was used everywhere. Use fb to temporarily point
there and don't forget to assign fb to its final destination at the end.

v2: Rebase on top of misc changes (mask of DSPSURF, PAGE_ALIGN)

Reviewed-By: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Use a common function for computing the fb height alignment
Damien Lespiau [Tue, 20 Jan 2015 12:51:45 +0000 (12:51 +0000)]
drm/i915: Use a common function for computing the fb height alignment

If we need to change the fb height constraints, it sounds like a good
idea to have to do it in one place only.

v2: v2: Rebase on top of Ander's "Make intel_crtc->config a pointer"

Reviewed-By: Tvrtko Ursulin <tvrtko.ursulin@intel.com> (v1)
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Change plane_config to store a tiling_mode
Damien Lespiau [Tue, 20 Jan 2015 12:51:44 +0000 (12:51 +0000)]
drm/i915: Change plane_config to store a tiling_mode

Rather than having "tiled" meaning "is it X-tiled?" convert the field to
explicitely store the tiling mode. The code doesn't have to change much
as 1 is conveniently I915_TILING_X.

This is to accommodate future changes around tiling modes and scannout
buffers.

v2: Rebase on top of Ander's "Make intel_crtc->config a pointer"

Reviewed-By: Tvrtko Ursulin <tvrtko.ursulin@intel.com> (v1)
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915/skl: Gen9 coarse power gating
Zhe Wang [Tue, 20 Jan 2015 12:23:04 +0000 (12:23 +0000)]
drm/i915/skl: Gen9 coarse power gating

Enable coarse power gating for Gen9. This feature allows render and
media engine to enter RC6 independently. Policies are configured
together with RC6. This feature will only be enabled when RC6 is
enabled.

v2: Rebase after Chris'/Mika's forcewake change (Damien)

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Zhe Wang <zhe1.wang@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915/skl: Retrieve the frequency limits
Damien Lespiau [Fri, 16 Jan 2015 18:07:26 +0000 (18:07 +0000)]
drm/i915/skl: Retrieve the frequency limits

v2: Use the new function, gen6_init_rps_frequencies() (Damien)

Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com> (v1)
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915/skl: add turbo support
Jesse Barnes [Fri, 16 Jan 2015 18:07:25 +0000 (18:07 +0000)]
drm/i915/skl: add turbo support

Per latest PM programming guide.

v2: the wrong flavour of the function updating the ring frequency was
    called, leading to dead locks (Tvrtko)

v3: Add GEN6_RP_MEDIA_IS_GFX to RP_CONTROL (Imre, done by Damien)

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
[danvet: Fixup conflicts with Mika's forcewake refactor.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915/skl: Adding power domains for AUX controllers
Satheeshakrishna M [Fri, 16 Jan 2015 15:57:51 +0000 (15:57 +0000)]
drm/i915/skl: Adding power domains for AUX controllers

Adding new power doamins for AUX controllers

v2: Added new power domains in power_domain_str per Imre's comment

v3: Added AUX power domains to older platforms

v4: Rebase on top of POWER_DOMAIN_PLLS.

v5: Modified to address review comments from Imre

Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Satheeshakrishna M <satheeshakrishna.m@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> (v3)
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Rename i915_gen6_forcewake_count_info
Mika Kuoppala [Fri, 16 Jan 2015 09:34:42 +0000 (11:34 +0200)]
drm/i915: Rename i915_gen6_forcewake_count_info

There are multiple forcewake domains in newer architectures.
Rename 'i915_gen6_forcewake_count_info' debugfs entry to
'i915_forcewake_domains' to reflect this.

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Enum forcewake domains and domain identifiers
Mika Kuoppala [Fri, 16 Jan 2015 09:34:41 +0000 (11:34 +0200)]
drm/i915: Enum forcewake domains and domain identifiers

Make the domains and domain identifiers enums. To emphasize
the difference in order to avoid mistakes.

v2: s/fw_domain/forcewake_domain (Jani)
v3: rebase

Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Deepak S <deepak.s@linux.intel.com> (v1)
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Rename the forcewake get/put functions
Mika Kuoppala [Fri, 16 Jan 2015 09:34:40 +0000 (11:34 +0200)]
drm/i915: Rename the forcewake get/put functions

We have multiple forcewake domains now on recent gens. Change the
function naming to reflect this.

v2: More verbose names (Chris)
v3: Rebase
v4: Rebase
v5: Add documentation for forcewake_get/put

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Deepak S <deepak.s@linux.intel.com> (v2)
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Make vlv and chv forcewake put generic.
Mika Kuoppala [Fri, 16 Jan 2015 09:34:39 +0000 (11:34 +0200)]
drm/i915: Make vlv and chv forcewake put generic.

These two were using a fw dance logic where posting read was done
after both domain bit were set. When in other gens, the posting
read is done immediately after setting the forcewake bit for each
domain.

Now bring these in line with other gens.

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Deepak S <deepak.s@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Consolidate forcewake code
Mika Kuoppala [Mon, 19 Jan 2015 14:20:43 +0000 (16:20 +0200)]
drm/i915: Consolidate forcewake code

As we now have forcewake domains, take advantage of it
by putting the differences in gen fw handling in data rather
than in code.

In past we have opencoded this quite extensively as the fw handling
is in the fast path. There has also been a lot of cargo-culted
copy'n'pasting from older gens to newer ones.

Now when the releasing of the forcewake is done by deferred timer,
it gives chance to consolidate more. Due to the frequency of actual hw
access being significantly less.

Take advantage of this and generalize the fw handling code
as much as possible. But we still aim to keep the forcewake sequence
particularities for each gen intact. So the access pattern
to fw engines should remain the same.

v2: - s/old_ack/clear_ack (Chris)
    - s/post_read/posting_read (Chris)
    - less polite commit msg (Chris)

v3: - rebase
    - check and clear wake_count in init

v4: - fix posting reads for gen8 (PRTS)

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Deepak S <deepak.s@linux.intel.com> (v2)
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Reduce duplicated forcewake logic
Chris Wilson [Fri, 16 Jan 2015 09:34:37 +0000 (11:34 +0200)]
drm/i915: Reduce duplicated forcewake logic

Introduce a structure to track the individual forcewake domains and use
that to eliminate duplicate logic.

v2: - Rebase on latest dinq (Mika)
    - for_each_fw_domain macro (Mika)
    - Handle reset atomically, keeping the timer running (Mika)
    - for_each_fw_domain parameter ordering (Chris)
    - defer timer on new register access (Mika)

v3: - Fix forcewake_reset/get race by waiting pending timers

v4: - cond_resched and verbose warning on timer deletion (Chris)
    - need to run pending timers manually on reset

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (v1)
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Acked-by: Deepak S <deepak.s@linux.intel.com> (v2)
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Skip uncore lock on earlier gens
Chris Wilson [Fri, 16 Jan 2015 09:34:36 +0000 (11:34 +0200)]
drm/i915: Skip uncore lock on earlier gens

With gen < 6 we don't need to take uncore lock as we
don't have anything to protect from concurrent access.

v2: rebase and account for gen9 changes

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (v1)
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Deepak S <deepak.s@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Assert that runtime pm is active on user fw access
Chris Wilson [Fri, 16 Jan 2015 09:34:35 +0000 (11:34 +0200)]
drm/i915: Assert that runtime pm is active on user fw access

On user forcewake access, assert that runtime pm reference is held.
Fix and cleanup the callsites accordingly.

v2: Remove intel_runtime_pm_get() rebasehap (Deepak)

v3: use drivers own runtime state tracking as pm_runtime_active()
    will return wrong results when we are in resume callchain (Mika)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Deepak S <deepak.s@linux.intel.com> (v2)
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Rebalance runtime pm vs forcewake
Chris Wilson [Fri, 16 Jan 2015 09:34:34 +0000 (11:34 +0200)]
drm/i915: Rebalance runtime pm vs forcewake

Calling intel_runtime_pm_put() is illegal from a soft-irq context, so
revert the crude hack

commit aa0b3b5bb8768c1a6a6788869d9c7015eae7e80c
Author: Paulo Zanoni <paulo.r.zanoni@intel.com>
Date:   Tue Apr 1 14:55:07 2014 -0300

    drm/i915: don't schedule force_wake_timer at gen6_read

and apply the single line corrective instead.

v2: assert forcewake is off after the forcewake_reset (Paulo)

References: https://bugs.freedesktop.org/show_bug.cgi?id=80913
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Deepak S <deepak.s@linux.intel.com> (v1)
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Subsume intel_ctx_submit_request in to drm_i915_gem_request
Nick Hoath [Thu, 15 Jan 2015 13:10:39 +0000 (13:10 +0000)]
drm/i915: Subsume intel_ctx_submit_request in to drm_i915_gem_request

Move all remaining elements that were unique to execlists queue items
in to the associated request.

Issue: VIZ-4274

v2: Rebase. Fixed issue of overzealous freeing of request.
v3: Removed re-addition of cleanup work queue (found by Daniel Vetter)
v4: Rebase.
v5: Actual removal of intel_ctx_submit_request. Update both tail and postfix
pointer in __i915_add_request (found by Thomas Daniel)
v6: Removed unrelated changes

Signed-off-by: Nick Hoath <nicholas.hoath@intel.com>
Reviewed-by: Thomas Daniel <thomas.daniel@intel.com>
[danvet: Reformat comment with strange linebreaks.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Remove FIXME_lrc_ctx backpointer
Nick Hoath [Thu, 15 Jan 2015 13:10:38 +0000 (13:10 +0000)]
drm/i915: Remove FIXME_lrc_ctx backpointer

The first pass implementation of execlists required a backpointer to the context to be held
in the intel_ringbuffer. However the context pointer is available higher in the call stack.
Remove the backpointer from the ring buffer structure and instead pass it down through the
call stack.

v2: Integrate this changeset with the removal of duplicate request/execlist queue item members.
v3: Rebase
v4: Rebase. Remove passing of context when the request is passed.

Signed-off-by: Nick Hoath <nicholas.hoath@intel.com>
Reviewed-by: Thomas Daniel <thomas.daniel@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Removed duplicate members from submit_request
Nick Hoath [Thu, 15 Jan 2015 13:10:37 +0000 (13:10 +0000)]
drm/i915: Removed duplicate members from submit_request

Where there were duplicate variables for the tail, context and ring (engine)
in the gem request and the execlist queue item, use the one from the request
and remove the duplicate from the execlist queue item.

Issue: VIZ-4274

v1: Rebase
v2: Fixed build issues. Keep separate postfix & tail pointers as these are
used in different ways. Reinserted missing full tail pointer update.

Signed-off-by: Nick Hoath <nicholas.hoath@intel.com>
Reviewed-by: Thomas Daniel <thomas.daniel@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: execlist request keeps ptr/ref to gem_request
Nick Hoath [Thu, 15 Jan 2015 13:10:36 +0000 (13:10 +0000)]
drm/i915: execlist request keeps ptr/ref to gem_request

Add a reference and pointer from the execlist queue item to the associated
gem request. For execlist requests that don't have a request, create one
as a placeholder.

Issue: VIZ-4274
v1: Rebase after upstream of "Replace seqno values with request structures" patchset.

Signed-off-by: Nick Hoath <nicholas.hoath@intel.com>
Reviewed-by: Thomas Daniel <thomas.daniel@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Keep drm_crtc->state in sync with intel_crtc->config
Ander Conselvan de Oliveira [Thu, 15 Jan 2015 12:55:27 +0000 (14:55 +0200)]
drm/i915: Keep drm_crtc->state in sync with intel_crtc->config

So that atomic operations will reference the right crtc state.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Improve how the memory for crtc state is allocated
Ander Conselvan de Oliveira [Thu, 15 Jan 2015 12:55:26 +0000 (14:55 +0200)]
drm/i915: Improve how the memory for crtc state is allocated

The previous patch changed the config field in intel_crtc to a pointer,
but to keep the mechanical changes (done with spatch) separate from the
new code, the pointer was made to point to a new _config field with type
struct intel_crtc_state added to that struct. This patch improves that
code by getting rid of that field, allocating a state struct in
intel_crtc_init() a keeping it properly updated when a mode set
happens.

v2: Manual changes split from previous patch. (Matt)
    Don't leak the current state when the crtc is destroyed (Matt)

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
[danvet: Squash in fixup from Matt Roper for driver unload.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Make intel_crtc->config a pointer
Ander Conselvan de Oliveira [Thu, 15 Jan 2015 12:55:25 +0000 (14:55 +0200)]
drm/i915: Make intel_crtc->config a pointer

To match the semantics of drm_crtc->state, which this will eventually
become. The allocation of the memory for config will be fixed in a
followup patch. By adding the extra _config field to intel_crtc it was
possible to generate this entire patch with the cocci script below.

@@ @@
struct intel_crtc {
...
-struct intel_crtc_state config;
+struct intel_crtc_state _config;
+struct intel_crtc_state *config;
...
}
@@ struct intel_crtc *crtc; @@
-memset(&crtc->config, 0, sizeof(crtc->config));
+memset(crtc->config, 0, sizeof(*crtc->config));
@@ @@
__intel_set_mode(...) {
<...
-to_intel_crtc(crtc)->config = *pipe_config;
+(*(to_intel_crtc(crtc)->config)) = *pipe_config;
...>
}
@@ @@
intel_crtc_init(...) {
...
WARN_ON(drm_crtc_index(&intel_crtc->base) != intel_crtc->pipe);
+intel_crtc->config = &intel_crtc->_config;
return;
...
}
@@ struct intel_crtc *crtc; @@
-&crtc->config
+crtc->config
@@ struct intel_crtc *crtc; identifier member; @@
-crtc->config.member
+crtc->config->member
@@ expression E; @@
-&(to_intel_crtc(E)->config)
+to_intel_crtc(E)->config
@@ expression E; identifier member; @@
-to_intel_crtc(E)->config.member
+to_intel_crtc(E)->config->member

v2: Clarify manual changes by splitting them into another patch. (Matt)
    Improve cocci script to generate even more of the changes. (Ander)

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Use local pipe_config varariable when available
Ander Conselvan de Oliveira [Thu, 15 Jan 2015 12:55:24 +0000 (14:55 +0200)]
drm/i915: Use local pipe_config varariable when available

In functions that define a local pipe_config variable to point to
crtc->config, replace remaining references to crtc->config with
the local variable. This makes the code more consistent and easier
to change in an automated manner.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Pass new_config down do crtc_compute_clock
Ander Conselvan de Oliveira [Thu, 15 Jan 2015 12:55:23 +0000 (14:55 +0200)]
drm/i915: Pass new_config down do crtc_compute_clock

This reduces the number of direct users of crtc->new_config, opening up
the possibilty of removing it altogether.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Embedded struct drm_crtc_state in intel_crtc_state
Ander Conselvan de Oliveira [Thu, 15 Jan 2015 12:55:22 +0000 (14:55 +0200)]
drm/i915: Embedded struct drm_crtc_state in intel_crtc_state

And get rid of the duplicate mode structures. This patch was generated
with the following semantic patch:

@@ @@
struct intel_crtc_state {
+struct drm_crtc_state base;
+
...
-struct drm_display_mode requested_mode;
-struct drm_display_mode adjusted_mode;
...
}
@@ struct intel_crtc_state *state; @@
-state->adjusted_mode
+state->base.adjusted_mode
@@ struct intel_crtc_state *state; @@
-state->requested_mode
+state->base.mode
@@ struct intel_crtc_state state; @@
-state.adjusted_mode
+state.base.adjusted_mode
@@ struct intel_crtc_state state; @@
-state.requested_mode
+state.base.mode
@@ struct drm_crtc *crtc; @@
-to_intel_crtc(crtc)->config.adjusted_mode
+to_intel_crtc(crtc)->config.base.adjusted_mode
@@ identifier member; expression E; @@
-PIPE_CONF_CHECK_FLAGS(adjusted_mode.member, E);
+PIPE_CONF_CHECK_FLAGS(base.adjusted_mode.member, E);
@@ identifier member; @@
-PIPE_CONF_CHECK_I(adjusted_mode.member);
+PIPE_CONF_CHECK_I(base.adjusted_mode.member);
@@ identifier member; @@
-PIPE_CONF_CHECK_CLOCK_FUZZY(adjusted_mode.member);
+PIPE_CONF_CHECK_CLOCK_FUZZY(base.adjusted_mode.member);

v2: Completely generate the patch with cocci. (Ander)

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Rename struct intel_crtc_config to intel_crtc_state
Ander Conselvan de Oliveira [Thu, 15 Jan 2015 12:55:21 +0000 (14:55 +0200)]
drm/i915: Rename struct intel_crtc_config to intel_crtc_state

The objective is to make this structure usable with the atomic helpers,
so let's start with the rename. Patch generated with coccinelle:

@@ @@
-struct intel_crtc_config {
+struct intel_crtc_state {
...
}
@@ @@
-struct intel_crtc_config
+struct intel_crtc_state

v2: Completely generate the patch with cocci. (Ander)

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Modifying structures related to DRRS
Vandana Kannan [Fri, 9 Jan 2015 20:55:56 +0000 (02:25 +0530)]
drm/i915: Modifying structures related to DRRS

Earlier, DRRS structures were specific to eDP (used only in intel_dp).
Since DRRS can be extended to other internal display types
(if the panel supports multiple RR), modifying structures
to be part of drm_i915_private and have a provision to add display related
structs like intel_dp.
Also, aligning with frontbuffer tracking mechanism, the new structure
contains data for busy frontbuffer bits.

Signed-off-by: Vandana Kannan <vandana.kannan@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Rename 'reg' to 'clk_reg' to unconfuse it from the other 'reg'
Ville Syrjälä [Mon, 19 Jan 2015 11:50:52 +0000 (13:50 +0200)]
drm/i915: Rename 'reg' to 'clk_reg' to unconfuse it from the other 'reg'

On VLV/CHV the rc6 residency calculations read a second register to
determine the actual units used for the residency value. The variable
name 'reg' where that register value is stored shadows the function
argument 'reg'. That can easily leave the reader utterly confused, so
rename the internal variable to 'clk_reg'.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Deepak S<deepak.s@intel.com>
[danvet: Spellfix in commit message.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Drop VLV checks from rc6p and rc6pp sysfs files
Ville Syrjälä [Mon, 19 Jan 2015 11:50:51 +0000 (13:50 +0200)]
drm/i915: Drop VLV checks from rc6p and rc6pp sysfs files

We don't register the rc6p and rc6pp sysfs files on VLV, so there's no
point in having any VLV checks in them. Drop the checks.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Deepak S<deepak.s@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agoRevert "Revert "drm/i915/chv: Use timeout mode for RC6 on chv""
Ville Syrjälä [Mon, 19 Jan 2015 11:50:50 +0000 (13:50 +0200)]
Revert "Revert "drm/i915/chv: Use timeout mode for RC6 on chv""

The performance regression from the CHV RC6 EI->TO change is now fixed
so re-enable TO mode for better RC6 resicency.

This reverts commit e85a5c7989c5be8fe30acc35eba9fb54b3450f36.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Deepak S<deepak.s@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Configure GEN6_RP_DOWN_TIMEOUT on CHV
Ville Syrjälä [Mon, 19 Jan 2015 11:50:49 +0000 (13:50 +0200)]
drm/i915: Configure GEN6_RP_DOWN_TIMEOUT on CHV

CherryViewA0_iGfx_BIOS_DRIVER_PUNIT_spec_y14w28d5 tells us not to enable
the RP down timeout interrupt, and says that the timeout value is hence
not used. We do enable that interrupt currently though, so leaving the
timeout as 0 results in very poor performance as the GPU frequency keeps
dropping constantly. So just program the register with the recommended
value.

Leaving the interrupt enabled doesn't seem to do any harm so far. So
I've decided to leave it on for now, just to avoid making CHV a
special case.

This fixes the performance regression from:
 commit 5a0afd4b78ec23f27f5d486ac3d102c2e8d66bd7
 Author: Deepak S <deepak.s@linux.intel.com>
 Date:   Sat Dec 13 11:43:27 2014 +0530

    drm/i915/chv: Use timeout mode for RC6 on chv

Cc: Deepak S <deepak.s@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Deepak S<deepak.s@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Change VLV GEN6_RP_DOWN_TIMEOUT value to decimal
Ville Syrjälä [Mon, 19 Jan 2015 11:50:48 +0000 (13:50 +0200)]
drm/i915: Change VLV GEN6_RP_DOWN_TIMEOUT value to decimal

We use decimal for all the other RP magic values, so change
GEN6_RP_DOWN_TIMEOUT to decimal as well. Also change the order
of the register writes to match the BIOS spec for easier verification.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Deepak S<deepak.s@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Disable RC6 before configuring in on VLV/CHV
Ville Syrjälä [Mon, 19 Jan 2015 11:50:47 +0000 (13:50 +0200)]
drm/i915: Disable RC6 before configuring in on VLV/CHV

Follow the sequence in the BIOS spec and clear the RC_CONTROL register
before changing any of the other RC6/RP registers.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Deepak S<deepak.s@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: New offset for reading frequencies on CHV.
Deepak S [Sat, 17 Jan 2015 05:35:59 +0000 (11:05 +0530)]
drm/i915: New offset for reading frequencies on CHV.

Use new Sideband offset to read max/min/gaur freq based on the SKU it
is running on. Based on the Number of EU, we read different bits to
identify the max frequencies at which system can run.

v2: reuse mask definitions & INTEL_INFO() to get device info (Ville)

v3: add break in switch conditions (Ville)

Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Increase the range of sideband address.
Deepak S [Fri, 16 Jan 2015 15:12:17 +0000 (20:42 +0530)]
drm/i915: Increase the range of sideband address.

Looks like latest BSW/CHV production system has sideband address > 128.
Use u32 data types to cover new offset/address range :)

Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915/chv: Populate total EU count on Cherryview
Deepak S [Fri, 16 Jan 2015 15:12:16 +0000 (20:42 +0530)]
drm/i915/chv: Populate total EU count on Cherryview

Starting with Cherryview, devices may have a varying number of EU for
a given ID due to creative fusing. Punit support different frequency for
different fuse data. We use this patch to help get total eu enabled and
read the right offset to get RP0

Based upon a patch from Jeff, but reworked to only store eu_total and
avoid sending info to userspace

v2: Format register definitions (Jani)

Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Acked-by: Jeff McGee <jeff.mcgee@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Don't cleanup plane state in intel_plane_destroy()
Matt Roper [Fri, 16 Jan 2015 15:25:24 +0000 (07:25 -0800)]
drm/i915: Don't cleanup plane state in intel_plane_destroy()

When we transitioned to the atomic plane helpers in commit:

        commit ea2c67bb4affa84080c616920f3899f123786e56
        Author: Matt Roper <matthew.d.roper@intel.com>
        Date:   Tue Dec 23 10:41:52 2014 -0800

            drm/i915: Move to atomic plane helpers (v9)

one of the changes was to call intel_plane_destroy_state() while tearing
down a plane to prevent leaks when unloading the driver.  That made
sense when the patches were first written, but before they were merged,

        commit 3009c0377f25c29852b218a6933a969d02cbdc5d
        Author:     Thierry Reding <treding@nvidia.com>
        Date:       Tue Nov 25 12:09:49 2014 +0100

            drm: Free atomic state during cleanup

had already landed, which made this the responsibility of the DRM core.
The result was that we were kfree()'ing the state twice, and also
possibly double-unref'ing a framebuffer, leading to memory corruption
when the driver was unloaded.

The fix is to simply not try to cleanup the state in the i915 teardown
code now that the core handles this for us.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88433
Testcase: igt/drv_module_reload
Root-cause-analysis-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm: Add rotation value to plane state
Matt Roper [Thu, 22 Jan 2015 00:35:40 +0000 (16:35 -0800)]
drm: Add rotation value to plane state

The rotation property is shared by multiple drivers, so it makes sense
to store the rotation value (for atomic-converted drivers) in the common
plane state so that core code can eventually access it as well.

Cc: dri-devel@lists.freedesktop.org
Suggested-by: Daniel Vetter <daniel@ffwll.ch>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
9 years agoMerge branch 'drm-next' of https://github.com/markyzq/kernel-drm-rockchip into drm...
Dave Airlie [Tue, 27 Jan 2015 00:05:44 +0000 (10:05 +1000)]
Merge branch 'drm-next' of https://github.com/markyzq/kernel-drm-rockchip into drm-next

single rockchip fix.

* 'drm-next' of https://github.com/markyzq/kernel-drm-rockchip:
  drm/rockchip: fix dma_alloc_attrs() error check

9 years agoMerge branch 'drm-next-3.20' of git://people.freedesktop.org/~agd5f/linux into drm...
Dave Airlie [Mon, 26 Jan 2015 23:39:58 +0000 (09:39 +1000)]
Merge branch 'drm-next-3.20' of git://people.freedesktop.org/~agd5f/linux into drm-next

Radeon drm-next changes for 3.20.  Highlights:
- Indirect draw support for evergreen/NI hw
- SMC fan control support for SI/CI
- Manual fan control for SI/CI
- DP audio support
- Lots of code cleanup

* 'drm-next-3.20' of git://people.freedesktop.org/~agd5f/linux: (45 commits)
  drm/radeon: make MMU_NOTIFIER optional
  drm/radeon: use NULL rather then 0 in audio detect
  drm/radeon: whitespace clean up in radeon_audio.c
  radeon/audio: enable DP audio
  radeon/audio: moved audio caps programming to audio_hotplug() function
  radeon/audio: applied audio_dpms() and audio_mode_set() calls
  radeon/audio: consolidate audio_mode_set() functions
  radeon/audio: removed unnecessary debug settings
  radeon/audio: moved mute programming to a separate function
  radeon/audio: moved audio packet programming to a separate function
  radeon/audio: set_avi_packet() function cleanup
  radeon/audio: removed unnecessary CRC control programing
  radeon: moved HDMI color depth programming to a separate function
  radeon/audio: moved VBI packet programming to separate functions
  radeon/audio: consolidate update_acr() functions (v2)
  radeon/audio: consolidate update_avi_infoframe() functions
  radeon/audio: consolidate audio_set_dto() functions
  radeon/audio: consolidate audio_fini() functions
  radeon/audio: consolidate audio_enable() functions
  radeon/audio: consolidate select_pin() functions
  ...

9 years agoMerge branch 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daein...
Dave Airlie [Mon, 26 Jan 2015 23:38:29 +0000 (09:38 +1000)]
Merge branch 'exynos-drm-next' of git://git./linux/kernel/git/daeinki/drm-exynos into drm-next

  This pull request includes some code refactoring which removes
   Exynos specific structure names and uses generic structure
   names instead, and makes all plane updating to be done
   by only exynos_update_plane function. And also it includes
   some cleanup and fixup patches.

* 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: (22 commits)
  drm/exynos: fimd: check error status for drm_iommu_attach_device
  drm/exynos: create exynos_check_plane()
  drm/exynos: remove mode_set() ops from exynos_crtc
  drm/exynos: don't duplicate drm_display_mode in fimd context
  drm/exynos: remove struct exynos_drm_manager
  drm/exynos: remove drm_dev from struct exynos_drm_manager
  drm/exynos: move 'type' from manager to crtc struct
  drm/exynos: remove pipe member of struct exynos_drm_manager
  drm/exynos: add pipe param to exynos_drm_crtc_create()
  drm/exynos: rename base object of struct exynos_drm_crtc to 'base'
  drm/exynos: remove exynos_drm_crtc_mode_set_commit()
  drm/exynos: call exynos_update_plane() directly on page flips
  drm/exynos: unify plane update on exynos_update_plane()
  drm/exynos: remove exynos_plane_commit() wrapper
  drm/exynos: don't do any DPMS operation while updating planes
  drm/exynos: Don't touch DPMS when updating overlay planes
  drm/exynos/vidi: remove useless ops->commit()
  drm/exynos/fimd: don't initialize 'ret' variable in fimd_probe()
  drm/exynos: remove struct exynos_drm_overlay
  drm/exynos: remove exynos_drm_crtc_plane_* wrappers
  ...

9 years agoMerge tag 'drm-amdkfd-next-fixes-2015-01-25' of git://people.freedesktop.org/~gabbayo...
Dave Airlie [Mon, 26 Jan 2015 23:14:15 +0000 (09:14 +1000)]
Merge tag 'drm-amdkfd-next-fixes-2015-01-25' of git://people.freedesktop.org/~gabbayo/linux into drm-next

Here is a pull request of fixes for 3.20 patches, including the fix you asked
me when you merged the previous pull request.

* tag 'drm-amdkfd-next-fixes-2015-01-25' of git://people.freedesktop.org/~gabbayo/linux:
  drm/amdkfd: change amdkfd version to 0.7.1
  drm/radeon: cik_sdma_ctx_switch_enable() can be static
  drm/amdkfd: Fix sparse errors
  drm/amdkfd: Handle case of invalid queue type
  drm/amdkfd: Add break at the end of case
  drm/amdkfd: Remove negative check of uint variable

9 years agodrm: fix drm_display_info_set_bus_formats kernel doc header
Boris Brezillon [Fri, 23 Jan 2015 20:09:30 +0000 (21:09 +0100)]
drm: fix drm_display_info_set_bus_formats kernel doc header

formats and num_formats arguments were previously called fmts and nfmts.
Fix the kernel doc comment so that it matches the new argument names.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
9 years agoMerge tag 'drm-intel-next-2015-01-17' of git://anongit.freedesktop.org/drm-intel...
Dave Airlie [Mon, 26 Jan 2015 23:01:09 +0000 (09:01 +1000)]
Merge tag 'drm-intel-next-2015-01-17' of git://anongit.freedesktop.org/drm-intel into drm-next

- refactor i915/snd-hda interaction to use the component framework (Imre)
- psr cleanups and small fixes (Rodrigo)
- a few perf w/a from Ken Graunke
- switch to atomic plane helpers (Matt Roper)
- wc mmap support (Chris Wilson & Akash Goel)
- smaller things all over

* tag 'drm-intel-next-2015-01-17' of git://anongit.freedesktop.org/drm-intel: (40 commits)
  drm/i915: Update DRIVER_DATE to 20150117
  i915: reuse %ph to dump small buffers
  drm/i915: Ensure the HiZ RAW Stall Optimization is on for Cherryview.
  drm/i915: Enable the HiZ RAW Stall Optimization on Broadwell.
  drm/i915: PSR link standby at debugfs
  drm/i915: group link_standby setup and let this info visible everywhere.
  drm/i915: Add missing vbt check.
  drm/i915: PSR HSW/BDW: Fix inverted logic at sink main_link_active bit.
  drm/i915: PSR VLV/CHV: Remove condition checks that only applies to Haswell.
  drm/i915: VLV/CHV PSR needs to exit PSR on every flush.
  drm/i915: Fix kerneldoc for i915 atomic plane code
  drm/i915: Don't pretend SDVO hotplug works on 915
  drm/i915: Don't register HDMI connectors for eDP ports on VLV/CHV
  drm/i915: Remove I915_HAS_HOTPLUG() check from i915_hpd_irq_setup()
  drm/i915: Make hpd arrays big enough to avoid out of bounds access
  Revert "drm/i915/chv: Use timeout mode for RC6 on chv"
  drm/i915: Improve HiZ throughput on Cherryview.
  drm/i915: Reset CSB read pointer in ring init
  drm/i915: Drop unused position fields (v2)
  drm/i915: Move to atomic plane helpers (v9)
  ...

9 years agoMerge tag 'topic/core-stuff-2015-01-23' of git://anongit.freedesktop.org/drm-intel...
Dave Airlie [Mon, 26 Jan 2015 22:54:11 +0000 (08:54 +1000)]
Merge tag 'topic/core-stuff-2015-01-23' of git://anongit.freedesktop.org/drm-intel into drm-next

Just flushing out my drm-misc branch, nothing major. Well too old patches
I've dug out from years since a patch from Rob look eerily familiar ;-)

* tag 'topic/core-stuff-2015-01-23' of git://anongit.freedesktop.org/drm-intel:
  drm/probe-helper: clamp unknown connector status in the poll work
  drm/probe-helper: don't lose hotplug event
  next: drm/atomic: Use copy_from_user to copy 64 bit data from user space
  drm: Make drm_read() more robust against multithreaded races
  drm/fb-helper: Propagate errors from initial config failure
  drm: Drop superfluous "select VT_HW_CONSOLE_BINDING"

9 years agodrm/exynos: fimd: check error status for drm_iommu_attach_device
Ajay Kumar [Sun, 11 Jan 2015 16:57:07 +0000 (01:57 +0900)]
drm/exynos: fimd: check error status for drm_iommu_attach_device

check error status for drm_iommu_attach_device() and make sure
it propagates till the caller.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Signed-off-by: Inki Dae <daeinki@gmail.com>
9 years agodrm/exynos: create exynos_check_plane()
Gustavo Padovan [Thu, 27 Nov 2014 16:56:09 +0000 (14:56 -0200)]
drm/exynos: create exynos_check_plane()

Split update plane in two parts, an initial check part that can fail
and the update part that can't fail.

This is a important step for the upcoming atomic modesetting support.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: remove mode_set() ops from exynos_crtc
Gustavo Padovan [Thu, 27 Nov 2014 18:30:45 +0000 (16:30 -0200)]
drm/exynos: remove mode_set() ops from exynos_crtc

It is no longer used anywhere.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: don't duplicate drm_display_mode in fimd context
Gustavo Padovan [Thu, 27 Nov 2014 18:28:44 +0000 (16:28 -0200)]
drm/exynos: don't duplicate drm_display_mode in fimd context

We can safely use the mode stored in the crtc.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: remove struct exynos_drm_manager
Gustavo Padovan [Sun, 18 Jan 2015 09:16:23 +0000 (18:16 +0900)]
drm/exynos: remove struct exynos_drm_manager

exynos_drm_manager was just a redundant struct to represent the crtc as
well. In this commit we merge exynos_drm_manager into exynos_drm_crtc to
remove an unnecessary level of indirection easing the understand of the
flow on exynos.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: remove drm_dev from struct exynos_drm_manager
Gustavo Padovan [Wed, 26 Nov 2014 18:43:27 +0000 (16:43 -0200)]
drm/exynos: remove drm_dev from struct exynos_drm_manager

manager-drm_dev is only accessed by exynos_drm_crtc_create() so this patch
pass drm_dev as argument on exynos_drm_crtc_create() and remove it from
struct exynos_drm_manager.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: move 'type' from manager to crtc struct
Gustavo Padovan [Wed, 5 Nov 2014 21:51:35 +0000 (19:51 -0200)]
drm/exynos: move 'type' from manager to crtc struct

'type' is now part of the struct exynos_drm_crtc. This is just another
step in the struct exynos_drm_manager removal.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: remove pipe member of struct exynos_drm_manager
Gustavo Padovan [Tue, 4 Nov 2014 20:44:47 +0000 (18:44 -0200)]
drm/exynos: remove pipe member of struct exynos_drm_manager

It is not longer used. This is part of the process of removing
struct exynos_drm_manager entirely.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: add pipe param to exynos_drm_crtc_create()
Gustavo Padovan [Tue, 4 Nov 2014 20:25:27 +0000 (18:25 -0200)]
drm/exynos: add pipe param to exynos_drm_crtc_create()

Get the pipe value from a parameter instead of getting it from
manager->pipe. We are removing manager->pipe.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: rename base object of struct exynos_drm_crtc to 'base'
Gustavo Padovan [Mon, 3 Nov 2014 20:20:29 +0000 (18:20 -0200)]
drm/exynos: rename base object of struct exynos_drm_crtc to 'base'

'base' is more widely used name in the drm subsystem for the base object.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: remove exynos_drm_crtc_mode_set_commit()
Gustavo Padovan [Fri, 14 Nov 2014 00:30:00 +0000 (22:30 -0200)]
drm/exynos: remove exynos_drm_crtc_mode_set_commit()

This was just as extra chain in the call stack. We just rename it to
_set_base() and let it do everything alone.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: call exynos_update_plane() directly on page flips
Gustavo Padovan [Tue, 25 Nov 2014 18:18:34 +0000 (16:18 -0200)]
drm/exynos: call exynos_update_plane() directly on page flips

Avoid an extra call to exynos_drm_crtc_mode_set_commit() that only calls
exynos_update_plane().

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: unify plane update on exynos_update_plane()
Gustavo Padovan [Tue, 25 Nov 2014 13:21:17 +0000 (11:21 -0200)]
drm/exynos: unify plane update on exynos_update_plane()

We can safely use the exynos_update_plane() to update the plane
framebuffer for both the overlay and primary planes.

Note that this patch removes a call to manager->ops->commit() in
exynos_drm_crtc_mode_set_commit(). The commit() call is used only by the
fimd driver to set underlying timings and need only in full modeset
operations. For plane update only win_commit is needed.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: remove exynos_plane_commit() wrapper
Gustavo Padovan [Fri, 14 Nov 2014 00:17:46 +0000 (22:17 -0200)]
drm/exynos: remove exynos_plane_commit() wrapper

It's doing nothing but calling exynos_crtc->ops->win_commit(), so let's
call this directly to avoid extra layers of abstraction.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: don't do any DPMS operation while updating planes
Gustavo Padovan [Fri, 14 Nov 2014 00:27:20 +0000 (22:27 -0200)]
drm/exynos: don't do any DPMS operation while updating planes

DPMS only makes sense when the mode changes, for plane update changes do
not perform any dpms operation.

This move places the win_commit() and commit() calls directly in the code
instead of calling exynos_drm_crtc_commit() thus avoiding DPMS operations.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: Don't touch DPMS when updating overlay planes
Gustavo Padovan [Thu, 30 Oct 2014 12:00:54 +0000 (12:00 +0000)]
drm/exynos: Don't touch DPMS when updating overlay planes

DPMS settings should only be changed by a full modeset.
exynos_plane_update() should only care about updating the planes itself
and nothing else.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos/vidi: remove useless ops->commit()
Gustavo Padovan [Thu, 6 Nov 2014 20:15:01 +0000 (18:15 -0200)]
drm/exynos/vidi: remove useless ops->commit()

vidi_commit does nothing, remove it and its callers.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos/fimd: don't initialize 'ret' variable in fimd_probe()
Gustavo Padovan [Mon, 3 Nov 2014 20:56:57 +0000 (18:56 -0200)]
drm/exynos/fimd: don't initialize 'ret' variable in fimd_probe()

We  set it in the beginning of the function, thus no need to set it at
initialization.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: remove struct exynos_drm_overlay
Gustavo Padovan [Mon, 3 Nov 2014 20:13:27 +0000 (18:13 -0200)]
drm/exynos: remove struct exynos_drm_overlay

struct exynos_drm_overlay has no practical advantage nor serves as
important piece of the exynos API design. The only place it was used
was inside the struct exynos_plane which was just causing a extra
access overhead. Users had to access the overlay first and just then
get the plane information it contains.

This patch merges struct exynos_drm_overlay into struct exynos_plane.
It also renames struct exynos_plane to struct exynos_drm_plane.

The rational is to cut one step to access plane information.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: remove exynos_drm_crtc_plane_* wrappers
Gustavo Padovan [Wed, 29 Oct 2014 19:25:53 +0000 (19:25 +0000)]
drm/exynos: remove exynos_drm_crtc_plane_* wrappers

This functions were doing nothing but calling a manager op function,
so remove them and call the manager directly.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: expose struct exynos_drm_crtc
Gustavo Padovan [Fri, 31 Oct 2014 17:33:30 +0000 (17:33 +0000)]
drm/exynos: expose struct exynos_drm_crtc

Let other pieces of the driver access struct exynos_drm_crtc as well.

struct exynos_drm_manager will be merged into struct exynos_drm_crtc, in
the sense we will move all its members to exynos_drm_crtc, so to start
this conversion exynos_drm_crtc need to be exposed as well.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: move to_exynos_crtc() macro to main header
Gustavo Padovan [Fri, 31 Oct 2014 14:32:32 +0000 (14:32 +0000)]
drm/exynos: move to_exynos_crtc() macro to main header

With this change we allow other pieces of the code to use this macro.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/amdkfd: change amdkfd version to 0.7.1
Oded Gabbay [Thu, 22 Jan 2015 12:57:52 +0000 (14:57 +0200)]
drm/amdkfd: change amdkfd version to 0.7.1

Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
9 years agodrm/radeon: cik_sdma_ctx_switch_enable() can be static
kbuild test robot [Wed, 21 Jan 2015 12:32:11 +0000 (20:32 +0800)]
drm/radeon: cik_sdma_ctx_switch_enable() can be static

drivers/gpu/drm/radeon/cik_sdma.c:293:6: sparse: symbol 'cik_sdma_ctx_switch_enable' was not declared. Should it be static?

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
9 years agodrm/amdkfd: Fix sparse errors
Oded Gabbay [Thu, 22 Jan 2015 11:42:28 +0000 (13:42 +0200)]
drm/amdkfd: Fix sparse errors

Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
9 years agodrm/radeon: make MMU_NOTIFIER optional
Rob Clark [Wed, 21 Jan 2015 22:49:59 +0000 (17:49 -0500)]
drm/radeon: make MMU_NOTIFIER optional

In cases where MMU_NOTIFIER is not available, userptr will not be
available.  Similar to i915, although not making an exception for
CAP_SYS_ADMIN.

The proposed userspace patches for userptr seem to handle the fall-
back properly, so a userptr-less kernel should not be a problem.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
9 years agodrm/radeon: use NULL rather then 0 in audio detect
Alex Deucher [Wed, 14 Jan 2015 22:20:10 +0000 (17:20 -0500)]
drm/radeon: use NULL rather then 0 in audio detect

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
9 years agodrm/radeon: whitespace clean up in radeon_audio.c
Alex Deucher [Tue, 13 Jan 2015 17:41:40 +0000 (12:41 -0500)]
drm/radeon: whitespace clean up in radeon_audio.c

Clean up some formatting in radeon_audio.c to be
more consistent with the rest of the driver.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
9 years agoradeon/audio: enable DP audio
Slava Grigorev [Fri, 12 Dec 2014 22:01:42 +0000 (17:01 -0500)]
radeon/audio: enable DP audio

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
9 years agoradeon/audio: moved audio caps programming to audio_hotplug() function
Slava Grigorev [Thu, 11 Dec 2014 18:11:29 +0000 (13:11 -0500)]
radeon/audio: moved audio caps programming to audio_hotplug() function

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
9 years agoradeon/audio: applied audio_dpms() and audio_mode_set() calls
Slava Grigorev [Wed, 10 Dec 2014 19:52:43 +0000 (14:52 -0500)]
radeon/audio: applied audio_dpms() and audio_mode_set() calls

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
9 years agoradeon/audio: consolidate audio_mode_set() functions
Slava Grigorev [Wed, 10 Dec 2014 15:43:51 +0000 (10:43 -0500)]
radeon/audio: consolidate audio_mode_set() functions

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
9 years agoradeon/audio: removed unnecessary debug settings
Slava Grigorev [Tue, 9 Dec 2014 22:32:37 +0000 (17:32 -0500)]
radeon/audio: removed unnecessary debug settings

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
9 years agoradeon/audio: moved mute programming to a separate function
Slava Grigorev [Tue, 9 Dec 2014 22:17:35 +0000 (17:17 -0500)]
radeon/audio: moved mute programming to a separate function

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
9 years agoradeon/audio: moved audio packet programming to a separate function
Slava Grigorev [Tue, 9 Dec 2014 21:44:18 +0000 (16:44 -0500)]
radeon/audio: moved audio packet programming to a separate function

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
9 years agoradeon/audio: set_avi_packet() function cleanup
Slava Grigorev [Mon, 8 Dec 2014 23:28:33 +0000 (18:28 -0500)]
radeon/audio: set_avi_packet() function cleanup

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
9 years agoradeon/audio: removed unnecessary CRC control programing
Slava Grigorev [Mon, 8 Dec 2014 21:41:45 +0000 (16:41 -0500)]
radeon/audio: removed unnecessary CRC control programing

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
9 years agoradeon: moved HDMI color depth programming to a separate function
Slava Grigorev [Mon, 8 Dec 2014 21:25:37 +0000 (16:25 -0500)]
radeon: moved HDMI color depth programming to a separate function

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>