Anusha Srivatsa
fe9a9da61c
drm/i915/dmc: DMC 1.07 for Cannonlake
...
There is a new version of DMC available for CNL.
The release notes mentions:
1. Fix for the issue where DC_STATE was getting enabled
even when disabled by driver causing data corruption
v2: Since the firmware is merged to linux-firmware.git,
add MODULE_FIRMWARE.
v3: rebased. Correct commit message(Jani)
Cc: Jani Saarinen <jani.saarinen@intel.com >
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/1515109902-14076-1-git-send-email-anusha.srivatsa@intel.com
2018-01-04 16:29:12 -08:00
Anusha Srivatsa
39ccc9852e
drm/i915/skl: DMC firmware for skylake v1.27
...
There is a new version of dmc available for skylake.
Following additions from ver1.27
1. Fix for the issue where DC_STATE was getting enabled even when
disabled by driver causing data corruption.
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com >
Reviewed-by: Imre Deak <imre.deak@intel.com >
Signed-off-by: Imre Deak <imre.deak@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/1510276712-29590-2-git-send-email-anusha.srivatsa@intel.com
2017-12-05 15:57:08 +02:00
Anusha Srivatsa
4f0aa1fa3e
drm/i915/dmc: DMC 1.04 for Kabylake
...
There is a new version of DMC available for KBL.
The release notes mentions:
1. Fix for the issue where DC_STATE was getting enabled even
when disabled by driver causing data corruption.
v2: Remove pull request from commit message (Rodrigo).
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/1510253503-12634-1-git-send-email-anusha.srivatsa@intel.com
2017-11-23 11:14:11 +02:00
Chris Wilson
2f59f1b33a
drm/i915: Silence compiler for csr_load_work_fn()
...
gcc-4.7 is not very smart and can not tell that "si" is guarded by size
being 0. So it complains,
drivers/gpu/drm/i915/intel_csr.c: In function ‘csr_load_work_fn’:
drivers/gpu/drm/i915/intel_csr.c:204:3: warning: ‘si’ may be used uninitialized in this function [-Wmaybe-uninitialized]
drivers/gpu/drm/i915/intel_csr.c:190:30: note: ‘si’ was declared in
Give in and mark si as NULL.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Anusha Srivatsa <anusha.srivatsa@intel.com >
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com >
Cc: Imre Deak <imre.deak@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171107145334.27154-1-chris@chris-wilson.co.uk
Reviewed-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk >
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com >
2017-11-07 17:50:10 +00:00
Anusha Srivatsa
b40c88fda1
drm/i915/cnl: Update the DMC version on CNL
...
The latest version of DMC on CNL is 1.06.
Update the version so as to load the
latest firmware.
Release Notes:
Version: 1.06
1. DDI and AUX IO related fix.
v2: Improve the prefixes in commit message.
Add Release Notes directly. (Rodrigo)
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/1507053588-677-1-git-send-email-anusha.srivatsa@intel.com
2017-10-24 13:52:00 -07:00
Michal Wajdeczko
f1e86cecf1
drm/i915: Update DMC firmware load error messages
...
Some of the error messages from DMC load were too generic and
may be confusing for the user. Lets explicitly add DMC words there.
Also as homepage of DMC firmware is same as for the GuC and Huc,
lets reuse URL definition.
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com >
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Imre Deak <imre.deak@intel.com >
Cc: Mika Kuoppala <mika.kuoppala@intel.com >
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171016144724.17244-12-michal.wajdeczko@intel.com
2017-10-16 18:53:28 +03:00
Imre Deak
b7208a3f3e
drm/i915/glk: Fix DMC/DC state idleness calculation
...
According to BSpec GLK like BXT needs to ignore the idle state of cores
before starting the DMC firmware's DC state handler.
Fixes: dbb28b5c3d
("drm/i915/DMC/GLK: Load DMC on GLK")
Cc: Anusha Srivatsa <anusha.srivatsa@intel.com >
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Imre Deak <imre.deak@intel.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171003095159.711-2-imre.deak@intel.com
2017-10-04 11:38:33 +03:00
David Weinehall
dff457d74e
drm/i915: Speed up DMC firmware loading
...
Currently we're doing:
1. acquire lock
2. write word to hardware
3. release lock
4. repeat from 1
to load the DMC firmware. Due to the cost of acquiring/releasing a lock,
and the size of the DMC firmware, this slows down DMC loading a lot.
This patch simply acquires the lock, writes the entire firmware,
then releases the lock. Testing shows resume speedups
in the order of 10ms on platforms with DMC firmware (GEN9+).
v2: Per feedback from Chris & Ville there's no need to do the whole
forcewake dance, so lose that bit (Chris, Ville)
v3: Actually send the new version of the patch...
v4: Don't acquire the uncore lock. Disable preempt. (Chris)
Signed-off-by: David Weinehall <david.weinehall@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20170905131050.11655-1-david.weinehall@linux.intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
2017-09-25 14:48:44 +01:00
Rodrigo Vivi
1a7399aa58
drm/i915: Use HAS_CSR instead of gen number on DMC load.
...
Since we have HAS_CSR tied to the platform definition
let's use this instead of checking per platform.
One less thing to worry when adding support to new platforms.
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Reviewed-by: Animesh Manna<animesh.manna@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1497047175-27250-14-git-send-email-rodrigo.vivi@intel.com
2017-06-12 09:45:30 -07:00
Anusha Srivatsa
cebfcead63
drm/i915/DMC/CNL: Load DMC on CNL
...
This patch loads the DMC on CNL.The firmware version
is 1.04.
v2: (Rodrigo) Remove MODULE_FIRMWARE.
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com >
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Reviewed-by: Animesh Manna <animesh.manna@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1497047175-27250-13-git-send-email-rodrigo.vivi@intel.com
2017-06-12 09:44:34 -07:00
Rodrigo Vivi
84cd843e71
drm/i915/cfl: Coffee Lake reuses Kabylake DMC.
...
both platforms. We haven't recieved any separated release
specifically for Coffee Lake so let's just re-use what
is already there for Kabylake.
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1497038550-30910-1-git-send-email-rodrigo.vivi@intel.com
2017-06-09 14:49:40 -07:00
Jani Nikula
c1aecc5376
drm/i915: update the firmware download URL
...
The old URL works but gives 301 Moved Permanently. Update.
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1489574966-27200-1-git-send-email-jani.nikula@intel.com
2017-03-28 11:17:37 +03:00
Anusha Srivatsa
aebfd1d371
drm/i915/: DMC 1.04 for Geminilake
...
There is a nre version of DMC available for GLK.
The release notes mentions:
This FW has the fix to remove the hang conditions due to
some debug related issues.
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com >
Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com >
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1487793336-31857-1-git-send-email-anusha.srivatsa@intel.com
2017-03-07 09:55:46 +02:00
Ander Conselvan de Oliveira
d9321a03ef
drm/i915/glk: Remove MODULE_FIRMWARE() tag from Geminilake's DMC
...
Geminilake's DMC is not yet available in the linux-firmware repository.
To prevent userspace tools such as mkinitramfs to complain about
missing firmware, remove the MODULE_FIRMWARE() tag for now.
Fixes: dbb28b5c3d
("drm/i915/DMC/GLK: Load DMC on GLK")
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com >
Cc: Anusha Srivatsa <anusha.srivatsa@intel.com >
Cc: Daniel Vetter <daniel.vetter@intel.com >
Cc: Jani Nikula <jani.nikula@linux.intel.com >
Cc: intel-gfx@lists.freedesktop.org
Cc: <drm-intel-fixes@lists.freedesktop.org >
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com >
Acked-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170306085651.14008-1-ander.conselvan.de.oliveira@intel.com
2017-03-06 12:55:40 +02:00
Rodrigo Vivi
f4a791819e
drm/i915: DMC 1.03 for Geminilake
...
There is a new version of DMC available for Geminilake.
It's release notes only mention:
- Enhancement in the FW to restore the PG2 state
v2: Fixed the platform name on commit message.
Noticed by Jani S.
v3: cook on top of drm-tip without depending on kbl
one so CI can check.
v4: make v3 on top of v2.
Cc: David Weinehall <tao@kernel.org >
Cc: Jani Saarinen <jani.saarinen@intel.com >
Cc: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com >
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com >
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1487295515-15396-1-git-send-email-rodrigo.vivi@intel.com
2017-02-20 10:35:03 +02:00
Chris Wilson
ec78828ed6
drm/i915: Fix W=1 warning for csr_load_work_fn()
...
drivers/gpu/drm/i915/intel_csr.c: In function ‘csr_load_work_fn’:
drivers/gpu/drm/i915/intel_csr.c:399:6: error: variable ‘ret’ set but not used [-Werror=unused-but-set-variable]
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Link: http://patchwork.freedesktop.org/patch/msgid/20170118121808.27869-2-chris@chris-wilson.co.uk
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com >
2017-01-23 09:15:29 +00:00
Anusha Srivatsa
dbb28b5c3d
drm/i915/DMC/GLK: Load DMC on GLK
...
This patch loads the DMC on GLK. There is a single
firmware image for all steppings on a GLK.
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1481902946-18593-1-git-send-email-ander.conselvan.de.oliveira@intel.com
2017-01-10 11:03:56 +02:00
Jérémy Lefaure
3aaa8aba9f
drm/i915: fix compilation warnings on maybe uninitialized pointers
...
Two warnings are produced by gcc (tested with gcc 6.2.1):
drivers/gpu/drm/i915/intel_csr.c: In function ‘csr_load_work_fn’:
drivers/gpu/drm/i915/intel_csr.c:400:5: error: ‘fw’ is used
uninitialized in this function [-Werror=uninitialized]
if (fw)
^
and
In file included from drivers/gpu/drm/i915/i915_drv.h:47:0,
from drivers/gpu/drm/i915/intel_guc_loader.c:30:
drivers/gpu/drm/i915/intel_guc_loader.c: In function ‘intel_guc_init’:
./include/drm/drmP.h:228:2: error: ‘fw’ may be used uninitialized in this
function -Werror=maybe-uninitialized]
drm_printk(KERN_DEBUG, DRM_UT_DRIVER, fmt, ##__VA_ARGS__)
^~~~~~~~~~
drivers/gpu/drm/i915/intel_guc_loader.c:595:25: note: ‘fw’ was declared here
const struct firmware *fw;
^~
When CONFIG_DRM_I915_WERROR is set, those warnings break the build.
Initializing fw pointer to NULL in both cases removes the warnings.
Signed-off-by: Jérémy Lefaure <jeremy.lefaure@lse.epita.fr >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/20161128234319.20800-1-jeremy.lefaure@lse.epita.fr
2016-11-29 11:31:01 +01:00
Mika Kuoppala
b2251c0820
drm/i915: Add more keywords to firmware loading message
...
To find out what firmware we actually loaded (from dmesg) the explicit
'dmc' and 'firmware' are missing from the info printout. Add them.
Cc: Imre Deak <imre.deak@intel.com >
Reviewed-by: Imre Deak <imre.deak@intel.com >
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1479288806-17355-1-git-send-email-mika.kuoppala@intel.com
2016-11-21 14:35:49 +02:00
Anusha Srivatsa
1c00164d4c
drm/i915/DMC/KBL: Load DMC on KBL using the no_stepping_info array
...
Currently, for display there is only one DMC image for KBL.
Remove the stepping_info table for KBL and use the no_stepping_info
array for loading the firmware.
v2: Removed the block of code as pointed out by Rodrigo to make the
loads as generic as possible.
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Acked-by: Imre Deak <imre.deak@intel.com >
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1477355301-7035-1-git-send-email-anusha.srivatsa@intel.com
2016-10-26 14:20:53 -07:00
Maarten Lankhorst
536ab3ca19
drm/i915: Fix botched merge that downgrades CSR versions.
...
Merge commit 5e580523d9
reverts the version bumping parts of
commit 4aa7fb9c3c
. Bump the versions again and request the specific
firmware version.
The currently recommended versions are: SKL 1.26, KBL 1.01 and BXT 1.07.
Cc: Patrik Jakobsson <patrik.jakobsson@linux.intel.com >
Cc: Imre Deak <imre.deak@intel.com >
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97242
Cc: drm-intel-fixes@lists.freedesktop.org
Fixes: 5e580523d9
("Backmerge tag 'v4.7' into drm-next")
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1471266567-22443-1-git-send-email-maarten.lankhorst@linux.intel.com
Reviewed-by: Imre Deak <imre.deak@intel.com >
2016-08-22 12:54:50 +02:00
Daniel Vetter
94558e265b
Merge remote-tracking branch 'airlied/drm-next' into drm-intel-next-queued
...
Backmerge the 4.8 pull request state from Dave - conflicts were
getting out of hand, and Chris has some patches which outright don't
apply without everything merged together again.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
2016-08-05 10:36:15 +02:00
Dave Airlie
5e580523d9
Backmerge tag 'v4.7' into drm-next
...
Linux 4.7
As requested by Daniel Vetter as the conflicts were getting messy.
2016-07-26 17:26:29 +10:00
Daniel Vetter
843759a5f8
drm/i915: Remove misleading CSR firmware loading docs
...
I forgot to remove these when reworking the firmware loading sequence
last year. The new sequence is that we load firmware, and if it's not
there we entirely (and permanently) fail dmc setup.
Reported-by: Dave Gordon <david.s.gordon@intel.com >
Reviewed-by: Dave Gordon <david.s.gordon@intel.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1468505704-17391-1-git-send-email-daniel.vetter@ffwll.ch
2016-07-21 22:23:04 +02:00
Rodrigo Vivi
a4a027a860
drm/i915/kbl: Introduce the first official DMC for Kabylake.
...
Version 1.01.
This firmware is made for Kabylake platform so it doesn't
need the stepping workaround that we had before.
v2: Rebased on top of latest nightly with min version
required change.
v3: With right CSR_VERSION (Patrik).
Cc: Christophe Prigent <christophe.prigent@intel.com >
Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com >
Reviewed-by: Ben Widawsky <benjamin.widawsky@intel.com > (v1)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Reviewed-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1461707991-15336-1-git-send-email-rodrigo.vivi@intel.com
(cherry picked from commit 4922d49195
)
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2016-07-18 18:46:19 +02:00
Chris Wilson
91c8a326a1
drm/i915: Convert dev_priv->dev backpointers to dev_priv->drm
...
Since drm_i915_private is now a subclass of drm_device we do not need to
chase the drm_i915_private->dev backpointer and can instead simply
access drm_i915_private->drm directly.
text data bss dec hex filename
1068757
4565 416 1073738 10624a drivers/gpu/drm/i915/i915.ko
1066949 4565 416 1071930 105b3a drivers/gpu/drm/i915/i915.ko
Created by the coccinelle script:
@@
struct drm_i915_private *d;
identifier i;
@@
(
- d->dev->i
+ d->drm.i
|
- d->dev
+ &d->drm
)
and for good measure the dev_priv->dev backpointer was removed entirely.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Matthew Auld <matthew.auld@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1467711623-2905-4-git-send-email-chris@chris-wilson.co.uk
2016-07-05 11:58:45 +01:00
Patrik Jakobsson
4aa7fb9c3c
drm/i915/dmc: Step away from symbolic links
...
Load specific firmware versions for the DMC instead of using symbolic
links. The currently recommended versions are: SKL 1.26, KBL 1.01 and
BXT 1.07.
Certain DMC versions need workarounds in the driver which forces us to
have a tight dependency between firmware and driver. In order to be able
to provide a tested and known working configuration we must lock down on
a specific DMC firmware version.
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com >
Cc: Imre Deak <imre.deak@intel.com >
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com >
Signed-off-by: Patrik Jakobsson <patrik.jakobsson@linux.intel.com >
Acked-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com >
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1463391057-32350-1-git-send-email-patrik.jakobsson@linux.intel.com
2016-06-27 14:26:16 -07:00
Rodrigo Vivi
4922d49195
drm/i915/kbl: Introduce the first official DMC for Kabylake.
...
Version 1.01.
This firmware is made for Kabylake platform so it doesn't
need the stepping workaround that we had before.
v2: Rebased on top of latest nightly with min version
required change.
v3: With right CSR_VERSION (Patrik).
Cc: Christophe Prigent <christophe.prigent@intel.com >
Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com >
Reviewed-by: Ben Widawsky <benjamin.widawsky@intel.com > (v1)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Reviewed-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1461707991-15336-1-git-send-email-rodrigo.vivi@intel.com
2016-05-05 16:49:01 -07:00
Imre Deak
f74ed08d55
drm/i915/gen9: Fix runtime PM refcounting in case DMC firmware isn't loaded
...
While we disable runtime PM and with that display power well support if
the DMC firmware isn't loaded, we still want to disable power wells
during system suspend and driver unload. So drop/reacquire the
corresponding power refcount during suspend/resume and driver unloading.
This also means we have to check if DMC is not loaded and skip enabling
DC states in the power well code.
v2:
- Reuse intel_csr_ucode_suspend() in intel_csr_ucode_fini() instead of
opencoding the former. (Chris)
- Add docbook comment to the public resume and suspend functions.
CC: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Imre Deak <imre.deak@intel.com >
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Link: http://patchwork.freedesktop.org/patch/msgid/1460980101-14713-1-git-send-email-imre.deak@intel.com
2016-04-19 12:33:48 +03:00
Imre Deak
e7968531f8
drm/i915/bxt: Reject DMC firmware versions with known bugs
...
DMC version 1.06 has a known bug, where the firmware polls forever for a
port PLL to lock, if the PLL was disabled when entering DC5, which locks
up the machine. Version 1.07 fixes this, so make that the minimum
required version on BXT.
CC: Mika Kuoppala <mika.kuoppala@linux.intel.com >
Signed-off-by: Imre Deak <imre.deak@intel.com >
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1459515767-29228-2-git-send-email-imre.deak@intel.com
2016-04-15 14:12:35 +03:00
Chris Wilson
1bb4308e71
drm/i915/csr: Allow matching unknown HW steppings with generic firmware
...
If the firmware is generic and has a run-anywhere mode, enable it rather
than completely failing on unknown HW revisions.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Damien Lespiau <damien.lespiau@intel.com >
Cc: Imre Deak <imre.deak@intel.com >
Cc: Sunil Kamath <sunil.kamath@intel.com >
Cc: Daniel Vetter <daniel.vetter@intel.com >
Cc: Animesh Manna <animesh.manna@intel.com >
Cc: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Imre Deak <imre.deak@intel.com >
Signed-off-by: Imre Deak <imre.deak@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1457352357-8433-1-git-send-email-chris@chris-wilson.co.uk
2016-03-16 17:53:00 +02:00
Imre Deak
2abc525bf5
drm/i915/gen9: Fix DMC firmware initialization
...
In commit 1e657ad7
we moved the last step of firmware initialization to
skl_display_core_init(), where it will be run only during system resume,
but not during driver loading. Since this init step needs to be done
whenever we program the firmware fix this by moving the initialization
to the end of intel_csr_load_program().
While at it simplify a bit csr_load_work_fn().
This issue prevented DC5/6 transitions, this change will re-enable those.
v2:
- remove debugging left-over and redundant comment in csr_load_work_fn()
Fixes: 1e657ad7a4
("drm/i915/gen9: Write dc state debugmask bits only once")
CC: Mika Kuoppala <mika.kuoppala@intel.com >
CC: Patrik Jakobsson <patrik.jakobsson@linux.intel.com >
Signed-off-by: Imre Deak <imre.deak@intel.com >
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1457121461-16729-1-git-send-email-imre.deak@intel.com
2016-03-07 15:15:29 +02:00
Mika Kuoppala
1e657ad7a4
drm/i915/gen9: Write dc state debugmask bits only once
...
DMC debugmask bits should stick so no need to write them
everytime dc state is changed.
v2: Write after firmware has been successfully loaded (Ville)
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com >
Reviewed-by: Imre Deak <imre.deak@intel.com >
Signed-off-by: Imre Deak <imre.deak@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1455808874-22089-5-git-send-email-mika.kuoppala@intel.com
2016-02-22 17:21:04 +02:00
Patrik Jakobsson
832dba889e
drm/i915/gen9: Check for DC state mismatch
...
The DMC can incorrectly run off and allow DC states on it's own. We
don't know the root-cause for this yet but this patch makes it more
visible.
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com >
Signed-off-by: Patrik Jakobsson <patrik.jakobsson@linux.intel.com >
Signed-off-by: Imre Deak <imre.deak@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1455808874-22089-2-git-send-email-mika.kuoppala@intel.com
2016-02-22 17:18:21 +02:00
Mat Martineau
a41c888259
drm/i915/skl: Fix DMC load on Skylake J0 and K0
...
The driver does not load firmware for unknown steppings, so these new
steppings must be added to the list.
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1454023163-25469-1-git-send-email-mathew.j.martineau@linux.intel.com
2016-02-01 08:58:22 -08:00
Chris Wilson
cbfc2d26ac
drm/i915: Demote user facing DMC firmware load failure message
...
This is an expected error given the lack of the firmware so emit it at
KERN_NOTICE and not KERN_ERROR. Also include the firmware URL in the
user facing message so that the user can investigate and fix the issue
on their own, and also explain the consequence in plain language.
The complete failure message, including the first line from the firmware
loader, becomes
i915 0000:00:02.0: Direct firmware load for i915/skl_dmc_ver1.bin failed with error -2
i915 0000:00:02.0: Failed to load DMC firmware [https://01.org/linuxgraphics/intel-linux-graphics-firmwares ], disabling runtime power management.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Damien Lespiau <damien.lespiau@intel.com >
Cc: Imre Deak <imre.deak@intel.com >
Cc: Sunil Kamath <sunil.kamath@intel.com >
Cc: Daniel Vetter <daniel.vetter@intel.com >
Cc: Animesh Manna <animesh.manna@intel.com >
Cc: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1452706695-13518-1-git-send-email-chris@chris-wilson.co.uk
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2016-01-19 11:11:58 +01:00
Rodrigo Vivi
8d7a1c4a57
drm/i915/kbl: Adding missing IS_KABYLAKE checks.
...
When adding IS_KABYLAKE definition I didn't included the
DC states related because I was planing to include them
with the patch that fixes DMC firmware loading, but I
forgot them.
Meanwhile this runtime pm code changed a lot for
Skylake.
Well, I didn't expect that this would crash the machine
and I just noticed now that Sarah warned me our driver
wasn't working. Thanks Sarah.
Michel had found the main error first and his
fix had better details on the history and got
merged already:
commit 16fbc291cb
Author: Michel Thierry <michel.thierry@intel.com >
Date: Wed Jan 6 12:08:36 2016 +0000
drm/i915/kbl: Enable PW1 and Misc I/O power wells
This one is a follow-up adding the other remaining
missing pieces.
v2: Rebased on top of Michel's patch as explained above.
Cc: Sarah Sharp <sarah.a.sharp@intel.com >
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Reviewed-by: Michel Thierry <michel.thierry@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1452214179-22361-1-git-send-email-rodrigo.vivi@intel.com
2016-01-08 10:12:43 -08:00
Rodrigo Vivi
a25c9f00ce
drm/i915/kbl: Fix DMC load on Kabylake.
...
Kabylake A0 is based on Skylake H0.
v2: Don't assume revid+7 and only load the one we are sure about.
v3: Rebase on top of latest changes.
v4: Accept cleaner solution from Jani with kbl_stepping_info
starting on H0 instead of put a hack on revid.
Cc: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1449676319-6959-1-git-send-email-rodrigo.vivi@intel.com
2015-12-09 07:52:39 -08:00
Ville Syrjälä
f0f59a00a1
drm/i915: Type safe register read/write
...
Make I915_READ and I915_WRITE more type safe by wrapping the register
offset in a struct. This should eliminate most of the fumbles we've had
with misplaced parens.
This only takes care of normal mmio registers. We could extend the idea
to other register types and define each with its own struct. That way
you wouldn't be able to accidentally pass the wrong thing to a specific
register access function.
The gpio_reg setup is probably the ugliest thing left. But I figure I'd
just leave it for now, and wait for some divine inspiration to strike
before making it nice.
As for the generated code, it's actually a bit better sometimes. Eg.
looking at i915_irq_handler(), we can see the following change:
lea 0x70024(%rdx,%rax,1),%r9d
mov $0x1,%edx
- movslq %r9d,%r9
- mov %r9,%rsi
- mov %r9,-0x58(%rbp)
- callq *0xd8(%rbx)
+ mov %r9d,%esi
+ mov %r9d,-0x48(%rbp)
callq *0xd8(%rbx)
So previously gcc thought the register offset might be signed and
decided to sign extend it, just in case. The rest appears to be
mostly just minor shuffling of instructions.
v2: i915_mmio_reg_{offset,equal,valid}() helpers added
s/_REG/_MMIO/ in the register defines
mo more switch statements left to worry about
ring_emit stuff got sorted in a prep patch
cmd parser, lrc context and w/a batch buildup also in prep patch
vgpu stuff cleaned up and moved to a prep patch
all other unrelated changes split out
v3: Rebased due to BXT DSI/BLC, MOCS, etc.
v4: Rebased due to churn, s/i915_mmio_reg_t/i915_reg_t/
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Link: http://patchwork.freedesktop.org/patch/msgid/1447853606-2751-1-git-send-email-ville.syrjala@linux.intel.com
2015-11-18 15:39:11 +02:00
Patrik Jakobsson
fc131bf209
drm/i915: Don't trust CSR program memory contents
...
Replaces "drm/i915: Force loading of csr program at boot" in the old
series.
Previously we called blindly into intel_csr_load_program() and depended
on a check of whether the CSR program memory was cleared or not.
This check is not reliable and no longer needed since we fixed the
call-sites of intel_csr_load_program().
Signed-off-by: Patrik Jakobsson <patrik.jakobsson@linux.intel.com >
Reviewed-by: Imre Deak <imre.deak@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1447084107-8521-2-git-send-email-patrik.jakobsson@linux.intel.com
2015-11-17 20:55:17 +02:00
Animesh Manna
15e72c1fc1
drm/i915/gen9: Use flush_work to synchronize with dmc loader
...
During driver unload to ensure we dont have any pending task,
flush_work added to complete firmware loading task.
v1: Initial version.
v2: As per review comments from Daniel,
Removed flush_work from skl_set_power_well. As we have taken
power well refernece and rpm count during firmware loading
by using display_power_domain_get/put - this will always
ensure rpm will be blocked if firmware is not loaded.
Cc: Daniel Vetter <daniel.vetter@intel.com >
Cc: Damien Lespiau <damien.lespiau@intel.com >
Cc: Imre Deak <imre.deak@intel.com >
Cc: Sunil Kamath <sunil.kamath@intel.com >
Signed-off-by: Animesh Manna <animesh.manna@intel.com >
Signed-off-by: Imre Deak <imre.deak@intel.com >
Tested-by: Daniel Stone <daniels@collabora.com > # SKL
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1446069547-24760-12-git-send-email-imre.deak@intel.com
2015-11-12 17:30:25 +02:00
Daniel Vetter
8144ac59bd
drm/i915: Use request_firmware and our own async work
...
Two benefits:
- We can use FW_LOADER_USERSPACE_FALLBACK.
- We can use flush_work to synchronize with the oustanding worker,
which is a notch more obvious what it does than having a special
completion.
The next patch will properly synchronize against the async loader in
the resume and unload code.
Cc: Damien Lespiau <damien.lespiau@intel.com >
Cc: Imre Deak <imre.deak@intel.com >
Cc: Sunil Kamath <sunil.kamath@intel.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Signed-off-by: Animesh Manna <animesh.manna@intel.com >
Signed-off-by: Imre Deak <imre.deak@intel.com >
Tested-by: Daniel Stone <daniels@collabora.com > # SKL
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1446069547-24760-11-git-send-email-imre.deak@intel.com
2015-11-12 17:29:26 +02:00
Daniel Vetter
6a6582bfff
drm/i915/gen9: extract parse_csr_fw
...
The loader function will get a bit more complicated soon, extract the
parsing code to make the control flow clearer. While doing that just
use dev_priv->csr.dmc_payload as the indicator for whether it all
suceeded or not.
v2-v3:
- unchanged
v4:
- rebased on top of latest drm-intel-nightly
Cc: Damien Lespiau <damien.lespiau@intel.com >
Cc: Imre Deak <imre.deak@intel.com >
Cc: Sunil Kamath <sunil.kamath@intel.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Signed-off-by: Animesh Manna <animesh.manna@intel.com >
[imre: remove note about BE cast from commit message, it's not relevant
any more]
Signed-off-by: Imre Deak <imre.deak@intel.com >
Tested-by: Daniel Stone <daniels@collabora.com > # SKL
[Jani: fix checkpatch warn on multiple blank lines]
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1447341089-2735-1-git-send-email-imre.deak@intel.com
2015-11-12 17:28:27 +02:00
Daniel Vetter
f444837546
drm/i915/gen9: Use dev_priv in csr functions
...
As all csr firmware related opertion are not using any
any data structures of drm framework level, so better to
use dev_priv instead of dev. it's a new style! :)
Cc: Damien Lespiau <damien.lespiau@intel.com >
Cc: Imre Deak <imre.deak@intel.com >
Cc: Sunil Kamath <sunil.kamath@intel.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Signed-off-by: Animesh Manna <animesh.manna@intel.com >
Signed-off-by: Imre Deak <imre.deak@intel.com >
Tested-by: Daniel Stone <daniels@collabora.com > # SKL
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1446069547-24760-9-git-send-email-imre.deak@intel.com
2015-11-12 17:22:52 +02:00
Daniel Vetter
bffbcd9343
drm/i915/gen9: Don't try to load garbage dmc firmware on resume
...
We need to make sure we don't put garbage into the hw if dmc firmware
loading failed mid-thru.
Cc: Damien Lespiau <damien.lespiau@intel.com >
Cc: Imre Deak <imre.deak@intel.com >
Cc: Sunil Kamath <sunil.kamath@intel.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Signed-off-by: Animesh Manna <animesh.manna@intel.com >
Signed-off-by: Imre Deak <imre.deak@intel.com >
Tested-by: Daniel Stone <daniels@collabora.com > # SKL
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1446069547-24760-8-git-send-email-imre.deak@intel.com
2015-11-12 17:22:03 +02:00
Daniel Vetter
c729ed88af
drm/i915/gen9: Simplify csr loading failure printing.
...
If we really want to we can be more verbose here, but we really don't
need an entire function for this.
Cc: Damien Lespiau <damien.lespiau@intel.com >
Cc: Imre Deak <imre.deak@intel.com >
Cc: Sunil Kamath <sunil.kamath@intel.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Signed-off-by: Animesh Manna <animesh.manna@intel.com >
Signed-off-by: Imre Deak <imre.deak@intel.com >
Tested-by: Daniel Stone <daniels@collabora.com > # SKL
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1446069547-24760-7-git-send-email-imre.deak@intel.com
2015-11-12 17:20:48 +02:00
Daniel Vetter
f98f70d90e
drm/i915/gen9: Align line continuations in intel_csr.c.
...
Standard is to align continuations of parameter lists and if
conditions to the opening ( in i915 and drm code.
Apply this across the entire file since it was sticking out a bit too
much.
Cc: Damien Lespiau <damien.lespiau@intel.com >
Cc: Imre Deak <imre.deak@intel.com >
Cc: Sunil Kamath <sunil.kamath@intel.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Signed-off-by: Animesh Manna <animesh.manna@intel.com >
[imre: removed note about reg definitions from the commit message, it's
not relevant any more]
Signed-off-by: Imre Deak <imre.deak@intel.com >
Tested-by: Daniel Stone <daniels@collabora.com > # SKL
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1446069547-24760-6-git-send-email-imre.deak@intel.com
2015-11-12 17:19:54 +02:00
Daniel Vetter
414b7999b8
drm/i915/gen9: Remove csr.state, csr_lock and related code.
...
This removes two anti-patterns:
- Locking shouldn't be used to synchronize with async work (of any
form, whether callbacks, workers or other threads). This is what the
mutex_lock/unlock seems to have been for in intel_csr_load_program.
Instead ordering should be ensured with the generic
wait_for_completion()/complete(). Or more specific functions
provided by the core kernel like e.g.
flush_work()/cancel_work_sync() in the case of synchronizing with a
work item.
- Don't invent own completion like the following code did with the
(already removed) wait_for(csr_load_status_get()) pattern - it's
really hard to get these right when you want them to be _really_
correct (and be fast) in all cases. Furthermore it's easier to read
code using the well-known primitives than new ones using
non-standard names.
Before enabling/disabling DC6 check if the firmware is loaded
successfully. This is guaranteed during runtime s/r, since otherwise we
don't enable RPM, but not during system s/r.
Note that it's still unclear whether we need to enable/disable DC6
during system s/r, until that's clarified, keep the current behavior and
enable/disable DC6.
Also after this patch there is a race during system s/r where the
firmware may not be loaded yet, that's addressed in an upcoming patch.
v2-v3:
- unchanged
v4:
- rebased on latest drm-intel-nightly
Cc: Damien Lespiau <damien.lespiau@intel.com >
Cc: Imre Deak <imre.deak@intel.com >
Cc: Sunil Kamath <sunil.kamath@intel.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Signed-off-by: Animesh Manna <animesh.manna@intel.com >
[imre: added code and note about checking if the firmware loaded ok,
before enabling/disabling it]
Reviewed-by: Animesh Manna <animesh.manna@intel.com >
Signed-off-by: Imre Deak <imre.deak@intel.com >
Tested-by: Daniel Stone <daniels@collabora.com > # SKL
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1447341037-2623-1-git-send-email-imre.deak@intel.com
2015-11-12 17:16:51 +02:00
Daniel Vetter
af5fead2d9
drm/i915/gen9: move assert_csr_loaded into intel_rpm.c
...
Avoids non-static functions since all the callers are in intel_rpm.c.
Cc: Damien Lespiau <damien.lespiau@intel.com >
Cc: Imre Deak <imre.deak@intel.com >
Cc: Sunil Kamath <sunil.kamath@intel.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Signed-off-by: Animesh Manna <animesh.manna@intel.com >
[imre: removed note about reg definitions from commit message, since
it's not relevant any more]
Signed-off-by: Imre Deak <imre.deak@intel.com >
Tested-by: Daniel Stone <daniels@collabora.com > # SKL
[Jani: make assert_csr_loaded static]
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1446069547-24760-4-git-send-email-imre.deak@intel.com
2015-11-12 16:45:32 +02:00
Daniel Vetter
01a6908c0c
drm/i915: use correct power domain for csr loading
...
Grabbing a runtime pm reference with intel_runtime_pm_get will only
prevent device D3. But dmc firmware is required even earlier (namely
for the skl power well 2).
Hence we need to grab a rpm reference higher up in the hierarchy. For
simplicity just grab the _INIT display power well. That's a bit too
much, but since the firmware loading task should completely fairly
quickly this won't be a real problem really.
Cc: Damien Lespiau <damien.lespiau@intel.com >
Cc: Imre Deak <imre.deak@intel.com >
Cc: Sunil Kamath <sunil.kamath@intel.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Signed-off-by: Animesh Manna <animesh.manna@intel.com >
Signed-off-by: Imre Deak <imre.deak@intel.com >
Tested-by: Daniel Stone <daniels@collabora.com > # SKL
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1446069547-24760-3-git-send-email-imre.deak@intel.com
2015-11-12 16:42:23 +02:00