GitHub/LineageOS/android_kernel_motorola_exynos9610.git
8 years agodrm/amdgpu: fix build on aarch64.
Dave Airlie [Mon, 9 May 2016 00:30:42 +0000 (10:30 +1000)]
drm/amdgpu: fix build on aarch64.

Same fix went in previously for some other files.

Signed-off-by: Dave Airlie <airlied@redhat.com>
8 years agoMerge branch 'msm-next' of git://people.freedesktop.org/~robclark/linux into drm...
Dave Airlie [Mon, 9 May 2016 00:19:38 +0000 (10:19 +1000)]
Merge branch 'msm-next' of git://people.freedesktop.org/~robclark/linux into drm-next

Mostly cleanups, fixes, and 'struct fence' conversion this time
around, with one reservation patch which is a-b Sumit (which the fence
conversion patches depend on).

* 'msm-next' of git://people.freedesktop.org/~robclark/linux: (25 commits)
  drm/msm: Drop load/unload drm_driver ops
  drm/msm: Centralize connector registration/unregistration
  drm/msm/hdmi: Prevent gpio_free related kernel warnings
  drm/msm: print offender task name on hangcheck recovery
  drm/msm: fix leak in failed submit path
  drm/msm: de-indent submit_create()
  drm/msm: drop return from gpu->submit()
  drm/msm/mdp4: Don't manage DSI PLL regulators in MDP driver
  drm/msm/edp: Drop regulator_set_voltage call
  drm/msm/dsi: Fix regulator API abuse
  drm/msm: Move call to PTR_ERR_OR_ZERO after reassignment
  drm/msm/mdp: Add support for more RGBX formats
  drm: msm: remove unused variable
  drm/msm: fix ->last_fence() after recover
  drm/msm: 'struct fence' conversion
  drm/msm: remove fence_cbs
  drm/msm: introduce msm_fence_context
  drm/msm: split locking and pinning BO's
  drm/msm/gpu: simplify tracking in-flight bo's
  drm/msm: split out timeout_to_jiffies helper
  ...

8 years agoMerge tag 'topic/drm-misc-2016-05-08' of git://anongit.freedesktop.org/drm-intel...
Dave Airlie [Mon, 9 May 2016 00:16:50 +0000 (10:16 +1000)]
Merge tag 'topic/drm-misc-2016-05-08' of git://anongit.freedesktop.org/drm-intel into drm-next

Refcounting is hard, so here's a quick pull request with the one-liner to
fix up i915. Otherwise just a few other small things I picked up. Plus the
regression fix from Marten for rmfb behaviour that lingered around forever
since no testers. Feel free to cherry-pick that over to drm-fixes, but
given that there's not many who seemed to have cared, meh.

* tag 'topic/drm-misc-2016-05-08' of git://anongit.freedesktop.org/drm-intel:
  drm/i915: Correctly refcount connectors in hw state readou
  drm/panel: Flesh out kerneldoc
  drm: Add gpu.tmpl docbook to MAINTAINERS entry
  drm/core: Do not preserve framebuffer on rmfb, v4.
  drm: Fix up markup fumble
  drm/fb_helper: Fix a few typos

8 years agodrm/msm: Drop load/unload drm_driver ops
Archit Taneja [Mon, 2 May 2016 05:35:54 +0000 (11:05 +0530)]
drm/msm: Drop load/unload drm_driver ops

The load/unload drm_driver ops are deprecated. They should be removed as
they result in creation of devices visible to userspace even before
the drm_device is registered.

Drop these ops and use drm_dev_alloc/register and drm_dev_unregister/unref
to explicitly create and destroy the drm device in the msm platform
driver's bind and unbind ops. With this in use, the drm connectors are
only registered once the drm_device is registered.

It also fixes the issue of stray debugfs files after the msm module is
removed. With this, all the debugfs files are removed, and allows
successive module insertions/removals.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
8 years agodrm/msm: Centralize connector registration/unregistration
Archit Taneja [Mon, 2 May 2016 05:35:53 +0000 (11:05 +0530)]
drm/msm: Centralize connector registration/unregistration

Move the drm_connector registration from the encoder(HDMI/DSI etc) drivers
to the msm platform driver. This will simplify the task of ensuring that
the connectors are registered only after the drm_device itself is
registered.

The connectors' destroy ops are made to use kzalloc instead of
devm_kzalloc to ensure that that the connectors can be successfully
unregistered when the msm driver module is removed. The memory for the
connectors is unallocated when drm_mode_config_cleanup() is called
during either during an error or during driver remove.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm/hdmi: Prevent gpio_free related kernel warnings
Archit Taneja [Mon, 2 May 2016 05:35:52 +0000 (11:05 +0530)]
drm/msm/hdmi: Prevent gpio_free related kernel warnings

Calling the legacy gpio_free on an invalid GPIO (a GPIO numbered -1)
results in kernel warnings. This causes a lot of backtraces when
we try to unload the drm/msm module.

Call gpio_free only on valid GPIOs.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm: print offender task name on hangcheck recovery
Rob Clark [Tue, 3 May 2016 14:10:15 +0000 (10:10 -0400)]
drm/msm: print offender task name on hangcheck recovery

Track the pid per submit, so we can print the name of the task which
submitted the batch that caused the gpu to hang.

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm: fix leak in failed submit path
Rob Clark [Tue, 3 May 2016 13:50:26 +0000 (09:50 -0400)]
drm/msm: fix leak in failed submit path

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm: de-indent submit_create()
Rob Clark [Tue, 3 May 2016 13:49:40 +0000 (09:49 -0400)]
drm/msm: de-indent submit_create()

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm: drop return from gpu->submit()
Rob Clark [Tue, 3 May 2016 13:46:49 +0000 (09:46 -0400)]
drm/msm: drop return from gpu->submit()

At this point, there is nothing left to fail.  And submit already has a
fence assigned and is added to the submit_list.  Any problems from here
on out are asynchronous (ie. hangcheck/recovery).

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm/mdp4: Don't manage DSI PLL regulators in MDP driver
Archit Taneja [Fri, 29 Apr 2016 09:49:37 +0000 (15:19 +0530)]
drm/msm/mdp4: Don't manage DSI PLL regulators in MDP driver

The MDP4 driver tries to request and set voltages for regulators required
by the DSI PLLs.

Firstly, the MDP4 driver shouldn't manage the DSI regulators, this should
be handled in the DSI driver. Secondly, it shouldn't try to set a fixed
voltage for regulators. Voltage constraints should be specified on the
regulator via DT and managed by the regulator core.

Remove all the DSI PLL regulator related code from the MDP4 driver. It's
managed in the DSI driver for MSM8960/APQ8064 already.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm/edp: Drop regulator_set_voltage call
Archit Taneja [Fri, 29 Apr 2016 09:49:36 +0000 (15:19 +0530)]
drm/msm/edp: Drop regulator_set_voltage call

The eDP driver tries to set a fixed voltage for one of its regulators(vdda)
before enabling it. This shouldn't be done by the driver, the voltage
constraints should be specified on the regulator via DT and managed by
the regulator core. A driver should call regulator_set_voltage only if
it needs to change the voltage during runtime. Drop the
regulator_set_voltage call. Mention in a comment the voltage that the
regulator expects.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm/dsi: Fix regulator API abuse
Archit Taneja [Fri, 29 Apr 2016 09:49:35 +0000 (15:19 +0530)]
drm/msm/dsi: Fix regulator API abuse

The voltage changing code in this driver is broken and should be
removed.  The driver sets a single, exact voltage on probe.  Unless
there is a very good reason for this (which should be documented in
comments) constraints like this need to be set via the machine
constraints, voltage setting in a driver is expected to be used in cases
where the voltage varies at runtime.

In addition client drivers should almost never be calling
regulator_can_set_voltage(), if the device needs to set a voltage it
needs to set the voltage and the regulator core will handle the case
where the regulator is fixed voltage.  If the driver simply skips
setting the voltage if it doesn't have permission then it should just
not bother in the first place.

Originally authored by Mark Brown <broonie@kernel.org>

Remove the min/max voltage data entries per SoC managed by the driver.
These aren't needed as we don't try to set voltages any more. Mention in
comments the voltages that each regulator expects.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm: Move call to PTR_ERR_OR_ZERO after reassignment
Vaishali Thakkar [Thu, 28 Apr 2016 13:22:49 +0000 (18:52 +0530)]
drm/msm: Move call to PTR_ERR_OR_ZERO after reassignment

Here, a location is reset to NULL before being passed to PTR_ERR.
So, PTR_ERR should be called before its argument is reassigned
to NULL. Further to simplify things use PTR_ERR_OR_ZERO instead
of PTR_ERR and IS_ERR.

Problem found using Coccinelle.

Signed-off-by: Vaishali Thakkar <vaishali.thakkar@oracle.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
[fixed fmt string warning (s/%ld/%d/)]
Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm/mdp: Add support for more RGBX formats
Rob Herring [Mon, 11 Apr 2016 23:23:51 +0000 (18:23 -0500)]
drm/msm/mdp: Add support for more RGBX formats

Android needs XBGR8888 format. Add all the missing 32-bpp formats
without alpha for completeness.

Cc: Archit Taneja <architt@codeaurora.org>
Cc: Rob Clark <robdclark@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm: msm: remove unused variable
Arnd Bergmann [Sat, 16 Apr 2016 20:41:46 +0000 (22:41 +0200)]
drm: msm: remove unused variable

A recent cleanup removed the only user of the 'kms' variable in
msm_preclose(), causing a harmless compiler warning:

drivers/gpu/drm/msm/msm_drv.c: In function 'msm_preclose':
drivers/gpu/drm/msm/msm_drv.c:468:18: error: unused variable 'kms' [-Werror=unused-variable]

This removes the variable as well.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 4016260ba47a ("drm/msm: fix bug after preclose removal")
Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm: fix ->last_fence() after recover
Rob Clark [Thu, 17 Mar 2016 14:18:38 +0000 (10:18 -0400)]
drm/msm: fix ->last_fence() after recover

It is no longer true that we discard all in-flight submits on recover
(these days we only discard the first one that hung).  After the first
re-submitted batch completes it would overwrite the fence with a correct
value, but there would be a window of time which showed all re-submitted
batches as already complete.

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm: 'struct fence' conversion
Rob Clark [Tue, 15 Mar 2016 22:26:28 +0000 (18:26 -0400)]
drm/msm: 'struct fence' conversion

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm: remove fence_cbs
Rob Clark [Wed, 16 Mar 2016 22:18:17 +0000 (18:18 -0400)]
drm/msm: remove fence_cbs

This was only used for atomic commit these days.  So instead just give
atomic it's own work-queue where we can do a block on each bo in turn.
Simplifies things a whole bunch and makes the 'struct fence' conversion
easier.

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm: introduce msm_fence_context
Rob Clark [Tue, 15 Mar 2016 21:22:13 +0000 (17:22 -0400)]
drm/msm: introduce msm_fence_context

Better encapsulate the per-timeline stuff into fence-context.  For now
there is just a single fence-context, but eventually we'll also have one
per-CRTC to enable fully explicit fencing.

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm: split locking and pinning BO's
Rob Clark [Mon, 14 Mar 2016 17:56:37 +0000 (13:56 -0400)]
drm/msm: split locking and pinning BO's

Split up locking and pinning buffers in the submit path.  This is needed
because we'll want to insert fencing in between the two steps.

This makes things end up looking more similar to etnaviv submit code
(which was originally modelled on the msm code but has already added
'struct fence' support).

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm/gpu: simplify tracking in-flight bo's
Rob Clark [Wed, 16 Mar 2016 20:07:38 +0000 (16:07 -0400)]
drm/msm/gpu: simplify tracking in-flight bo's

Since we already track the array of bo's in the submit object, just
unconditionally take and drop ref's per submit (rather than only taking
ref's if bo is not already active).  This simplifies later patches.

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm: split out timeout_to_jiffies helper
Rob Clark [Wed, 16 Mar 2016 18:57:22 +0000 (14:57 -0400)]
drm/msm: split out timeout_to_jiffies helper

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm: use imported dmabuf's reservation object
Rob Clark [Wed, 16 Mar 2016 16:40:35 +0000 (12:40 -0400)]
drm/msm: use imported dmabuf's reservation object

This was always the intention, but somehow it was never wired up
properly.

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm: move fence code to it's own file
Rob Clark [Tue, 15 Mar 2016 19:35:08 +0000 (15:35 -0400)]
drm/msm: move fence code to it's own file

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm: move debugfs code to it's own file
Rob Clark [Wed, 16 Mar 2016 16:56:12 +0000 (12:56 -0400)]
drm/msm: move debugfs code to it's own file

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agoreservation: add reservation_object_get_excl_rcu()
Rob Clark [Thu, 31 Mar 2016 20:23:51 +0000 (16:23 -0400)]
reservation: add reservation_object_get_excl_rcu()

In the atomic modesetting path, each driver simply wants to grab a ref
to the exclusive fence from a reservation object to store in the incoming
drm_plane_state, without doing the whole RCU dance.  Since each driver
will need to do this, lets make a helper.

v2: rename to _rcu instead of _unlocked to be more consistent

Signed-off-by: Rob Clark <robdclark@gmail.com>
Acked-by: Sumit Semwal <sumit.semwal@linaro.org>
8 years agodrm/msm: make HDCP support optional
Rob Clark [Sun, 20 Mar 2016 14:16:29 +0000 (10:16 -0400)]
drm/msm: make HDCP support optional

It is already optional at runtime.  But this at least simplifies
backports to kernels without QCOM_SCM.

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/i915: Correctly refcount connectors in hw state readou
Daniel Vetter [Fri, 6 May 2016 13:39:03 +0000 (15:39 +0200)]
drm/i915: Correctly refcount connectors in hw state readou

This was forgotten when adding the the refcounting to
drm_connector_state.

v2: Don't forget to unreference existing connectors. This isn't
relevant on driver load, but this code also runs on resume, and there
we already have an atomic state. Spotted by Chris Wilson.

Cc: Gabriel Feceoru <gabriel.feceoru@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Marius Vlad <marius.c.vlad@intel.com>
Cc: Dave Airlie <airlied@redhat.com>
Fixes: d2307dea14a4 ("drm/atomic: use connector references (v3)")
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1462541943-19620-1-git-send-email-daniel.vetter@ffwll.ch
8 years agodrm/panel: Flesh out kerneldoc
Thierry Reding [Fri, 6 May 2016 14:01:37 +0000 (16:01 +0200)]
drm/panel: Flesh out kerneldoc

Write more complete kerneldoc comments for the DRM panel API and
integrate the helpers in the DRM DocBook reference.

Signed-off-by: Thierry Reding <treding@nvidia.com>drm/panel: Add helper for simple panel connector
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20160506140137.GA4641@ulmo.ba.sec
8 years agoMerge branch 'for-next' of http://git.agner.ch/git/linux-drm-fsl-dcu into drm-next
Dave Airlie [Fri, 6 May 2016 04:17:43 +0000 (14:17 +1000)]
Merge branch 'for-next' of git.agner.ch/git/linux-drm-fsl-dcu into drm-next

fsl-dcu pixel clock polarity support
* 'for-next' of http://git.agner.ch/git/linux-drm-fsl-dcu:
  drm/fsl-dcu: use bus_flags for pixel clock polarity
  drm: introduce bus_flags in drm_display_info

8 years agoMerge branch 'drm-next-4.7' of git://people.freedesktop.org/~agd5f/linux into drm...
Dave Airlie [Fri, 6 May 2016 04:17:22 +0000 (14:17 +1000)]
Merge branch 'drm-next-4.7' of git://people.freedesktop.org/~agd5f/linux into drm-next

This is the first big radeon/amdgpu pull request for 4.7.  Highlights:
    - Polaris support in amdgpu
      Current display stack on par with other asics, for advanced features DAL is required
      Power management support
      Support for GFX, Compute, SDMA, UVD, VCE
    - VCE and UVD init/fini cleanup in radeon
    - GPUVM improvements
    - Scheduler improvements
    - Clockgating improvements
    - Powerplay improvements
    - TTM changes to support driver specific LRU update mechanism
    - Radeon support for new Mesa features
    - ASYNC pageflip support for radeon
    - Lots of bug fixes and code cleanups

* 'drm-next-4.7' of git://people.freedesktop.org/~agd5f/linux: (180 commits)
  drm/amdgpu: Replace rcu_assign_pointer() with RCU_INIT_POINTER()
  drm/amdgpu: use drm_mode_vrefresh() rather than mode->vrefresh
  drm/amdgpu/uvd6: add bypass support for fiji (v3)
  drm/amdgpu/fiji: set UVD CG state when enabling UVD DPM (v2)
  drm/powerplay: add missing clockgating callback for tonga
  drm/amdgpu: Constify some tables
  drm/amd/powerplay: Delete dead struct declaration
  drm/amd/powerplay/hwmgr: don't add invalid voltage
  drm/amd/powerplay/hwmgr: prevent VDDC from exceeding 2V
  MAINTAINERS: Remove unneded wildcard for the Radeon/AMDGPU drivers
  drm/radeon: add cayman VM support for append packet.
  drm/amd/amdgpu: Add debugfs entries for smc/didt/pcie
  drm/amd/amdgpu: Drop print_status callbacks.
  drm/amd/powerplay: revise reading/writing pptable on Polaris10
  drm/amd/powerplay: revise reading/writing pptable on Tonga
  drm/amd/powerplay: revise reading/writing pptable on Fiji
  drm/amd/powerplay: revise caching the soft pptable and add it's size
  drm/amd/powerplay: add dpm force multiple levels on cz/tonga/fiji/polaris (v2)
  drm/amd/powerplay: fix fan speed percent setting error on Polaris10
  drm/amd/powerplay: fix bug dpm can't work when resume back on Polaris
  ...

8 years agodrm/fsl-dcu: use bus_flags for pixel clock polarity
Stefan Agner [Mon, 8 Feb 2016 20:50:13 +0000 (12:50 -0800)]
drm/fsl-dcu: use bus_flags for pixel clock polarity

The drivers current default configuration drives the pixel data
on rising edge of the pixel clock. However, most display sample
data on rising edge... This leads to color shift artefacts visible
especially at edges.

This patch changes the relevant defines to be useful and actually
set the bits, and changes pixel clock polarity to drive the pixel
data on falling edge by default. The patch also adds an explicit
pixel clock polarity flag to the display introduced with the driver
(NEC WQVGA "nec,nl4827hc19-05b") using the new bus_flags field to
retain the initial behavior.

Signed-off-by: Stefan Agner <stefan@agner.ch>
8 years agodrm: introduce bus_flags in drm_display_info
Stefan Agner [Mon, 8 Feb 2016 19:38:14 +0000 (11:38 -0800)]
drm: introduce bus_flags in drm_display_info

Introduce bus_flags to specify display bus properties like signal
polarities. This is useful for parallel display buses, e.g. to
specify the pixel clock or data enable polarity.

Suggested-by: Thierry Reding <thierry.reding@gmail.com>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Manfred Schlaegl <manfred.schlaegl@gmx.at>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Stefan Agner <stefan@agner.ch>
8 years agodrm: Add gpu.tmpl docbook to MAINTAINERS entry
Daniel Vetter [Mon, 2 May 2016 21:49:40 +0000 (23:49 +0200)]
drm: Add gpu.tmpl docbook to MAINTAINERS entry

Patches get misrouted and lost otherwise. And use * to future-proof
for sphinx (or whatever the documentation nirvana toolchain will be).

Cc: Jonathan Corbet <corbet@lwn.net>
Cc: David Airlie <airlied@linux.ie>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Acked-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1462225780-3663-1-git-send-email-daniel.vetter@ffwll.ch
8 years agodrm/core: Do not preserve framebuffer on rmfb, v4.
Maarten Lankhorst [Wed, 4 May 2016 12:38:26 +0000 (14:38 +0200)]
drm/core: Do not preserve framebuffer on rmfb, v4.

It turns out that preserving framebuffers after the rmfb call breaks
vmwgfx userspace. This was originally introduced because it was thought
nobody relied on the behavior, but unfortunately it seems there are
exceptions.

drm_framebuffer_remove may fail with -EINTR now, so a straight revert
is impossible. There is no way to remove the framebuffer from the lists
and active planes without introducing a race because of the different
locking requirements. Instead call drm_framebuffer_remove from a
workqueue, which is unaffected by signals.

Changes since v1:
- Add comment.
Changes since v2:
- Add fastpath for refcount = 1. (danvet)
Changes since v3:
- Rebased.
- Restore lastclose framebuffer removal too.

Cc: stable@vger.kernel.org #v4.4+
Fixes: 13803132818c ("drm/core: Preserve the framebuffer after removing it.")
Testcase: kms_rmfb_basic
References: https://lists.freedesktop.org/archives/dri-devel/2016-March/102876.html
Cc: Thomas Hellstrom <thellstrom@vmware.com>
Cc: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Tested-by: Thomas Hellstrom <thellstrom@vmware.com> #v3
Tested-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/6c63ca37-0e7e-ac7f-a6d2-c7822e3d611f@linux.intel.com
8 years agodrm: Fix up markup fumble
Daniel Vetter [Wed, 4 May 2016 13:42:07 +0000 (15:42 +0200)]
drm: Fix up markup fumble

It's & for struct references, not #.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Acked-by: Jani Nikula <jani.nikula@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1462369327-26659-1-git-send-email-daniel.vetter@ffwll.ch
8 years agodrm/fb_helper: Fix a few typos
Lyude [Wed, 4 May 2016 15:28:53 +0000 (11:28 -0400)]
drm/fb_helper: Fix a few typos

s/modest/modeset/
s/aftert/after/

Signed-off-by: Lyude <cpaul@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1462375734-8213-3-git-send-email-cpaul@redhat.com
8 years agodrm/i915/mst: use reference counted connectors. (v3)
Dave Airlie [Wed, 9 Mar 2016 01:14:38 +0000 (11:14 +1000)]
drm/i915/mst: use reference counted connectors. (v3)

Don't just free the connector when we get the destroy callback.

Drop a reference to it, and set it's mst_port to NULL so
no more mst work is done on it.

v2: core mst accepts NULLs fine. Cleanup EDID code properly.
v3: drop the extra reference we were taking.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
8 years agodrm/atomic: use connector references (v3)
Dave Airlie [Wed, 27 Apr 2016 01:27:39 +0000 (11:27 +1000)]
drm/atomic: use connector references (v3)

Take a reference when setting a crtc on a connecter,
also take one when duplicating if a crtc is set,
and drop one on destroy if a crtc is set.

v2: take Daniel Stone's advice and simplify the
ref/unref dances, also take care of NULL as connector
to state reset.

v3: remove need for connector NULL check.

Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
8 years agodrm/crtc: take references to connectors used in a modeset. (v2)
Dave Airlie [Wed, 27 Apr 2016 01:27:54 +0000 (11:27 +1000)]
drm/crtc: take references to connectors used in a modeset. (v2)

This just takes a reference on the connector when we set a mode
in the non-atomic paths.

v2: Follow Daniel Stone's suggestions on when to take/drop
references.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
8 years agodrm/fb_helper: add connector reference counting. (v2)
Dave Airlie [Wed, 27 Apr 2016 01:24:51 +0000 (11:24 +1000)]
drm/fb_helper: add connector reference counting. (v2)

This takes a reference count when fbdev adds the connector,
and drops it when it removes the connector.

It also drops the now unneeded code to find connectors
and remove the from the modeset as they are reference counted.

v2: drop references when removing all connectors at end.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
8 years agodrm/modes: add connector reference counting. (v2)
Dave Airlie [Wed, 27 Apr 2016 01:10:09 +0000 (11:10 +1000)]
drm/modes: add connector reference counting. (v2)

This uses the previous changes to add reference counts
to drm connector objects.

v2: move fbdev changes to their own patch.
add some kerneldoc

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
8 years agodrm/fb: fix missing /** in kerneldoc comment.
Dave Airlie [Tue, 3 May 2016 00:17:52 +0000 (10:17 +1000)]
drm/fb: fix missing /** in kerneldoc comment.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
8 years agodrm/amdgpu: Replace rcu_assign_pointer() with RCU_INIT_POINTER()
Muhammad Falak R Wani [Sat, 30 Apr 2016 19:00:24 +0000 (00:30 +0530)]
drm/amdgpu: Replace rcu_assign_pointer() with RCU_INIT_POINTER()

The rcu_assign_pointer() ensures that the initialization of a structure
is carried out before storing a pointer to that structre. It is always
safe to use RCU_INIT_POINTER() to NULL a pointer, instead of
rcu_assign_pointer().
This results in slightly smaller/faster code.

The following semantic patch was used:
<smpl>

@@
@@

- rcu_assign_pointer
+ RCU_INIT_POINTER
  (..., NULL)

</smpl>

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: use drm_mode_vrefresh() rather than mode->vrefresh
Alex Deucher [Mon, 2 May 2016 14:24:41 +0000 (10:24 -0400)]
drm/amdgpu: use drm_mode_vrefresh() rather than mode->vrefresh

This is a port of radeon commit:
3d2d98ee1af0cf6eebfbd6bff4c17d3601ac1284
drm/radeon: use drm_mode_vrefresh() rather than mode->vrefresh
to amdgpu.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
8 years agodrm/amdgpu/uvd6: add bypass support for fiji (v3)
Alex Deucher [Fri, 29 Apr 2016 15:44:32 +0000 (11:44 -0400)]
drm/amdgpu/uvd6: add bypass support for fiji (v3)

Handle uvd clock bypass settings as part of clockgating
setup.

v2: fix gate logic
v3: fix header include

Reviewed-by: Eric Huang <JinHuiEric.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu/fiji: set UVD CG state when enabling UVD DPM (v2)
Alex Deucher [Fri, 29 Apr 2016 15:20:32 +0000 (11:20 -0400)]
drm/amdgpu/fiji: set UVD CG state when enabling UVD DPM (v2)

Need to call the IP cg callbacks.

v2: fix gate logic

Reviewed-by: Eric Huang <JinHuiEric.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/powerplay: add missing clockgating callback for tonga
Alex Deucher [Thu, 28 Apr 2016 21:19:41 +0000 (17:19 -0400)]
drm/powerplay: add missing clockgating callback for tonga

Without this clockgating is not enabled.

Reviewed-by: Ken Wang <Qingqing.Wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: Constify some tables
Nils Wallménius [Mon, 25 Apr 2016 19:31:34 +0000 (21:31 +0200)]
drm/amdgpu: Constify some tables

Some more tables with constant data were added with the polaris support

v2: missed a few

Signed-off-by: Nils Wallménius <nils.wallmenius@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: Delete dead struct declaration
Nils Wallménius [Sun, 24 Apr 2016 11:21:27 +0000 (13:21 +0200)]
drm/amd/powerplay: Delete dead struct declaration

Signed-off-by: Nils Wallménius <nils.wallmenius@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay/hwmgr: don't add invalid voltage
Moritz Kühner [Sun, 17 Apr 2016 14:15:24 +0000 (16:15 +0200)]
drm/amd/powerplay/hwmgr: don't add invalid voltage

if atomctrl_get_voltage_evv_on_sclk returns non zero (fail) in the expansion
of the PP_ASSERT_WITH_CODE macro the continue will actually do nothing
(The macro uses a do ... while(0) as scope, which eats the continue).
Based on the code I don't think this was the intent.
Unfortunately fixing this requires rewriting the control flow and
removing the macros.

v2: added signed of by
fixed error message print

v3: agd: drop DRM_ERROR

Signed-off-by: Moritz Kühner <kuehner.moritz@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay/hwmgr: prevent VDDC from exceeding 2V
Moritz Kühner [Sun, 17 Apr 2016 14:15:23 +0000 (16:15 +0200)]
drm/amd/powerplay/hwmgr: prevent VDDC from exceeding 2V

If the tonga gpu is controlled by SVID2 tonga_get_evv_voltage will only print
an error if the voltage exceeds 2V although a comment clearly states that it
needs be less than 2V.

v2: added signed of by

Signed-off-by: Moritz Kühner <kuehner.moritz@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agoMAINTAINERS: Remove unneded wildcard for the Radeon/AMDGPU drivers
Emil Velikov [Thu, 21 Apr 2016 23:03:49 +0000 (00:03 +0100)]
MAINTAINERS: Remove unneded wildcard for the Radeon/AMDGPU drivers

There are no other files but the UAPI headers, thus we can drop the
wildcard.

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/radeon: add cayman VM support for append packet.
Dave Airlie [Fri, 22 Apr 2016 00:06:23 +0000 (10:06 +1000)]
drm/radeon: add cayman VM support for append packet.

This adds support for SET_APPEND_CNT packet3 to the VM paths.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/amdgpu: Add debugfs entries for smc/didt/pcie
Tom St Denis [Fri, 15 Apr 2016 17:08:44 +0000 (13:08 -0400)]
drm/amd/amdgpu: Add debugfs entries for smc/didt/pcie

This adds 3 new files that can be read/written to access
indirect GPU registers.

Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/amdgpu: Drop print_status callbacks.
Tom St Denis [Mon, 28 Mar 2016 12:21:52 +0000 (08:21 -0400)]
drm/amd/amdgpu: Drop print_status callbacks.

First patch in series to move to user mode
debug tools we're removing the print_status callbacks.

These functions were unused at the moment anyway.

Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: revise reading/writing pptable on Polaris10
Eric Huang [Fri, 15 Apr 2016 21:23:14 +0000 (17:23 -0400)]
drm/amd/powerplay: revise reading/writing pptable on Polaris10

Change the way we store pptables in the driver to better
facilitate eventual runtime updates for debugging.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: revise reading/writing pptable on Tonga
Eric Huang [Fri, 15 Apr 2016 21:14:53 +0000 (17:14 -0400)]
drm/amd/powerplay: revise reading/writing pptable on Tonga

Change the way we store pptables in the driver to better
facilitate eventual runtime updates for debugging.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: revise reading/writing pptable on Fiji
Eric Huang [Fri, 15 Apr 2016 20:33:20 +0000 (16:33 -0400)]
drm/amd/powerplay: revise reading/writing pptable on Fiji

Change the way we store pptables in the driver to better
facilitate eventual runtime updates for debugging.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: revise caching the soft pptable and add it's size
Eric Huang [Fri, 15 Apr 2016 19:02:54 +0000 (15:02 -0400)]
drm/amd/powerplay: revise caching the soft pptable and add it's size

This fixes a bug in the pptable access interface that could lead to
a crash.  Check the pointer before using it.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: add dpm force multiple levels on cz/tonga/fiji/polaris (v2)
Eric Huang [Tue, 12 Apr 2016 18:57:23 +0000 (14:57 -0400)]
drm/amd/powerplay: add dpm force multiple levels on cz/tonga/fiji/polaris (v2)

Allows you to force multiple levels rather than just one via the new
sysfs interrface.

v2: squash in:
drm/amd/powerplay: ensure clock level set by user is valid.
From Rex.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: fix fan speed percent setting error on Polaris10
Eric Huang [Mon, 11 Apr 2016 18:26:12 +0000 (14:26 -0400)]
drm/amd/powerplay: fix fan speed percent setting error on Polaris10

The logic was reversed.

Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: fix bug dpm can't work when resume back on Polaris
Eric Huang [Mon, 4 Apr 2016 15:52:56 +0000 (11:52 -0400)]
drm/amd/powerplay: fix bug dpm can't work when resume back on Polaris

Need to initialize the values to 0 since they get or'ed with additional
values.  If the initialization is missing, on resume, they may end up
with a combination of stale data and new data.

Fixes dpm on resume.

Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: fix some initialize error on polaris10.
Rex Zhu [Fri, 1 Apr 2016 11:56:07 +0000 (19:56 +0800)]
drm/amd/powerplay: fix some initialize error on polaris10.

1. don't enable SclkThrottleLowNotification, it's not supported.
2. Set missing mclk_dpm0_activity_target

Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: return 0 when interface not implement on some asic.
Rex Zhu [Wed, 30 Mar 2016 03:35:50 +0000 (11:35 +0800)]
drm/amd/powerplay: return 0 when interface not implement on some asic.

Don't fail if certain optional interface callbacks are missing.

Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: fix memory leak in CGS (FW info)
Mykola Lysenko [Wed, 30 Mar 2016 09:50:11 +0000 (05:50 -0400)]
drm/amdgpu: fix memory leak in CGS (FW info)

Previously requested FW pointer should not be
overwritten on a subsequent call.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Mykola Lysenko <Mykola.Lysenko@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: update vce power gate state for baffin.
Rex Zhu [Fri, 25 Mar 2016 05:08:46 +0000 (13:08 +0800)]
drm/amd/powerplay: update vce power gate state for baffin.

Forgot to save the current gate state so we don't know
what the current state is if we try and gate/ungate the
block.

Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: Fix a bug for enabling ACDC gpio interrupt
Eric Huang [Thu, 24 Mar 2016 20:44:18 +0000 (16:44 -0400)]
drm/amd/powerplay: Fix a bug for enabling ACDC gpio interrupt

Only enable it if it's supported rather than unconitionally.

Signed-off-by: Eric Yang <eric.yang2@amd.com>
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: fix issue that get wrong reference clock value.
Rex Zhu [Wed, 23 Mar 2016 07:12:48 +0000 (15:12 +0800)]
drm/amd/powerplay: fix issue that get wrong reference clock value.

use wrong parameter to compute the reference clock.

Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: parameter updates according to SMC.
Rex Zhu [Wed, 23 Mar 2016 07:04:23 +0000 (15:04 +0800)]
drm/amd/powerplay: parameter updates according to SMC.

Update to latest changes for SMC team.

Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: add fan control mode interface for baffin
Rex Zhu [Wed, 23 Mar 2016 10:47:29 +0000 (18:47 +0800)]
drm/amd/powerplay: add fan control mode interface for baffin

Add interface for manual fan control.

Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: enable some feature for baffin/ellesmere. (v2)
Rex Zhu [Wed, 23 Mar 2016 06:50:22 +0000 (14:50 +0800)]
drm/amd/powerplay: enable some feature for baffin/ellesmere. (v2)

Sync up with internal updates.

v2: squash in:
drm/amd/powerplay: set revert flag for enable thermal protect.

Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: code style refine.
Rex Zhu [Wed, 23 Mar 2016 06:48:03 +0000 (14:48 +0800)]
drm/amdgpu: code style refine.

Whitespace fix.

Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: fix copy paste error in error message
Alex Deucher [Fri, 25 Mar 2016 16:23:49 +0000 (12:23 -0400)]
drm/amd/powerplay: fix copy paste error in error message

Noticed-by: Vasily Anonimov <vasily.anonimov@googlemail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/amdgpu: fix 64-bit division
Slava Grigorev [Wed, 23 Mar 2016 03:34:29 +0000 (23:34 -0400)]
drm/amd/amdgpu: fix 64-bit division

Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: add polaris10/11 smc fw declaration
Flora Cui [Fri, 18 Mar 2016 11:07:55 +0000 (19:07 +0800)]
drm/amdgpu: add polaris10/11 smc fw declaration

Signed-off-by: Flora Cui <Flora.Cui@amd.com>
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: Disable Spread Spectrum on DPM 0 on baffin as SPLL Shut Down featu...
Rex Zhu [Tue, 22 Mar 2016 06:21:18 +0000 (14:21 +0800)]
drm/amd/powerplay: Disable Spread Spectrum on DPM 0 on baffin as SPLL Shut Down feature is enabled.

Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Acked-by: Flora Cui <Flora.Cui@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: enable set lowest mclk clock on baffin.
Rex Zhu [Tue, 15 Mar 2016 11:30:00 +0000 (19:30 +0800)]
drm/amd/powerplay: enable set lowest mclk clock on baffin.

Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powrplay: fix issue that get wrong enable flag.
Rex Zhu [Tue, 15 Mar 2016 09:42:47 +0000 (17:42 +0800)]
drm/amd/powrplay: fix issue that get wrong enable flag.

Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: fix mclk in high clock for baffin
Rex Zhu [Tue, 15 Mar 2016 06:39:12 +0000 (14:39 +0800)]
drm/amd/powerplay: fix mclk in high clock for baffin

Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: print gpu loading and uvd/vce power gate enablement for polaris10/11.
Rex Zhu [Tue, 1 Mar 2016 09:01:30 +0000 (17:01 +0800)]
drm/amd/powerplay: print gpu loading and uvd/vce power gate enablement for polaris10/11.

Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: change ELM/BAF to Polaris10/Polaris11
Flora Cui [Mon, 14 Mar 2016 22:33:29 +0000 (18:33 -0400)]
drm/amdgpu: change ELM/BAF to Polaris10/Polaris11

Adjust to preferred code names.

Signed-off-by: Flora Cui <Flora.Cui@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: add ELM/BAF pci ids
Flora Cui [Thu, 29 Oct 2015 09:32:11 +0000 (17:32 +0800)]
drm/amdgpu: add ELM/BAF pci ids

Signed-off-by: Flora Cui <Flora.Cui@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: update the core VI support for ELM/BAF
Flora Cui [Mon, 7 Dec 2015 10:33:10 +0000 (18:33 +0800)]
drm/amdgpu: update the core VI support for ELM/BAF

Signed-off-by: Flora Cui <Flora.Cui@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: ungate SMC clockgating first before suspend
Flora Cui [Fri, 26 Feb 2016 02:45:25 +0000 (10:45 +0800)]
drm/amdgpu: ungate SMC clockgating first before suspend

46c34bcb6a15dd85329a39a5e72c62108626acdc put all block’s clockgating
support in SMC. The sequence in suspend routine should be adjusted
accordingly, otherwise it causes asic hang.

Signed-off-by: Flora Cui <Flora.Cui@amd.com>
Reviewed-by: Eric Huang <JinHuiEric.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/amdgpu: add power gating init for Baffin
Eric Huang [Tue, 16 Feb 2016 22:33:14 +0000 (17:33 -0500)]
drm/amd/amdgpu: add power gating init for Baffin

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/amdgpu: add power gating initialization support for GFX8.0
Eric Huang [Thu, 14 Apr 2016 21:26:07 +0000 (17:26 -0400)]
drm/amd/amdgpu: add power gating initialization support for GFX8.0

Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: add default clockgating handling
Flora Cui [Mon, 15 Feb 2016 07:45:59 +0000 (15:45 +0800)]
drm/amd/powerplay: add default clockgating handling

This is to workaround regression introduced in
46c34bcb6a15dd85329a39a5e72c62108626acdc. It should be reverted with a
final fix.

Signed-off-by: Flora Cui <Flora.Cui@amd.com>
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/amdgpu: add medium grain powergating support for Baffin
Eric Huang [Fri, 12 Feb 2016 15:58:51 +0000 (10:58 -0500)]
drm/amd/amdgpu: add medium grain powergating support for Baffin

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: add GFX per cu powergating for Baffin
Eric Huang [Fri, 11 Mar 2016 19:53:39 +0000 (14:53 -0500)]
drm/amd/powerplay: add GFX per cu powergating for Baffin

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: add GFX per cu powergating support through SMU/powerplay
Eric Huang [Thu, 11 Feb 2016 20:54:45 +0000 (15:54 -0500)]
drm/amd/powerplay: add GFX per cu powergating support through SMU/powerplay

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/amdgpu: add query GFX cu info in CGS query system info
Eric Huang [Thu, 17 Mar 2016 22:29:08 +0000 (18:29 -0400)]
drm/amd/amdgpu: add query GFX cu info in CGS query system info

Needed for per CU powergating.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: add GFX/SYS clockgating support for ELM/BAF
Eric Huang [Thu, 11 Feb 2016 16:09:09 +0000 (11:09 -0500)]
drm/amd/powerplay: add GFX/SYS clockgating support for ELM/BAF

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: add all blocks clockgating support through SMU/powerplay
Eric Huang [Tue, 9 Feb 2016 21:26:00 +0000 (16:26 -0500)]
drm/amd/powerplay: add all blocks clockgating support through SMU/powerplay

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: update baffin & ellesmere smc_sk firmware.
yanyang1 [Sat, 6 Feb 2016 05:28:47 +0000 (13:28 +0800)]
drm/amd/powerplay: update baffin & ellesmere smc_sk firmware.

sync the code form catalyst CL:#1230866.

Signed-off-by: yanyang1 <Young.Yang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: Add smc_sk firmware to baffin & ellesmere.
yanyang1 [Fri, 5 Feb 2016 09:43:17 +0000 (17:43 +0800)]
drm/amd/powerplay: Add smc_sk firmware to baffin & ellesmere.

update relational h files.

Signed-off-by: yanyang1 <Young.Yang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/amdgpu: Add smc_sk firmware in baffin & ellesmere.
yanyang1 [Fri, 5 Feb 2016 09:39:37 +0000 (17:39 +0800)]
drm/amd/amdgpu: Add smc_sk firmware in baffin & ellesmere.

add CGS_UCODE_ID_SMU_SK.

Signed-off-by: yanyang1 <Young.Yang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: add UVD&VCE DPM and powergating support for elm/baf
Eric Huang [Fri, 5 Feb 2016 19:47:06 +0000 (14:47 -0500)]
drm/amd/powerplay: add UVD&VCE DPM and powergating support for elm/baf

Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: add thermal control for elm/baf
Eric Huang [Tue, 2 Feb 2016 21:09:24 +0000 (16:09 -0500)]
drm/amd/powerplay: add thermal control for elm/baf

Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>