[openchrome-devel] drm-openchrome: Changes to 'drm-next-4.21'
Kevin Brace
kevinbrace at kemper.freedesktop.org
Mon Nov 5 19:27:50 UTC 2018
New branch 'drm-next-4.21' available with the following commits:
commit 50e90fcaf899be1f824df91715f1258fdcc9a52f
Merge: fc6b318ed29d f2bfc71aee75
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Thu Oct 25 04:48:32 2018 -0700
Merge git://anongit.freedesktop.org/drm/drm into drm-next-4.21
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
commit f2bfc71aee75feff33ca659322b72ffeed5a243d
Merge: c13bbf4a78aa 835fe6d75d14
Author: Dave Airlie <airlied at redhat.com>
Date: Fri Oct 19 14:28:10 2018 +1000
Merge tag 'drm-intel-next-fixes-2018-10-18' of git://anongit.freedesktop.org/drm/drm-intel into drm-next
- Fix GPU hang on MacBook2,1 when booting in EFI mode (Bugzilla #105637)
- Fix garbled console on Y tiled BIOS framebuffer configs (Bugzilla #108264)
- Fix black screen on certain eDP panels eg. Dell XPS 9350 (Bugzilla #107489 and #105338)
- MST fixes that Rodrigo dropped from drm-intel-fixes and bunch of Icelake fixes
- Then assorted proactive code fixes caught by CI or developers
Signed-off-by: Dave Airlie <airlied at redhat.com>
From: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181018165725.GA2281@jlahtine-desk.ger.corp.intel.com
commit 835fe6d75d14c1513910ed7f5665127fee12acc8
Author: Anusha Srivatsa <anusha.srivatsa at intel.com>
Date: Thu Oct 4 15:36:13 2018 -0700
firmware/dmc/icl: Add missing MODULE_FIRMWARE() for Icelake.
Add missing MODULE_FIRMWARE while loading DMC ICL.
v2: Add Fixes tag. (Rodrigo)
v3: Rebase by Rodrigo after commit 7fe78985cd08 ("drm/i915/csr:
restructure CSR firmware definition macros")
v4: Rodrigo fixing his own mess on commit mentioning on v3
comment above.
Fixes: 4445930f1c4a ("firmware/dmc/icl: load v1.07 on icelake.")
Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
Cc: Paulo Zanoni <paulo.r.zanoni at intel.com>
Cc: Jani Nikula <jani.nikula at intel.com>
Signed-off-by: Anusha Srivatsa <anusha.srivatsa at intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com> (v2)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
Tested-by: Paulo Zanoni <paulo.r.zanoni at intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181004223613.19938-1-rodrigo.vivi@intel.com
(cherry picked from commit 00e5d8b1eb47378924f3de3435450650f426b02a)
Signed-off-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
commit b4ec5f39e4a0bc9844634faa88dd08ca94dca39d
Author: Rodrigo Vivi <rodrigo.vivi at intel.com>
Date: Wed Oct 17 14:56:52 2018 -0700
drm/i915/icl: Fix signal_levels
Since when it was introduced we forgot to add
this case so ICL was using a wrong signal_levels
as reference.
Fixes: fb5c8e9d4350 ("drm/i915/icl: Implement voltage swing programming sequence for Combo PHY DDI")
Cc: José Roberto de Souza <jose.souza at intel.com>
Cc: Manasi Navare <manasi.d.navare at intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
Reviewed-by: Manasi Navare <manasi.d.navare at intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181017215652.26841-1-rodrigo.vivi@intel.com
(cherry picked from commit 61cdfb9e194d2a327eef301e8fc80b63e3e1dc7a)
Signed-off-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
commit 83db37385306072eca403ed80c0a8cf7b0d39e05
Author: Mahesh Kumar <mahesh1.kumar at intel.com>
Date: Mon Oct 15 19:37:52 2018 -0700
drm/i915/icl: Fix DDI/TC port clk_off bits
DDI/TC clock-off bits are not equally distanced. TC1-3 bits are
from offset 12 & TC4 is at offset 21.
Create a function to choose correct clk-off bit.
v2: Add fixes tag (Lucas)
Fixes: c27e917e2bda ("drm/i915/icl: add basic support for the ICL clocks")
Signed-off-by: Mahesh Kumar <mahesh1.kumar at intel.com>
Signed-off-by: Vandita Kulkarni <vandita.kulkarni at intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi at intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181016023752.9285-1-lucas.demarchi@intel.com
(cherry picked from commit bb1c7edc6d4d5cc6917814d858d47b22d2e93cde)
Signed-off-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
commit a9b84b4492774668237b19aa65536e934df51567
Author: Mahesh Kumar <mahesh1.kumar at intel.com>
Date: Thu Oct 4 14:20:43 2018 +0530
drm/i915/icl: create function to identify combophy port
This patch creates a function/wrapper to check if port is combophy port
instead of explicitly comparing ports.
Changes since V1:
- keep all intel_port_is_* helper together (Lucas)
Signed-off-by: Mahesh Kumar <mahesh1.kumar at intel.com>
Cc: Madhav Chauhan <madhav.chauhan at intel.com>
Cc: Manasi Navare <manasi.d.navare at intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi at intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181004085043.10154-1-mahesh1.kumar@intel.com
(cherry picked from commit 176597a12d61709727d1639836e5d68a6e7c437b)
Signed-off-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
commit c13bbf4a78aafed144de0250a3c71265672c9bda
Merge: 28b32b9f61fe 8e16695b4eb8
Author: Dave Airlie <airlied at redhat.com>
Date: Thu Oct 18 12:05:08 2018 +1000
Merge branch 'drm-next-4.20' of git://people.freedesktop.org/~agd5f/linux into drm-next
Fixes for 4.20. Highlights:
- VCN DPG fixes for Picasso
- Add support for the latest vega20 vbios
- Scheduler timeout fix
- License fixes for radeon and amdgpu
- Misc other fixes
Signed-off-by: Dave Airlie <airlied at redhat.com>
From: Alex Deucher <alexdeucher at gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181017215427.2804-1-alexander.deucher@amd.com
commit 28b32b9f61fe73e7625ed30c35afd6d8a0ed2b6e
Merge: ca4b869240d5 0e8afefd5da4
Author: Dave Airlie <airlied at redhat.com>
Date: Thu Oct 18 12:04:41 2018 +1000
Merge tag 'drm-misc-next-fixes-2018-10-17' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
- Add quirk to fix orientation of Acer One 10 (S1003) panel (Hans)
Cc: Hans de Goede <hdegoede at redhat.com>
Signed-off-by: Dave Airlie <airlied at redhat.com>
From: Sean Paul <sean at poorly.run>
Link: https://patchwork.freedesktop.org/patch/msgid/20181017200741.GA240649@art_vandelay
commit d9a515867bdba59ebf196a6ade10faae8e8be36a
Author: Imre Deak <imre.deak at intel.com>
Date: Tue Oct 16 19:00:11 2018 +0300
drm/i915/gen9+: Fix initial readout for Y tiled framebuffers
If BIOS configured a Y tiled FB we failed to set up the backing object
tiling accordingly, leading to a lack of GT fence installed and a
garbled console.
The problem was bisected to
commit 011f22eb545a ("drm/i915: Do NOT skip the first 4k of stolen memory for pre-allocated buffers v2")
but it just revealed a pre-existing issue.
Kudos to Ville who suspected a missing fence looking at the corruption
on the screen.
Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
Cc: Mika Westerberg <mika.westerberg at linux.intel.com>
Cc: Hans de Goede <hdegoede at redhat.com>
Cc: <ronald at innovation.ch>
Cc: <stable at vger.kernel.org>
Reported-by: Mika Westerberg <mika.westerberg at linux.intel.com>
Reported-by: <ronald at innovation.ch>
Tested-by: <ronald at innovation.ch>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108264
Fixes: bc8d7dffacb1 ("drm/i915/skl: Provide a Skylake version of get_plane_config()")
Signed-off-by: Imre Deak <imre.deak at intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181016160011.28347-1-imre.deak@intel.com
(cherry picked from commit 914a4fd8cd28016038ce749a818a836124a8d270)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
commit ab0d6a141843e0b4b2709dfd37b53468b5452c3a
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Fri Oct 12 15:02:28 2018 +0100
drm/i915: Large page offsets for pread/pwrite
Handle integer overflow when computing the sub-page length for shmem
backed pread/pwrite.
Reported-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Cc: stable at vger.kernel.org
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181012140228.29783-1-chris@chris-wilson.co.uk
(cherry picked from commit a5e856a5348f6cd50889d125c40bbeec7328e466)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
commit e3118a038dfd1d6d902ea966e0ce3ce4e91e503b
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Thu Oct 11 11:37:48 2018 +0100
drm/i915/selftests: Disable shrinker across mmap-exhaustion
For mmap-exhaustion, we deliberately put the system under a large amount
of pressure to ensure that we are able to reap mmap-offsets from dead
objects. If background activity does that reaping for us, that defeats
the purpose of the test and in some cases will fail our sanity checks
(because of the fake activity we use to prevent the idle worker).
Fixes: 932cac10c8fb ("drm/i915/selftests: Prevent background reaping of acti
ve objects")
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala at linux.intel.com>
Cc: Matthew Auld <matthew.auld at intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala at linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181011103748.18387-1-chris@chris-wilson.co.uk
(cherry picked from commit 0b4bf7ca9be824dde6ff63dd2ceba2d1367f8a58)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
commit 041444458835d7fb2c9f042598bfe16bf375b15d
Author: Manasi Navare <manasi.d.navare at intel.com>
Date: Tue Oct 9 14:28:04 2018 -0700
drm/i915/dp: Link train Fallback on eDP only if fallback link BW can fit panel's native mode
This patch fixes the original commit c0cfb10d9e1de49 ("drm/i915/edp:
Do not do link training fallback or prune modes on EDP") that causes
a blank screen in case of certain eDP panels (Eg: seen on Dell XPS13 9350)
where first link training fails and a retraining is required by falling
back to lower link rate/lane count.
In case of some panels they advertise higher link rate/lane count
than whats required for supporting the panel's native mode.
But we always link train at highest link rate/lane count for eDP
and if that fails we can still fallback to lower link rate/lane count
as long as the fallback link BW still fits the native mode to avoid
pruning the panel's native mode yet retraining at fallback values
to recover from a blank screen.
v3:
* Add const for fixed_mode (Ville)
v2:
* Send uevent if link failure on eDP unconditionally
Fixes: c0cfb10d9e1d ("drm/i915/edp: Do not do link training fallback or prune modes on EDP")
Cc: Clinton Taylor <clinton.a.taylor at intel.com>
Cc: Jani Nikula <jani.nikula at linux.intel.com>
Cc: Ville Syrjala <ville.syrjala at linux.intel.com>
Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
Cc: Lucas De Marchi <lucas.demarchi at intel.com>
Cc: <stable at vger.kernel.org> # v4.17+
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107489
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105338
Signed-off-by: Manasi Navare <manasi.d.navare at intel.com>
Tested-by: Alexander Wilson <alexander.wilson at ncf.edu>
Reviewed-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181009212804.702-1-manasi.d.navare@intel.com
(cherry picked from commit 1e712535c51ab025ebc776d4405683d81521996d)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
commit 4bbf0d4749e707b6b262d576a9a9ef5c63b52dd4
Author: Lyude Paul <lyude at redhat.com>
Date: Mon Oct 8 19:24:34 2018 -0400
drm/i915: Fix intel_dp_mst_best_encoder()
Currently, i915 appears to rely on blocking modesets on
no-longer-present MSTB ports by simply returning NULL for
->best_encoder(), which in turn causes any new atomic commits that don't
disable the CRTC to fail. This is wrong however, since we still want to
allow userspace to disable CRTCs on no-longer-present MSTB ports by
changing the DPMS state to off and this still requires that we retrieve
an encoder.
So, fix this by always returning a valid encoder regardless of the state
of the MST port.
Changes since v1:
- Remove mst atomic helper, since this got replaced with a much simpler
solution
Signed-off-by: Lyude Paul <lyude at redhat.com>
Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
Cc: stable at vger.kernel.org
Link: https://patchwork.freedesktop.org/patch/msgid/20181008232437.5571-6-lyude@redhat.com
(cherry picked from commit a9f9ca33d1fe9325f414914be526c0fc4ba5281c)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
commit c02ba4ef16eefe663fdefcccaa57fad32d5481bf
Author: Lyude Paul <lyude at redhat.com>
Date: Mon Oct 8 19:24:33 2018 -0400
drm/i915: Skip vcpi allocation for MSTB ports that are gone
Since we need to be able to allow DPMS on->off prop changes after an MST
port has disappeared from the system, we need to be able to make sure we
can compute a config for the resulting atomic commit. Currently this is
impossible when the port has disappeared, since the VCPI slot searching
we try to do in intel_dp_mst_compute_config() will fail with -EINVAL.
Since the only commits we want to allow on no-longer-present MST ports
are ones that shut off display hardware, we already know that no VCPI
allocations are needed. So, hardcode the VCPI slot count to 0 when
intel_dp_mst_compute_config() is called on an MST port that's gone.
Changes since V4:
- Don't use mst_port_gone at all, just check whether or not the drm
connector is registered - Daniel Vetter
Signed-off-by: Lyude Paul <lyude at redhat.com>
Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
Cc: stable at vger.kernel.org
Link: https://patchwork.freedesktop.org/patch/msgid/20181008232437.5571-5-lyude@redhat.com
(cherry picked from commit f67207d78ceaf98b7531bc22df6f21328559c8d4)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
commit 80c188695a77eddaa6e8885510ff4ef59fd478c3
Author: Lyude Paul <lyude at redhat.com>
Date: Mon Oct 8 19:24:32 2018 -0400
drm/i915: Don't unset intel_connector->mst_port
Currently we set intel_connector->mst_port to NULL to signify that the
MST port has been removed from the system so that we can prevent further
action on the port such as connector probes, mode probing, etc.
However, we're going to need access to intel_connector->mst_port in
order to fixup ->best_encoder() so that it can always return the correct
encoder for an MST port to prevent legacy DPMS prop changes from
failing. This should be safe, so instead keep intel_connector->mst_port
always set and instead just check the status of
drm_connector->regustered to signify whether or not the connector has
disappeared from the system.
Changes since v2:
- Add a comment to mst_port_gone (Jani Nikula)
- Change mst_port_gone to a u8 instead of a bool, per the kernel bot.
Apparently bool is discouraged in structs these days
Changes since v4:
- Don't use mst_port_gone at all! Just check if the connector is
registered or not - Daniel Vetter
Signed-off-by: Lyude Paul <lyude at redhat.com>
Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
Cc: stable at vger.kernel.org
Link: https://patchwork.freedesktop.org/patch/msgid/20181008232437.5571-4-lyude@redhat.com
(cherry picked from commit 6ed5bb1fbad34382c8cfe9a9bf737e9a43053df5)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
commit 708ea872601e56ef9ea8398c5a11938482bcbb4d
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Thu Oct 4 09:21:19 2018 +0100
drm/i915: Only reset seqno if actually idle
Before we can reset the seqno, we have to be sure the engines are idle.
In debugfs/i915_drop_caches_set, we do wait_for_idle but allow ourselves
to be interrupted. We should only proceed to reset the seqno then if we
were not interrupted, and so also avoid overwriting the error status.
References: https://bugs.freedesktop.org/show_bug.cgi?id=108133
Fixes: 6b048706f407 ("drm/i915: Forcibly flush unwanted requests in drop-caches")
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181004082119.24970-1-chris@chris-wilson.co.uk
(cherry picked from commit 88a83f3c2d7a87ce7c9c4171dec8e2fb48070288)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
commit 9b27390139dbe0dc10d1899545248862fe826b61
Author: Ville Syrjälä <ville.syrjala at linux.intel.com>
Date: Wed Oct 3 17:50:17 2018 +0300
drm/i915: Use the correct crtc when sanitizing plane mapping
When we decide that a plane is attached to the wrong pipe we try
to turn off said plane. However we are passing around the crtc we
think that the plane is supposed to be using rather than the crtc
it is currently using. That doesn't work all that well because
we may have to do vblank waits etc. and the other pipe might
not even be enabled here. So let's pass the plane's current crtc to
intel_plane_disable_noatomic() so that it can its job correctly.
To do that semi-cleanly we also have to change the plane readout
to record the plane's visibility into the bitmasks of the crtc
where the plane is currently enabled rather than to the crtc
we want to use for the plane.
One caveat here is that our active_planes bitmask will get confused
if both planes are enabled on the same pipe. Fortunately we can use
plane_mask to reconstruct active_planes sufficiently since
plane_mask still has the same meaning (is the plane visible?)
during readout. We also have to do the same during the initial
plane readout as the second plane could clear the active_planes
bit the first plane had already set.
v2: Rely on fixup_active_planes() to populate active_planes fully (Daniel)
Add Daniel's proposed comment to better document why we do this
Drop the redundant intel_set_plane_visible() call
Cc: stable at vger.kernel.org # fcba862e8428 drm/i915: Have plane->get_hw_state() return the current pipe
Cc: stable at vger.kernel.org
Cc: Dennis <dennis.nezic at utoronto.ca>
Cc: Daniel Vetter <daniel at ffwll.ch>
Tested-by: Dennis <dennis.nezic at utoronto.ca>
Tested-by: Peter Nowee <peter.nowee at gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105637
Fixes: b1e01595a66d ("drm/i915: Redo plane sanitation during readout")
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181003145017.4527-1-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
(cherry picked from commit 62358aa4ee86481ce044bef04859820e1bc7c1d9)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
commit 7cada4d0b7a0fb813dbc9777fec092e9ed0546e9
Author: Ville Syrjälä <ville.syrjala at linux.intel.com>
Date: Wed Oct 3 17:49:51 2018 +0300
drm/i915: Restore vblank interrupts earlier
Plane sanitation needs vblank interrupts (on account of CxSR disable).
So let's restore vblank interrupts earlier.
v2: Make it actually build
v3: Add comment to explain why we need this (Daniel)
Cc: stable at vger.kernel.org
Cc: Dennis <dennis.nezic at utoronto.ca>
Tested-by: Dennis <dennis.nezic at utoronto.ca>
Tested-by: Peter Nowee <peter.nowee at gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105637
Fixes: b1e01595a66d ("drm/i915: Redo plane sanitation during readout")
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20181003144951.4397-1-ville.syrjala@linux.intel.com
(cherry picked from commit 68bc30deac625b8be8d3950b30dc93d09a3645f5)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
commit 3f6d5ba173da9a41c799146a3ad999da2158716a
Author: Ville Syrjälä <ville.syrjala at linux.intel.com>
Date: Tue Sep 18 17:02:43 2018 +0300
drm/i915: Check fb stride against plane max stride
commit 4e0b83a567e2 ("drm/i915: Extract per-platform plane->check()
functions") removed the plane max stride check for sprite planes.
I was going to add it back when introducing GTT remapping for the
display, but after further thought it seems better to re-introduce
it separately.
So let's add the max stride check back. And let's do it in a nicer
form than what we had before and do it for all plane types (easy
now that we have the ->max_stride() plane vfunc).
Only sprite planes really need this for now since primary planes
are capable of scanning out the current max fb size we allow, and
cursors have more stringent stride checks elsewhere.
Cc: José Roberto de Souza <jose.souza at intel.com>
Fixes: 4e0b83a567e2 ("drm/i915: Extract per-platform plane->check() functions")
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180918140243.12207-1-ville.syrjala@linux.intel.com
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan at intel.com>
(cherry picked from commit fc3fed5d297b51f9e2c7d4f969c95c0d6e50ca57)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
commit 8e16695b4eb819881774b8c06eb164dc1fb74275
Author: James Zhu <James.Zhu at amd.com>
Date: Tue Oct 16 10:06:00 2018 -0400
drm/amdgpu/vcn:Fix uninitialized symbol error
ret_code should be initialized with 0. The check of read/write
ptr should be activate when UVD_POWER_STATUS_TILES is off.
Signed-off-by: James Zhu <James.Zhu at amd.com>
Acked-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 0e8afefd5da4875ddea9aa4ad17a2540a2bf9736
Author: Hans de Goede <hdegoede at redhat.com>
Date: Fri Oct 12 12:16:10 2018 +0200
drm: panel-orientation-quirks: Add quirk for Acer One 10 (S1003)
The Acer One 10 uses a clamshell design with a detachable keyboard.
As such in normal operating mode, with the keyboard attach the device
is in landscape mode (and the Acer logo at boot also shows in landscape
mode).
But the device uses a portrait screen rotated 90 degrees (sigh). This
commit adds a quirk for this device so that we shown the fbcon the
right way up and that we hint userspace to also show e.g. plymouth and
gdm the right way up.
Cc: stable at vger.kernel.org
Acked-by: Daniel Vetter <daniel.vetter at ffwll.ch>
Signed-off-by: Hans de Goede <hdegoede at redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181012101610.29100-1-hdegoede@redhat.com
commit d344b21bf405eed05963627bfed6dd3df422623c
Author: Dan Carpenter <dan.carpenter at oracle.com>
Date: Thu Jun 14 17:45:23 2018 +0300
drm/amd/amdgpu: Fix debugfs error handling
The error handling is wrong and "ent" could be NULL we when dereference
it to get "ent->d_inode".
The thing is that normally debugfs_create_file() is not supposed to
require (or have) any error handling. That function does return error
pointers if debugfs is turned off but we know it's enable here. When
it's enabled, then it returns NULL on error.
So what I did was I stripped out all the error handling except around
the i_size_write(). I could have just used a NULL check instead of an
IS_ERR_OR_NULL() but I figured this was more clear because that way you
don't have to look at the surrounding code to see whether debugfs is
enabled or not.
Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
Reviewed-by: Christian König <christian.koenig at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit c55045adf7210d246a016c961916f078ed31a951
Author: Feifei Xu <Feifei.Xu at amd.com>
Date: Tue Oct 16 14:54:46 2018 +0800
drm/amdgpu: Update gc_9_0 golden settings.
Add mmDB_DEBUG3 settings.
Signed-off-by: Feifei Xu <Feifei.Xu at amd.com>
Reviewed-by: Evan Quan <evan.quan at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
Cc: stable at vger.kernel.org
commit e26f70a6539cc9d4b1d2589d1c50b2a2c8b22bea
Author: Evan Quan <evan.quan at amd.com>
Date: Mon Oct 8 12:41:19 2018 +0800
drm/amd/powerplay: update PPtable with DC BTC and Tvr SocLimit fields
Update the PPtable structure to fit the latest SMC firmware.
Signed-off-by: Evan Quan <evan.quan at amd.com>
Reviewed-by: Feifei Xu <Feifei.Xu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit d579fd827000dfe3c45635fded8bbbbdc78eb5ff
Author: Evan Quan <evan.quan at amd.com>
Date: Fri Sep 28 16:19:08 2018 +0800
drm/amd/powerplay: added I2C controller configuration
PPTABLE structure is stretched to add I2C controller
configuration. Hold on the PPTABLE_V20_SMU_VERSION bump
until the VBIOS is ready.
Signed-off-by: Evan Quan <evan.quan at amd.com>
Reviewed-by: Feifei Xu <Feifei.Xu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit dd46e5f0f732cac6746609f54a5f013118e27116
Author: Evan Quan <evan.quan at amd.com>
Date: Fri Oct 12 09:37:29 2018 +0800
drm/amdgpu: update Vega20 SDMA golden setting
Update SDMA golden settings.
Signed-off-by: Evan Quan <evan.quan at amd.com>
Reviewed-by: Feifei Xu <Feifei.Xu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 3df27645395e8f79c0dc20a15cf1da61f376000d
Author: Rex Zhu <Rex.Zhu at amd.com>
Date: Fri Oct 12 22:26:11 2018 +0800
drm/amdgpu: Fix typo in amdgpu_vmid_mgr_init
fix a typo in for loop: i->j
Reviewed-by: Christian König <christian.koenig at amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
Cc: stable at vger.kernel.org
commit 43c3ff27a47d83d153c4adc088243ba594582bf5
Author: Su Sung Chung <Su.Chung at amd.com>
Date: Thu Sep 20 15:03:27 2018 -0400
drm/amd/display: fix bug of accessing invalid memory
[Why]
A loop inside of build_evenly_distributed_points function that traverse through
the array of points become an infinite loop when m_GammaUpdates does not
get assigned to any value.
[How]
In DMColor, clear m_gammaIsValid bit just before writting all Zeromem for
m_GammaUpdates, to prevent calling build_evenly_distributed_points
before m_GammaUpdates gets assigned to some value.
Signed-off-by: Su Sung Chung <Su.Chung at amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr at amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 46924030475b6d44061a9a393f4e3b82b713f820
Author: Jonathan Gray <jsg at jsg.id.au>
Date: Mon Oct 15 15:47:01 2018 +1100
drm/radeon: change SPDX identifier to MIT
Commit b24413180f5600bcb3bb70fbed5cf186b60864bd added
"SPDX-License-Identifier: GPL-2.0" to files which previously had no
license, change this to MIT for radeon matching the license text of the
other radeon files.
Signed-off-by: Jonathan Gray <jsg at jsg.id.au>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 4c450f056cae111a48bb33c3ddb33296a206faad
Author: Jonathan Gray <jsg at jsg.id.au>
Date: Mon Oct 15 15:45:49 2018 +1100
drm/amdgpu: correct SPDX identifier in amdgpu_trace_points.c
Commit b24413180f5600bcb3bb70fbed5cf186b60864bd
'License cleanup: add SPDX GPL-2.0 license identifier to files with no license'
incorrectly added "SPDX-License-Identifier: GPL-2.0" to a file with MIT
license text. Change the SPDX identifier to match the license text.
Signed-off-by: Jonathan Gray <jsg at jsg.id.au>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 9fc9c9b83a463ebe5f7f2666632da364d974f5d1
Author: James Zhu <James.Zhu at amd.com>
Date: Tue Oct 9 17:06:56 2018 -0400
drm/amdgpu/vcn:Update SPG mode UVD status clear
Update Static Power Gate mode UVD status clear
Signed-off-by: James Zhu <James.Zhu at amd.com>
Acked-by: Leo Liu <leo.liu at amd.com>
Acked-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 10b66b2c65a271998042259b7fffafdd76809ad1
Author: James Zhu <James.Zhu at amd.com>
Date: Tue Oct 9 16:59:57 2018 -0400
drm/amdgpu/vcn:Set VCPU busy after gate power during vcn SPG start
Set VCPU busy after gate power during vcn Static Power Gate start
Signed-off-by: James Zhu <James.Zhu at amd.com>
Acked-by: Leo Liu <leo.liu at amd.com>
Acked-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 3d904ee4c30e5a91bdad363624f46bf484fd604a
Author: James Zhu <James.Zhu at amd.com>
Date: Tue Oct 9 16:57:26 2018 -0400
drm/amdgpu/vcn:Apply new UMC enable for VNC DPG mode
Apply new UMC enable for VNC Dynamic Power Gate mode
Signed-off-by: James Zhu <James.Zhu at amd.com>
Acked-by: Leo Liu <leo.liu at amd.com>
Acked-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit ad7187bfe130ddd51128e1f7068fbc930c9eccf4
Author: James Zhu <James.Zhu at amd.com>
Date: Tue Oct 9 16:53:42 2018 -0400
drm/amdgpu/vcn:Remove SPG mode unused steps during vcn start
Remove Sitatic Power Gate mode unused steps during vcn start
Signed-off-by: James Zhu <James.Zhu at amd.com>
Acked-by: Leo Liu <leo.liu at amd.com>
Acked-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 3d022a01fe369329adc859ab6f8e015340040905
Author: James Zhu <James.Zhu at amd.com>
Date: Tue Oct 9 16:48:29 2018 -0400
drm/amdgpu/vcn:Add SPG mode Register XX check
Add Static Power Gate mode Register XX check
Signed-off-by: James Zhu <James.Zhu at amd.com>
Acked-by: Leo Liu <leo.liu at amd.com>
Acked-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit a1584957ffe17a43fb6b6a825187bc01b4fa22bd
Author: James Zhu <James.Zhu at amd.com>
Date: Tue Oct 9 16:46:53 2018 -0400
drm/amdgpu/vcn:Move SPG mode mc resume after MPC control
Move Static Power Gate mode mc resume after MPC control
Signed-off-by: James Zhu <James.Zhu at amd.com>
Acked-by: Leo Liu <leo.liu at amd.com>
Acked-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 92bbdaeb9109b2c31681d24d28d9030f2d862851
Author: James Zhu <James.Zhu at amd.com>
Date: Tue Oct 9 16:43:32 2018 -0400
drm/amdgpu/vcn:Update SPG mode VCN global tiling
Update Static Power Gate mode VCN global tiling
Signed-off-by: James Zhu <James.Zhu at amd.com>
Acked-by: Leo Liu <leo.liu at amd.com>
Acked-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 298dc39a3a203697d959dc086cf81f90959582da
Author: James Zhu <James.Zhu at amd.com>
Date: Tue Oct 9 16:40:56 2018 -0400
drm/amdgpu/vcn:Update SPG mode VCN memory control
Update Static Power Gate mode VCN memory control
Signed-off-by: James Zhu <James.Zhu at amd.com>
Acked-by: Leo Liu <leo.liu at amd.com>
Acked-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit f5c5451fefceb24f2969d9f3ad6ef4c591d0272e
Author: James Zhu <James.Zhu at amd.com>
Date: Tue Oct 9 13:05:15 2018 -0400
drm/amdgpu/vcn:Apply new UMC enable for VNC DPG mode start
Apply new UMC enable for VNC Dynamic Power Gate mode start
Signed-off-by: James Zhu <James.Zhu at amd.com>
Acked-by: Leo Liu <leo.liu at amd.com>
Acked-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit fe146873f545f28b6c53e1d2405fc6816d5301ea
Author: James Zhu <James.Zhu at amd.com>
Date: Thu Oct 4 16:09:33 2018 -0400
drm/amdgpu/vcn:Remove DPG mode unused steps during vcn start
Remove Dynamic Power Gate mode unused steps during VCN start
Signed-off-by: James Zhu <James.Zhu at amd.com>
Acked-by: Leo Liu <leo.liu at amd.com>
Acked-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 368d0dd81a506365f0c899cef731889ee712cae6
Author: James Zhu <James.Zhu at amd.com>
Date: Thu Oct 4 16:02:51 2018 -0400
drm/amdgpu/vcn:Add DPG mode Register XX check
Add Dynamic Power Gate mode Register XX check
Signed-off-by: James Zhu <James.Zhu at amd.com>
Acked-by: Leo Liu <leo.liu at amd.com>
Acked-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit abd2d47c5152878649c3c1077a9594e34793339b
Author: James Zhu <James.Zhu at amd.com>
Date: Thu Oct 4 15:42:51 2018 -0400
drm/amdgpu/vcn:Update DPG mode VCN global tiling registers
Update Dynamic Power Gate mode VCN global tiling registers
Signed-off-by: James Zhu <James.Zhu at amd.com>
Acked-by: Leo Liu <leo.liu at amd.com>
Acked-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 6747c2021ccda6df5e19bcb37c5584266b68fa75
Author: James Zhu <James.Zhu at amd.com>
Date: Thu Oct 4 15:10:52 2018 -0400
drm/amdgpu/vcn:Update DPG mode VCN memory control
Update Dynamic Power Gate mode VCN memory control
Signed-off-by: James Zhu <James.Zhu at amd.com>
Acked-by: Leo Liu <leo.liu at amd.com>
Acked-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit cce9d555858899eb4b919ec6a65d6e4d47e8ba4e
Author: James Zhu <James.Zhu at amd.com>
Date: Thu Oct 4 09:29:22 2018 -0400
drm/amdgpu/vcn:Reduce unnecessary local variable
Reduce unnecessary local variable.
Signed-off-by: James Zhu <James.Zhu at amd.com>
Acked-by: Leo Liu <leo.liu at amd.com>
Acked-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 15296db70619984157e60666da5da8994a66870e
Author: James Zhu <James.Zhu at amd.com>
Date: Wed Oct 3 17:36:58 2018 -0400
drm/amdgpu/vcn:Add ring W/R PTR check for VCN DPG mode stop
Add ring write/read pointer check for VCN dynamic power gate mode
stop,to make sure that no job is left in ring before turn off DPG mode.
Signed-off-by: James Zhu <James.Zhu at amd.com>
Acked-by: Leo Liu <leo.liu at amd.com>
Acked-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 5866fb929c90e3189c1abd4d6518712ad56c90b4
Author: James Zhu <James.Zhu at amd.com>
Date: Wed Oct 3 10:24:43 2018 -0400
drm/amdgpu/vcn:Update latest spg mode stop for VCN
Update latest static power gate mode stop function for VCN
Signed-off-by: James Zhu <James.Zhu at amd.com>
Acked-by: Leo Liu <leo.liu at amd.com>
Acked-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 5327f025dc3c1dd87716839d5a1a3a9635591725
Author: James Zhu <James.Zhu at amd.com>
Date: Tue Oct 2 14:55:46 2018 -0400
drm/amdgpu/vcn:Update latest UVD_MPC register for VCN
Update latest UVD_MPC register for VCN. Use defined
macro to replace value for readability.
Signed-off-by: James Zhu <James.Zhu at amd.com>
Acked-by: Leo Liu <leo.liu at amd.com>
Acked-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit b53d3049d258fe731ebc510cd631ceffc7abfc91
Author: James Zhu <James.Zhu at amd.com>
Date: Tue Oct 2 14:38:18 2018 -0400
drm/amdgpu/vcn:Add new register offset/mask for VCN
Add new register offset/mask for VCN to support
latest VCN implementation.
Signed-off-by: James Zhu <James.Zhu at amd.com>
Acked-by: Leo Liu <leo.liu at amd.com>
Acked-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 8c6259bedab1681382b7829b1e8fc4f12fc4a215
Author: hersen wu <hersenxs.wu at amd.com>
Date: Thu Oct 4 09:28:20 2018 -0400
drm/amdgpu/display: dm/amdgpu: make dp phy debugfs for eDP
[WHY] dp debugfs file does not exist for eDP under
/sys/kernel/debug/dri/0/eDP-1. the root is phy debugfs
is created for dp connector only.
[HOW] for eDP connector, create phy debugfs too.
Signed-off-by: Hersen Wu <hersenxs.wu at amd.com>
Reviewed-by: David Francis <David.Francis at amd.com>
Acked-by: Leo Li <sunpeng.li at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 8bda1013ddb1dffdee7f9a1912f9845b9cf529cb
Author: Emily Deng <Emily.Deng at amd.com>
Date: Fri Oct 12 18:14:32 2018 +0800
drm/amdgpu: Set the default value about gds vmid0 size
For sriov, when first run windows guest, then run linux guest, the gds
vmid0 size will be reset to 0 by windows guest. So if the value has been
reset to 0, then set the value to the default value in linux guest.
v2:
Fixed value instead of reading mmGDS_VMID0_SIZE.
v3:
Set the default value of the switch.
Signed-off-by: Emily Deng <Emily.Deng at amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 0efd2d2f68cd5dbddf4ecd974c33133257d16a8e
Author: Christian König <christian.koenig at amd.com>
Date: Mon Oct 8 13:30:12 2018 +0200
drm/sched: fix timeout handling v2
We need to make sure that we don't race between job completion and
timeout.
v2: put revert label after calling the handling manually
Signed-off-by: Christian König <christian.koenig at amd.com>
Reviewed-by: Nayan Deshmukh <nayan26deshmukh at gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit b981c86f03068ca63391bb54ac4686e7ac419fa3
Author: Christian König <christian.koenig at amd.com>
Date: Fri Oct 5 19:56:39 2018 +0200
drm/sched: add drm_sched_start_timeout helper
Cleanup starting the timeout a bit.
Signed-off-by: Christian König <christian.koenig at amd.com>
Reviewed-by: Nayan Deshmukh <nayan26deshmukh at gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 7a862028b95a54adf9b3b88a1415e15478c257be
Author: Evan Quan <evan.quan at amd.com>
Date: Wed Oct 10 15:24:59 2018 +0800
drm/amd/powerplay: hint when power profile setting is not supported
Give user some hints when the power profile setting is not supported.
Signed-off-by: Evan Quan <evan.quan at amd.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 73d0a446690e342667dace1964b3238140fa4763
Author: Evan Quan <evan.quan at amd.com>
Date: Wed Oct 10 15:00:28 2018 +0800
drm/amd/powerplay: translate power_profile mode to pplib workload type
Correctly translate the power profile specified by user to workload
type accepted by SMU fw.
Signed-off-by: Evan Quan <evan.quan at amd.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit ca4b869240d5810ebac6b1570ad7beffcfbac2f5
Merge: 46972c03ab66 df2fc43d09d3
Author: Dave Airlie <airlied at redhat.com>
Date: Thu Oct 11 14:53:40 2018 +1000
Merge branch 'drm-next-4.20' of git://people.freedesktop.org/~agd5f/linux into drm-next
Add a new list.h helper for doing bulk updates. Used by ttm.
- Fixes for display underflow on VI APUs at 4K with UVD running
- Endian fixes for powerplay on vega
- DC fixes for interlaced video
- Vega20 powerplay fixes
- RV/RV2/PCO powerplay fixes
- Fix for spurious ACPI events on HG laptops
- Fix a memory leak in DC on driver unload
- Fixes for manual fan control mode switching
- Suspend/resume robustness fixes
- Fix display handling on RV2
- VCN fixes for DPG on PCO
- Misc code cleanups and warning fixes
Signed-off-by: Dave Airlie <airlied at redhat.com>
From: Alex Deucher <alexdeucher at gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181011014739.3117-1-alexander.deucher@amd.com
commit 46972c03ab667dc298cad0c9db517fb9b1521b5f
Merge: 66c9e573ea75 7372fd049aa8
Author: Dave Airlie <airlied at redhat.com>
Date: Thu Oct 11 14:51:52 2018 +1000
Merge tag 'drm-misc-next-fixes-2018-10-10' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
- Fix build failure without CONFIG_DRM_FBDEV_EMULATION (Arnd)
- Add Maxime to drm-misc maintainer group (Sean)
Cc: Arnd Bergmann <arnd at arndb.de>
Cc: Sean Paul <sean at poorly.run>
Signed-off-by: Dave Airlie <airlied at redhat.com>
From: Sean Paul <sean at poorly.run>
Link: https://patchwork.freedesktop.org/patch/msgid/20181010203951.GA229456@art_vandelay
commit 66c9e573ea75b63602cf4d3e1fb52fad2dd29be0
Merge: 7e6191d4360a 84dacb9cad28
Author: Dave Airlie <airlied at redhat.com>
Date: Thu Oct 11 11:44:01 2018 +1000
Merge branch 'mediatek-drm-next-4.20' of https://github.com/ckhu-mediatek/linux.git-tags into drm-next
This include hdmi output support for mt2701 and mt7623.
Signed-off-by: Dave Airlie <airlied at redhat.com>
From: CK Hu <ck.hu at mediatek.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1538616148.28906.1.camel@mtksdaap41
commit 7e6191d4360a2df6cf2a2613dcb79680cb943df8
Merge: 62e681f7dcab 74a07c0a59fa
Author: Dave Airlie <airlied at redhat.com>
Date: Thu Oct 11 10:23:11 2018 +1000
Merge branch 'linux-4.20' of git://github.com/skeggsb/linux into drm-next
Just initial HDMI 2.0 support, and a bunch of other cleanups.
Signed-off-by: Dave Airlie <airlied at redhat.com>
From: Ben Skeggs <bskeggs at redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/CABDvA=mgEm9JxP7AX7Sff-AEs7a75M4SqwFHmLPZhJojm4k=OA@mail.gmail.com
commit 74a07c0a59fa372b069d879971ba4d9e341979cf
Author: Gustavo A. R. Silva <gustavo at embeddedor.com>
Date: Tue Jul 24 08:27:19 2018 -0500
drm/nouveau/secboot/acr: fix memory leak
In case memory resources for *bl_desc* were allocated, release
them before return.
Addresses-Coverity-ID: 1472021 ("Resource leak")
Fixes: 0d466901552a ("drm/nouveau/secboot/acr: Remove VLA usage")
Signed-off-by: Gustavo A. R. Silva <gustavo at embeddedor.com>
Reviewed-by: John Hubbard <jhubbard at nvidia.com>
Reviewed-by: Kees Cook <keescook at chromium.org>
Signed-off-by: Ben Skeggs <bskeggs at redhat.com>
commit 9340d77f5327ea673a7f95f58139123d7a278243
Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date: Mon Sep 3 20:57:37 2018 -0400
drm/nouveau/disp: take sink support into account for exposing 594mhz
Scrambling is required for supporting any mode over 340MHz. If it's not
supported, reject any modes that would require it.
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs at redhat.com>
commit 7a406f8a62ff0a3647f96f0cfdb518a99a01bf3f
Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date: Mon Sep 3 20:57:36 2018 -0400
drm/nouveau/disp: add support for setting scdc parameters for high modes
When SCDC is supported, make sure that we configure the GPU and monitor
to the same parameters.
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs at redhat.com>
commit a971558c298755d2c07bc5508c65d689471763c8
Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date: Mon Sep 3 20:57:35 2018 -0400
drm/nouveau/disp: keep track of high-speed state, program into clock
The register programmed by the clock method needs to contain a different
setting for the link speed as well as special divider settings.
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs at redhat.com>
commit 4834e05049c9c807c38d0727ab422898fdfe2996
Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date: Mon Sep 3 20:57:34 2018 -0400
drm/nouveau/disp/gm200-: add scdc parameter setter
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs at redhat.com>
commit 4126b99e744b7a29746e201e2be6644d2edf3c56
Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date: Mon Sep 3 20:57:33 2018 -0400
drm/nouveau/disp: add a way to configure scrambling/tmds for hdmi 2.0
High pixel clocks are required to use a 40 TMDS divider instead of 10,
and even low ones may optionally use scrambling depending on device
support.
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs at redhat.com>
commit cfea88a4d86632f28cf80be97079f131645b7869
Author: Lyude Paul <lyude at redhat.com>
Date: Wed Aug 22 21:40:07 2018 -0400
drm/nouveau: Start using new drm_dev initialization helpers
Per the documentation in drm_get_pci_dev(), this function is deprecated
and shouldn't be used anymore. As it turns out, we're going to need to
stop using drm_get_pci_dev() anyway in order to allow us to turn off the
card before full system shutdowns, otherwise we'll hit race conditions
with userspace while trying to tear down the card on shutdown.
So, start using drm_dev_get() and drm_dev_put(), and just turn our
load/unload callbacks into open coded init/fini() functions.
Signed-off-by: Lyude Paul <lyude at redhat.com>
Cc: Karol Herbst <kherbst at redhat.com>
Signed-off-by: Ben Skeggs <bskeggs at redhat.com>
commit c4cee69a4497d9c6ad8868d63568b30e50cac9e9
Author: Lyude Paul <lyude at redhat.com>
Date: Wed Aug 22 21:40:06 2018 -0400
drm/nouveau: Fix potential memory leak in nouveau_drm_load()
We forget to free drm in all instances of failure, and additionally also
forget to destroy the master client if the other client fails
initialization.
Signed-off-by: Lyude Paul <lyude at redhat.com>
Cc: Karol Herbst <kherbst at redhat.com>
Signed-off-by: Ben Skeggs <bskeggs at redhat.com>
commit e15e4c13e5b77e8b8e8c5e6d23831b1180249788
Author: Lyude Paul <lyude at redhat.com>
Date: Thu Sep 6 17:43:26 2018 -0400
drm/nouveau: Refactor nvXX_backlight_init()
There's literally no difference between any of the backlight init
functions besides the backlight properties they set and the backlight
callbacks that they set, so move all of the duplicated backlight init
code out of there and into nouveau_backlight_init().
This gets rid of a lot of copy pasta!
Changes since v1:
- Some of the pre-refactor callbacks were storing nv_encoder in callback
data for the backlight devices that they registered, as opposed to
nouveau_drm. This got missed and caused some bugs that didn't
originally appear on my setup (NULL kernel derefs) for some reason.
So, fix this by finding the nouveau_encoder in
nouveau_backlight_init(), and using that as the callback data for all
gens instead even if they don't care about the encoder.
Signed-off-by: Lyude Paul <lyude at redhat.com>
Cc: Jeffery Miller <jmiller at neverware.com>
Cc: Karol Herbst <kherbst at redhat.com>
Signed-off-by: Ben Skeggs <bskeggs at redhat.com>
commit f76e174bd30a8a43f5c50a33f2988f84ee5d57de
Author: Lyude Paul <lyude at redhat.com>
Date: Thu Sep 6 17:43:25 2018 -0400
drm/nouveau: Cleanup indenting in nouveau_backlight.c
Still no functional changes.
Signed-off-by: Lyude Paul <lyude at redhat.com>
Reviewed-by: Karol Herbst <kherbst at redhat.com>
Signed-off-by: Ben Skeggs <bskeggs at redhat.com>
commit a4e05f415e2fb22b1804c86bbf84cc1d5d29b9f1
Author: Lyude Paul <lyude at redhat.com>
Date: Thu Sep 6 17:43:24 2018 -0400
drm/nouveau/drm/nouveau: s/nouveau_backlight_exit/nouveau_backlight_fini/
More consistent with the rest of the codebase, no functional changes
here.
Signed-off-by: Lyude Paul <lyude at redhat.com>
Reviewed-by: Karol Herbst <kherbst at redhat.com>
Signed-off-by: Ben Skeggs <bskeggs at redhat.com>
commit 6d757753cef8d523342fe544299068d30b5be490
Author: Lyude Paul <lyude at redhat.com>
Date: Thu Sep 6 17:43:23 2018 -0400
drm/nouveau: Move backlight device into nouveau_connector
Currently module unloading is broken in nouveau due to a rather annoying
race condition resulting from nouveau_backlight.c having gone a bit
stale over time:
[ 1960.791143] ==================================================================
[ 1960.791394] BUG: KASAN: use-after-free in nouveau_backlight_exit+0x112/0x150 [nouveau]
[ 1960.791460] Read of size 4 at addr ffff88075accf350 by task zsh/11185
[ 1960.791521]
[ 1960.791545] CPU: 7 PID: 11185 Comm: zsh Kdump: loaded Tainted: G O 4.18.0Lyude-Test+ #4
[ 1960.791580] Hardware name: LENOVO 20EQS64N0B/20EQS64N0B, BIOS N1EET79W (1.52 ) 07/13/2018
[ 1960.791628] Call Trace:
[ 1960.791680] dump_stack+0xa4/0xfd
[ 1960.791721] print_address_description+0x71/0x239
[ 1960.791833] ? nouveau_backlight_exit+0x112/0x150 [nouveau]
[ 1960.791877] kasan_report.cold.6+0x242/0x2fe
[ 1960.791919] __asan_report_load4_noabort+0x19/0x20
[ 1960.792012] nouveau_backlight_exit+0x112/0x150 [nouveau]
[ 1960.792081] nouveau_display_destroy+0x76/0x150 [nouveau]
[ 1960.792150] nouveau_drm_device_fini+0xb7/0x190 [nouveau]
[ 1960.792265] nouveau_drm_device_remove+0x14b/0x1d0 [nouveau]
[ 1960.792347] ? nouveau_cli_work_queue+0x2e0/0x2e0 [nouveau]
[ 1960.792378] ? trace_hardirqs_on_caller+0x38b/0x570
[ 1960.792406] ? trace_hardirqs_on+0xd/0x10
[ 1960.792472] nouveau_drm_remove+0x37/0x50 [nouveau]
[ 1960.792502] pci_device_remove+0x112/0x2d0
[ 1960.792530] ? pcibios_free_irq+0x10/0x10
[ 1960.792558] ? kasan_check_write+0x14/0x20
[ 1960.792587] device_release_driver_internal+0x35c/0x650
[ 1960.792617] device_release_driver+0x12/0x20
[ 1960.792643] pci_stop_bus_device+0x172/0x1e0
[ 1960.792671] pci_stop_and_remove_bus_device_locked+0x1a/0x30
[ 1960.792715] remove_store+0xcb/0xe0
[ 1960.792753] ? sriov_numvfs_store+0x2e0/0x2e0
[ 1960.792779] ? __lock_is_held+0xb5/0x140
[ 1960.792808] ? component_add+0x530/0x530
[ 1960.792834] dev_attr_store+0x3f/0x70
[ 1960.792859] ? sysfs_file_ops+0x11d/0x170
[ 1960.792885] sysfs_kf_write+0x104/0x150
[ 1960.792915] ? sysfs_file_ops+0x170/0x170
[ 1960.792940] kernfs_fop_write+0x24f/0x400
[ 1960.792978] ? __lock_acquire+0x6ea/0x47f0
[ 1960.793021] __vfs_write+0xeb/0x760
[ 1960.793048] ? kernel_read+0x130/0x130
[ 1960.793076] ? __lock_is_held+0xb5/0x140
[ 1960.793107] ? rcu_read_lock_sched_held+0xdd/0x110
[ 1960.793135] ? rcu_sync_lockdep_assert+0x78/0xb0
[ 1960.793162] ? __sb_start_write+0x183/0x220
[ 1960.793189] vfs_write+0x14d/0x4a0
[ 1960.793229] ksys_write+0xd2/0x1b0
[ 1960.793255] ? __ia32_sys_read+0xb0/0xb0
[ 1960.793298] ? fput+0x1d/0x120
[ 1960.793324] ? filp_close+0xf3/0x130
[ 1960.793349] ? entry_SYSCALL_64_after_hwframe+0x59/0xbe
[ 1960.793380] __x64_sys_write+0x73/0xb0
[ 1960.793407] do_syscall_64+0xaa/0x400
[ 1960.793433] entry_SYSCALL_64_after_hwframe+0x49/0xbe
[ 1960.793460] RIP: 0033:0x7f59df433164
[ 1960.793486] Code: 89 02 48 c7 c0 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 8d 05 81 38 2d 00 8b 00 85 c0 75 13 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 54 c3 0f 1f 00 41 54 49 89 d4 55 48 89 f5 53
[ 1960.793541] RSP: 002b:00007ffd70ee2fb8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
[ 1960.793576] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f59df433164
[ 1960.793620] RDX: 0000000000000002 RSI: 00005578088640c0 RDI: 0000000000000001
[ 1960.793665] RBP: 00005578088640c0 R08: 00007f59df7038c0 R09: 00007f59e0995b80
[ 1960.793696] R10: 000000000000000a R11: 0000000000000246 R12: 00007f59df702760
[ 1960.793730] R13: 0000000000000002 R14: 00007f59df6fd760 R15: 0000000000000002
[ 1960.793768]
[ 1960.793790] Allocated by task 11167:
[ 1960.793816] save_stack+0x43/0xd0
[ 1960.793841] kasan_kmalloc+0xc4/0xe0
[ 1960.793880] kasan_slab_alloc+0x11/0x20
[ 1960.793905] kmem_cache_alloc+0xd7/0x270
[ 1960.793944] getname_flags+0xbd/0x520
[ 1960.793969] user_path_at_empty+0x23/0x50
[ 1960.793994] do_faccessat+0x1fc/0x5d0
[ 1960.794018] __x64_sys_access+0x59/0x80
[ 1960.794043] do_syscall_64+0xaa/0x400
[ 1960.794067] entry_SYSCALL_64_after_hwframe+0x49/0xbe
[ 1960.794093]
[ 1960.794127] Freed by task 11167:
[ 1960.794152] save_stack+0x43/0xd0
[ 1960.794190] __kasan_slab_free+0x139/0x190
[ 1960.794215] kasan_slab_free+0xe/0x10
[ 1960.794239] kmem_cache_free+0xcb/0x2c0
[ 1960.794264] putname+0xad/0xe0
[ 1960.794287] filename_lookup.part.59+0x1f1/0x360
[ 1960.794313] user_path_at_empty+0x3e/0x50
[ 1960.794338] do_faccessat+0x1fc/0x5d0
[ 1960.794362] __x64_sys_access+0x59/0x80
[ 1960.794393] do_syscall_64+0xaa/0x400
[ 1960.794421] entry_SYSCALL_64_after_hwframe+0x49/0xbe
[ 1960.794461]
[ 1960.794483] The buggy address belongs to the object at ffff88075acceac0
[ 1960.794483] which belongs to the cache names_cache of size 4096
[ 1960.794540] The buggy address is located 2192 bytes inside of
[ 1960.794540] 4096-byte region [ffff88075acceac0, ffff88075accfac0)
[ 1960.794581] The buggy address belongs to the page:
[ 1960.794609] page:ffffea001d6b3200 count:1 mapcount:0 mapping:ffff880778e4b1c0 index:0x0 compound_mapcount: 0
[ 1960.794651] flags: 0x8000000000008100(slab|head)
[ 1960.794679] raw: 8000000000008100 ffffea001d39e808 ffffea001d39ea08 ffff880778e4b1c0
[ 1960.794739] raw: 0000000000000000 0000000000070007 00000001ffffffff 0000000000000000
[ 1960.794785] page dumped because: kasan: bad access detected
[ 1960.794813]
[ 1960.794834] Memory state around the buggy address:
[ 1960.794861] ffff88075accf200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[ 1960.794894] ffff88075accf280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[ 1960.794925] >ffff88075accf300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[ 1960.794956] ^
[ 1960.794985] ffff88075accf380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[ 1960.795017] ffff88075accf400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[ 1960.795061] ==================================================================
[ 1960.795106] Disabling lock debugging due to kernel taint
[ 1960.795131] ------------[ cut here ]------------
[ 1960.795148] ida_remove called for id=1802201963 which is not allocated.
[ 1960.795193] WARNING: CPU: 7 PID: 11185 at lib/idr.c:521 ida_remove+0x184/0x210
[ 1960.795213] Modules linked in: nouveau(O) mxm_wmi ttm i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm joydev vfat fat intel_rapl x86_pkg_temp_thermal coretemp crc32_pclmul iTCO_wdt psmouse wmi_bmof mei_me tpm_tis mei tpm_tis_core tpm i2c_i801 thinkpad_acpi pcc_cpufreq crc32c_intel serio_raw xhci_pci xhci_hcd wmi video i2c_dev i2c_core
[ 1960.795305] CPU: 7 PID: 11185 Comm: zsh Kdump: loaded Tainted: G B O 4.18.0Lyude-Test+ #4
[ 1960.795330] Hardware name: LENOVO 20EQS64N0B/20EQS64N0B, BIOS N1EET79W (1.52 ) 07/13/2018
[ 1960.795352] RIP: 0010:ida_remove+0x184/0x210
[ 1960.795370] Code: 4c 89 f7 e8 ae c8 00 00 eb 22 41 83 c4 02 4c 89 e8 41 83 fc 3f 0f 86 64 ff ff ff 44 89 fe 48 c7 c7 20 94 1e 83 e8 54 ed 81 fe <0f> 0b 48 b8 00 00 00 00 00 fc ff df 48 01 c3 c7 03 00 00 00 00 c7
[ 1960.795402] RSP: 0018:ffff88074d4df7b8 EFLAGS: 00010082
[ 1960.795421] RAX: 0000000000000000 RBX: 1ffff100e9a9befa RCX: ffffffff81479975
[ 1960.795440] RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff88077c1de690
[ 1960.795460] RBP: ffff88074d4df878 R08: ffffed00ef83bcd3 R09: ffffed00ef83bcd2
[ 1960.795479] R10: ffffed00ef83bcd2 R11: ffff88077c1de697 R12: 000000000000036b
[ 1960.795498] R13: 0000000000000202 R14: ffffffffa0aa7fa0 R15: 000000006b6b6b6b
[ 1960.795518] FS: 00007f59e0995b80(0000) GS:ffff88077c1c0000(0000) knlGS:0000000000000000
[ 1960.795553] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1960.795571] CR2: 00007f59e09a2010 CR3: 00000004a1a70005 CR4: 00000000003606e0
[ 1960.795596] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 1960.795629] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 1960.795649] Call Trace:
[ 1960.795667] ? ida_destroy+0x1d0/0x1d0
[ 1960.795686] ? kasan_check_write+0x14/0x20
[ 1960.795704] ? do_raw_spin_lock+0xc2/0x1c0
[ 1960.795724] ida_simple_remove+0x26/0x40
[ 1960.795794] nouveau_backlight_exit+0x9d/0x150 [nouveau]
[ 1960.795867] nouveau_display_destroy+0x76/0x150 [nouveau]
[ 1960.795930] nouveau_drm_device_fini+0xb7/0x190 [nouveau]
[ 1960.795989] nouveau_drm_device_remove+0x14b/0x1d0 [nouveau]
[ 1960.796047] ? nouveau_cli_work_queue+0x2e0/0x2e0 [nouveau]
[ 1960.796067] ? trace_hardirqs_on_caller+0x38b/0x570
[ 1960.796089] ? trace_hardirqs_on+0xd/0x10
[ 1960.796146] nouveau_drm_remove+0x37/0x50 [nouveau]
[ 1960.796167] pci_device_remove+0x112/0x2d0
[ 1960.796186] ? pcibios_free_irq+0x10/0x10
[ 1960.796218] ? kasan_check_write+0x14/0x20
[ 1960.796237] device_release_driver_internal+0x35c/0x650
[ 1960.796257] device_release_driver+0x12/0x20
[ 1960.796289] pci_stop_bus_device+0x172/0x1e0
[ 1960.796308] pci_stop_and_remove_bus_device_locked+0x1a/0x30
[ 1960.796328] remove_store+0xcb/0xe0
[ 1960.796345] ? sriov_numvfs_store+0x2e0/0x2e0
[ 1960.796364] ? __lock_is_held+0xb5/0x140
[ 1960.796383] ? component_add+0x530/0x530
[ 1960.796401] dev_attr_store+0x3f/0x70
[ 1960.796419] ? sysfs_file_ops+0x11d/0x170
[ 1960.796436] sysfs_kf_write+0x104/0x150
[ 1960.796454] ? sysfs_file_ops+0x170/0x170
[ 1960.796471] kernfs_fop_write+0x24f/0x400
[ 1960.796488] ? __lock_acquire+0x6ea/0x47f0
[ 1960.796520] __vfs_write+0xeb/0x760
[ 1960.796538] ? kernel_read+0x130/0x130
[ 1960.796556] ? __lock_is_held+0xb5/0x140
[ 1960.796590] ? rcu_read_lock_sched_held+0xdd/0x110
[ 1960.796608] ? rcu_sync_lockdep_assert+0x78/0xb0
[ 1960.796626] ? __sb_start_write+0x183/0x220
[ 1960.796648] vfs_write+0x14d/0x4a0
[ 1960.796666] ksys_write+0xd2/0x1b0
[ 1960.796684] ? __ia32_sys_read+0xb0/0xb0
[ 1960.796701] ? fput+0x1d/0x120
[ 1960.796732] ? filp_close+0xf3/0x130
[ 1960.796749] ? entry_SYSCALL_64_after_hwframe+0x59/0xbe
[ 1960.796768] __x64_sys_write+0x73/0xb0
[ 1960.796800] do_syscall_64+0xaa/0x400
[ 1960.796818] entry_SYSCALL_64_after_hwframe+0x49/0xbe
[ 1960.796836] RIP: 0033:0x7f59df433164
[ 1960.796854] Code: 89 02 48 c7 c0 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 8d 05 81 38 2d 00 8b 00 85 c0 75 13 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 54 c3 0f 1f 00 41 54 49 89 d4 55 48 89 f5 53
[ 1960.796884] RSP: 002b:00007ffd70ee2fb8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
[ 1960.796906] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f59df433164
[ 1960.796926] RDX: 0000000000000002 RSI: 00005578088640c0 RDI: 0000000000000001
[ 1960.796946] RBP: 00005578088640c0 R08: 00007f59df7038c0 R09: 00007f59e0995b80
[ 1960.796966] R10: 000000000000000a R11: 0000000000000246 R12: 00007f59df702760
[ 1960.796985] R13: 0000000000000002 R14: 00007f59df6fd760 R15: 0000000000000002
[ 1960.797008] irq event stamp: 509990
[ 1960.797026] hardirqs last enabled at (509989): [<ffffffff8119ff78>] flush_work+0x4b8/0x6d0
[ 1960.797063] hardirqs last disabled at (509990): [<ffffffff8297c395>] _raw_spin_lock_irqsave+0x25/0x60
[ 1960.797085] softirqs last enabled at (509744): [<ffffffff82c005ad>] __do_softirq+0x5ad/0x8c0
[ 1960.797121] softirqs last disabled at (509735): [<ffffffff8115aa15>] irq_exit+0x1a5/0x1e0
[ 1960.797142] ---[ end trace fb1342325f1846b8 ]---
While I haven't actually gone into the details of what's causing this to
happen (maybe the kernel removes the backlight device in the device core
before we get to it?), it doesn't really matter anyway because the way
nouveau handles backlights has long since been deprecated.
According to the documentation on the drm_connector->late_register()
hook, the ->late_register() hook should be used for adding extra
connector-related devices. Vice versa, the ->early_unregister() hook is
meant to be used for removing those devices.
So: gut nouveau_drm->bl_list and nouveau_drm->backlight, and replace
them with per-connector backlight structures. Additionally, move
backlight registration/teardown into the ->late_register() and
->early_unregister() hooks so that DRM can give us a chance to remove
the backlight before the connector is even removed. This appears to fix
the problem once and for all.
Changes since v2:
- Use NV_INFO_ONCE for printing GMUX information, since otherwise this
will end up printing that message for as many times as we have
connectors
Signed-off-by: Lyude Paul <lyude at redhat.com>
Reviewed-by: Karol Herbst <kherbst at redhat.com>
Signed-off-by: Ben Skeggs <bskeggs at redhat.com>
commit 4c497075042897ad287b1119c3c394812b292238
Author: Lyude Paul <lyude at redhat.com>
Date: Thu Sep 6 17:43:22 2018 -0400
drm/nouveau: Add NV_PRINTK_ONCE and variants
Since we're about to use this in nouveau_backlight.c. Same thing as
DRM_WARN_ONCE, DRM_INFO_ONCE, etc...
Signed-off-by: Lyude Paul <lyude at redhat.com>
Cc: Karol Herbst <kherbst at redhat.com>
Signed-off-by: Ben Skeggs <bskeggs at redhat.com>
commit dc854914999d5d52ac1b31740cb0ea8d89d0372e
Author: Lyude Paul <lyude at redhat.com>
Date: Thu Sep 6 17:43:21 2018 -0400
drm/nouveau: Check backlight IDs are >= 0, not > 0
Remember, ida IDs start at 0, not 1!
Signed-off-by: Lyude Paul <lyude at redhat.com>
Reviewed-by: Karol Herbst <kherbst at redhat.com>
Cc: stable at vger.kernel.org
Signed-off-by: Ben Skeggs <bskeggs at redhat.com>
commit df2fc43d09d3ee5ede82cab9299df5e78aa427b5
Author: Christian König <christian.koenig at amd.com>
Date: Thu Sep 13 11:17:23 2018 +0200
list: introduce list_bulk_move_tail helper
Move all entries between @first and including @last before @head.
This is useful for LRU lists where a whole block of entries should be
moved to the end of the list.
Used as a band aid in TTM, but better placed in the common list headers.
Acked-by: Dave Airlie <airlied at redhat.com>
Signed-off-by: Christian König <christian.koenig at amd.com>
Reviewed-by: Huang Rui <ray.huang at amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit a553c19d158535a62b513f5a9ef9f036a54b511f
Author: Alex Deucher <alexander.deucher at amd.com>
Date: Tue Oct 9 16:03:53 2018 -0500
drm/amdgpu/powerplay: factor out some pptable helpers
Move copy_array helpers to smu_helper.c and share between
vega12 and vega20.
Reviewed-by: Evan Quan <evan.quan at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 99e219521da5c1bfa9f36ca4fae3fe1a3718cf24
Author: Alex Deucher <alexander.deucher at amd.com>
Date: Tue Oct 9 15:50:38 2018 -0500
drm/amdgpu/powerplay: endian fixes for vega20_processpptables.c
Properly swap data from vbios.
Reviewed-by: Evan Quan <evan.quan at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit d97a7ab394800d41eb3b043a5692bfee0634f5c9
Author: Alex Deucher <alexander.deucher at amd.com>
Date: Tue Oct 9 15:33:16 2018 -0500
drm/amdgpu/powerplay: endian fixes for vega12_processpptables.c
Properly swap data from vbios.
Reviewed-by: Evan Quan <evan.quan at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit de501763304b7cdcc1d8d04ec32ad58f0cb598b1
Author: Alex Deucher <alexander.deucher at amd.com>
Date: Tue Oct 9 15:23:15 2018 -0500
drm/amdgpu/powerplay: endian fixes for vega10_processpptables.c
Properly swap data from vbios.
Reviewed-by: Evan Quan <evan.quan at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit f667dc38aacf353b017aac165d488404253f3c74
Author: YueHaibing <yuehaibing at huawei.com>
Date: Wed Sep 26 14:15:34 2018 +0000
drm/amdgpu: remove set but not used variable 'header'
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c: In function 'amdgpu_ucode_init_bo':
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c:431:39: warning:
variable 'header' set but not used [-Wunused-but-set-variable]
Signed-off-by: YueHaibing <yuehaibing at huawei.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 50325c0be109c7f2f21d6d66f31baed46a0c3443
Author: YueHaibing <yuehaibing at huawei.com>
Date: Sat Sep 29 11:39:14 2018 +0000
drm/amdgpu: remove set but not used variable 'ring' in psp_v11_0_ring_stop
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/gpu/drm/amd/amdgpu/psp_v11_0.c: In function 'psp_v11_0_ring_stop':
drivers/gpu/drm/amd/amdgpu/psp_v11_0.c:309:19: warning:
variable 'ring' set but not used [-Wunused-but-set-variable]
Signed-off-by: YueHaibing <yuehaibing at huawei.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit ae5c59a83b84b46aeabde95495a50dfec101d7d6
Author: YueHaibing <yuehaibing at huawei.com>
Date: Tue Oct 9 01:53:00 2018 +0000
drm/amdkfd: Remove set but not used variable 'preempt_all_queues'
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c: In function 'destroy_queue_cpsch':
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c:1366:7: warning:
variable 'preempt_all_queues' set but not used [-Wunused-but-set-variable]
It never used since introduct in
commit 992839ad64f2 ("drm/amdkfd: Add static user-mode queues support")
Signed-off-by: YueHaibing <yuehaibing at huawei.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 14b284832e7dea6f54f0adfd7bed105548b94e57
Author: Colin Ian King <colin.king at canonical.com>
Date: Mon Oct 8 17:22:28 2018 +0100
drm/amdgpu/powerplay: fix missing break in switch statements
There are several switch statements that are missing break statements.
Add missing breaks to handle any fall-throughs corner cases.
Detected by CoverityScan, CID#1457175 ("Missing break in switch")
Fixes: 18aafc59b106 ("drm/amd/powerplay: implement fw related smu interface for iceland.")
Acked-by: Huang Rui <ray.huang at amd.com>
Signed-off-by: Colin Ian King <colin.king at canonical.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 582f58de36834096a91cc1de2540c2f7269f850d
Author: Lyude Paul <lyude at redhat.com>
Date: Fri Sep 21 20:43:44 2018 -0400
drm/amdgpu: Suppress keypresses from ACPI_VIDEO events
Currently we return NOTIFY_DONE for any event which we don't think is
ours. However, many laptops will send more then just an ATIF event and
will also send an ACPI_VIDEO_NOTIFY_PROBE event as well. Since we don't
check for this, we return NOTIFY_DONE which causes a keypress for the
ACPI event to be propogated to userspace. This is the equivalent of
someone pressing the display key on a laptop every time there's a
hotplug event.
So, check for ACPI_VIDEO_NOTIFY_PROBE events and suppress keypresses
from them.
Signed-off-by: Lyude Paul <lyude at redhat.com>
Cc: stable at vger.kernel.org
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 800516480652e5ffbd4d7721de1fce484328e158
Author: Rex Zhu <Rex.Zhu at amd.com>
Date: Tue Oct 9 18:46:12 2018 +0800
drm/amdgpu: Remove the direct fw loading support for sdma2.4
sdma2.4 is only for iceland. For Vi, we don't maintain the
direct fw loading.
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit b19caa17b5a728845832353337510fcb3cccddf6
Author: Rex Zhu <Rex.Zhu at amd.com>
Date: Wed Oct 10 21:04:14 2018 +0800
drm/amdgpu: Remove wrong fw loading type warning
Remove the warning message:
"-1 is not supported on VI"
the -1 is the default fw load type, mean auto.
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 7a3e0bb2a57428456948614d8fe94930832903b6
Author: Rex Zhu <Rex.Zhu at amd.com>
Date: Wed Oct 10 20:41:32 2018 +0800
drm/amdgpu: Load fw between hw_init/resume_phase1 and phase2
Extract the function of fw loading out of powerplay.
Do fw loading between hw_init/resuem_phase1 and phase2
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 0a4f25205ec32d2918325d651cdaba9746764a24
Author: Rex Zhu <Rex.Zhu at amd.com>
Date: Wed Oct 10 19:28:30 2018 +0800
drm/amdgpu: split ip hw_init into 2 phases
We need to do some IPs earlier to deal with ordering issues
similar to how resume is split into two phases.
Will do fw loading via smu/psp between the two phases.
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 735f654e5dd1c55d28aa04d49a9b7fcd3d5cccd0
Author: Rex Zhu <Rex.Zhu at amd.com>
Date: Tue Oct 9 14:22:04 2018 +0800
drm/amdgpu: Remove amdgpu_ucode_fini_bo
The variable clean is unnecessary.
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit c8963ea4ce1783034e1f9cf0d702fa490eb77836
Author: Rex Zhu <Rex.Zhu at amd.com>
Date: Tue Oct 9 13:55:49 2018 +0800
drm/amdgpu: Split amdgpu_ucode_init/fini_bo into two functions
1. one is for create/free bo when init/fini
2. one is for fill the bo before fw loading
the ucode bo only need to be created when load driver
and free when driver unload.
when resume/reset, driver only need to re-fill the bo
if the bo is allocated in vram.
Suggested by Christian.
v2: Return error when bo create failed.
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit a2d31dc3cfab29f79c1cda2876d32b909ae26e25
Author: Rex Zhu <Rex.Zhu at amd.com>
Date: Wed Oct 3 16:19:50 2018 +0800
drm/amdgpu: Check late_init status before set cg/pg state
Fix cg/pg unexpected set in hw init failed case.
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 73f847dbab26cd9b962ce03e413612d7a2b2b47d
Author: Rex Zhu <Rex.Zhu at amd.com>
Date: Wed Oct 3 16:10:45 2018 +0800
drm/amdgpu: Refine function amdgpu_device_ip_late_init
1. only call late_init when hw_init successful,
so check status.hw instand of status.valid in late_init.
2. set status.late_initialized true if late_init was not implemented.
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 009d9ed6c4b7b84dbff8314d74233da9237a4560
Author: Rex Zhu <Rex.Zhu at amd.com>
Date: Sun Sep 30 17:37:27 2018 +0800
drm/amdgpu: Change AI gfx/sdma/smu init sequence
initialize gfx/sdma before dpm features enabled.
Acked-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 3089aa2248943e62a875840862c0103b47e8420c
Author: Rex Zhu <Rex.Zhu at amd.com>
Date: Sun Sep 30 17:32:36 2018 +0800
drm/amdgpu: Change SI/CI gfx/sdma/smu init sequence
initialize gfx/sdma before dpm features enabled.
Acked-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit f2d9bbc9968997c139d906162b3da9d97ffbed6f
Author: Emily Deng <Emily.Deng at amd.com>
Date: Wed Oct 10 15:43:47 2018 +0800
drm/amdgpu: Limit the max mc address to hole start
For the vram_start is 0 case, the gart range will be from 0x0000FFFF00000000
to 0x0000FFFF1FFFFFFF, which will cause the engine hang.
So to avoid the hole, limit the max mc address to AMDGPU_GMC_HOLE_START.:wq
Signed-off-by: Emily Deng <Emily.Deng at amd.com>
Reviewed-by: Christian König <christian.koenig at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit f9f97e3c7fe681bc8dcb9625856a559e2c7e11d8
Author: Tao Zhou <tao.zhou1 at amd.com>
Date: Tue Oct 9 11:40:31 2018 +0800
drm/amdgpu: fix CPDMA hang in PRT mode
Fix CPDMA hang in PRT mode, set CPF_INT_DMA in reg CP_MECx_F32_INT_DIS for Compute and set DISABLE_GFX_HALT_ON_UTCL1_ERROR in reg CP_DEBUG for GFX
Affected ASICs: Vega10 Vega12 Raven
Signed-off-by: Tao Zhou <tao.zhou1 at amd.com>
Tested-by: Yukun.Li <yukun1.li at amd.com>
Tested-by: Maciej.Jesionowski <maciej.jesionowski at amd.com>
Acked-by: Christian König <christian.koenig at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 04e7580f892688aff140c574dbefa707977375e7
Author: Tao Zhou <tao.zhou1 at amd.com>
Date: Tue Oct 9 11:30:36 2018 +0800
drm/amdgpu: add CP_DEBUG register definition for GC9.0
Add CP_DEBUG register definition.
Signed-off-by: Tao Zhou <tao.zhou1 at amd.com>
Acked-by: Christian König <christian.koenig at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 66f34aeec2510b755e8b928b0d8aec8a4095a227
Author: Hersen Wu <hersenxs.wu at amd.com>
Date: Tue Oct 9 13:50:10 2018 -0400
drm/amd/display: RV2 DP MST 2nd display within daisy chain not light up
RV2 resource is limit to 3 pipes. Limitation should apply to all HW
blocks instead of front pipe.
Signed-off-by: Hersen Wu <hersenxs.wu at amd.com>
Acked-by: Alex Deucher <alexander.deucher at amd.com>
Reviewed-by: Huang Rui <ray.huang at amd.com>
Signed-off-by: Huang Rui <ray.huang at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit d567cc55c0a9bd2744d5f32e3090e55f9e0c0a40
Author: Roman Li <Roman.Li at amd.com>
Date: Tue Oct 9 13:50:09 2018 -0400
drm/amd/display: Fix warning storm on Raven2
[Why]
Wrong index for pstate debug test register
[How]
Add correct index value for dcn1_01 in hubbub1_construct()
Signed-off-by: Hersen Wu <hersenxs.wu at amd.com>
Signed-off-by: Roman Li <Roman.Li at amd.com>
Acked-by: Alex Deucher <alexander.deucher at amd.com>
Reviewed-by: Huang Rui <ray.huang at amd.com>
Signed-off-by: Huang Rui <ray.huang at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 62e681f7dcab746412dce22d4b75b32c5ea38cdb
Merge: d995052cade4 16f37102181e
Author: Dave Airlie <airlied at redhat.com>
Date: Wed Oct 10 16:49:37 2018 +1000
Merge tag 'drm-msm-fixes-2018-10-09' of git://people.freedesktop.org/~robclark/linux into drm-next
Fix 32-bit arm build.
Signed-off-by: Dave Airlie <airlied at redhat.com>
From: Rob Clark <robdclark at gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGt7s20e4aJmnOFM-uZHfYSsicy0E=ssse1D7LTXX4jnWQ@mail.gmail.com
commit d995052cade4f4e2700f6e2045cd5db400986b17
Merge: 6952e3a1dffc 3ce36b4542b5
Author: Dave Airlie <airlied at redhat.com>
Date: Mon Oct 8 16:45:56 2018 +1000
Merge tag 'drm-msm-next-2018-10-07' of git://people.freedesktop.org/~robclark/linux into drm-next
This time mostly further refinement of dpu1+a6xx for sdm845 and
beyond.. and hurray for more negative diffstat :-)
- Misc cleanups and fixes
- GPU preemption optimization
- a6xx perf improvements and clock fixes (ie. lets actually not run at
minimum clks)
- a6xx devfreq/DCVS
- Lots of code cleanup across dpu (Bruce, Jeykumar, Sean)
- Fixed a few crashes on startup relating to dsi (Sean)
- Add cursor support (Sravanthi, Sean)
- Properly free mdss irq on destroy (Jordan)
- Use correct encoder_type when initializing, fixes crash on boot (Stephen)
Signed-off-by: Dave Airlie <airlied at redhat.com>
From: Rob Clark <robdclark at gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGsNevCzMiLuNW1EVN6gtP3JZSir6PfnWvnCavSZM+bUFQ@mail.gmail.com
commit 71195ba670bc6070b5db406c4fc12c69efb9f7e4
Author: Rex Zhu <Rex.Zhu at amd.com>
Date: Sun Sep 30 17:35:12 2018 +0800
drm/amdgpu: Change VI gfx/sdma/smu init sequence
initialize gfx/sdma before dpm features enabled.
Acked-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 9d5aa2ef3862197eb31e2df7c5d6b9b6dadcaf8a
Author: Rex Zhu <Rex.Zhu at amd.com>
Date: Sat Sep 29 15:57:31 2018 +0800
drm/amdgpu: Add fw load in gfx_v8 and sdma_v3
gfx and sdma can be initialized before smu.
Reviewed-by: Evan Quan <evan.quan at amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 9c8bc8d3394963c9bd4b5bcce03303c56dc3104b
Author: Rex Zhu <Rex.Zhu at amd.com>
Date: Sat Sep 29 20:28:14 2018 +0800
drm/amd/pp: Implement load_firmware interface
with this interface, gfx/sdma can be initialized
before smu.
Reviewed-by: Evan Quan <evan.quan at amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 744a522794bdc64391039177153ef973cbff1297
Author: Rex Zhu <Rex.Zhu at amd.com>
Date: Sat Sep 29 15:42:52 2018 +0800
drm/amd/pp: Allocate ucode bo in request_smu_load_fw
ucode bo is needed by request_smu_load_fw,
the request_smu_load_fw maybe called by gfx/sdma
before smu hw init.
so move amdgpu_ucode_bo_init to request_smu_lowd_fw
from smu hw init.
Reviewed-by: Evan Quan <evan.quan at amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 07da6aa47f84150ec6476e670b48e3e7158a4b15
Author: Rex Zhu <Rex.Zhu at amd.com>
Date: Sat Sep 29 15:30:11 2018 +0800
drm/amdgpu: Don't reallocate ucode bo when suspend
driver don't release the ucode memory when suspend. so don't
need to allocate bo when resume back.
Reviewed-by: Evan Quan <evan.quan at amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 9b008fb7ede3ad293647e4ebdc8e0419c07e8aba
Author: Rex Zhu <Rex.Zhu at amd.com>
Date: Sat Sep 29 20:09:00 2018 +0800
drm/amdgpu: Remove FW_LOAD_DIRECT type support on VI
AMDGPU_FW_LOAD_DIRECT is used for bring up.
Now it don't work any more. so remove the support.
v2: Add warning message if user select
AMDGPU_FW_LOAD_DIRECT/AMDGPU_FW_LOAD_PSP on VI.
Reviewed-by: Evan Quan <evan.quan at amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 825da4d925984de6e1497c2d5e1cbc7b6bbcf07b
Author: James Zhu <James.Zhu at amd.com>
Date: Tue Oct 2 13:31:31 2018 -0400
drm/amdgpu/vcn:Correct VCN cache window definition
Correct VCN cache window definition. The old one
is reused from UVD, and it is not fully correct.
Signed-off-by: James Zhu <James.Zhu at amd.com>
Acked-by: Leo Liu <leo.liu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit b17c524922d65f3ce527277a030d505da3c7b754
Author: James Zhu <James.Zhu at amd.com>
Date: Tue Oct 2 12:56:32 2018 -0400
drm/amdgpu/vcn:Replace value with defined macro
Replace value with defined macro to make
code more readable
Signed-off-by: James Zhu <James.Zhu at amd.com>
Acked-by: Leo Liu <leo.liu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 2dc4aa523b538f55e38bd4c7b6d704162b5728ac
Author: James Zhu <James.Zhu at amd.com>
Date: Tue Oct 2 11:44:50 2018 -0400
drm/amdgpu/vcn:fix dpg pause mode hang issue
Use mmUVD_SCRATCH2 tracking decode write point.
It will help avoid dpg pause mode hang issue.
Signed-off-by: James Zhu <James.Zhu at amd.com>
Acked-by: Leo Liu <leo.liu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 9332ddc91537cb739b8ee2cc17aebb3253cf8cde
Author: James Zhu <James.Zhu at amd.com>
Date: Mon Oct 1 18:18:59 2018 -0400
drm/amdgpu/vcn:Remove unused code
The following WREG32_SOC15_DPG_MODE will overwrite register
mmUVD_CGC_CTRL. This code can be removed.
Signed-off-by: James Zhu <James.Zhu at amd.com>
Reviewed-by: Leo Liu <leo.liu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 59d76d6bc206af2a00625094ff5b0d16cc69c779
Author: Nick Alcock <nick.alcock at oracle.com>
Date: Thu Oct 4 20:58:09 2018 +0100
drm/radeon: ratelimit bo warnings
So a few days ago I started getting sprays of these warnings --
sorry, but because it was a few days ago I'm not sure what I was
running at the time (but it was probably either Stellaris or Chromium).
Sep 25 22:06:34 mutilate err: : [ 544.718905] [drm:radeon_cs_parser_relocs] *ERROR* gem object lookup failed 0xc
Sep 25 22:06:34 mutilate err: : [ 544.718909] [drm:radeon_cs_ioctl] *ERROR* Failed to parse relocation -2!
Sep 25 22:06:34 mutilate err: : [ 544.719710] [drm:radeon_cs_parser_relocs] *ERROR* gem object lookup failed 0xc
Sep 25 22:06:34 mutilate err: : [ 544.719714] [drm:radeon_cs_ioctl] *ERROR* Failed to parse relocation -2!
Sep 25 22:06:34 mutilate err: : [ 544.719862] [drm:radeon_cs_parser_relocs] *ERROR* gem object lookup failed 0xc
Sep 25 22:06:34 mutilate err: : [ 544.719865] [drm:radeon_cs_ioctl] *ERROR* Failed to parse relocation -2!
Sep 25 22:06:34 mutilate err: : [ 544.720772] [drm:radeon_cs_parser_relocs] *ERROR* gem object lookup failed 0xc
Sep 25 22:06:34 mutilate err: : [ 544.720778] [drm:radeon_cs_ioctl] *ERROR* Failed to parse relocation -2!
Sep 25 22:06:34 mutilate warning: : [ 544.721415] radeon 0000:01:00.0: vbo resource seems too big for the bo
followed by a massive stream of "vbo resource seems too big for the bo".
The most extreme flood ran from 23:01:58 to 23:02:47 and emitted 91,000
lines of log in that time. This... seems excessive, given that each log
message after the first contains more or less no information.
So ratelimit these messages. (We probably want to see at least *some* so
that the underlying bug can be fixed -- always assuming the bug isn't in
unfixable closed-source game code somewhere.)
Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 4eb10b5be799c45e71f9e01e01fc88e84062426c
Author: Christian König <christian.koenig at amd.com>
Date: Wed Sep 26 16:15:44 2018 +0200
drm/amdgpu: fix incorrect use of amdgpu_irq_add_id in si_dma.c
Adding a second irq source because of a different src_id is actually a
bug.
Signed-off-by: Christian König <christian.koenig at amd.com>
Reviewed-by: Huang Rui <ray.huang at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 2ccecaf661e0b686a99ad0990e5ce14447942718
Author: Christian König <christian.koenig at amd.com>
Date: Thu Oct 4 10:27:48 2018 +0200
drm/amdgpu: fix AGP location with VRAM at 0x0
That also simplifies handling quite a bit.
Signed-off-by: Christian König <christian.koenig at amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang at amd.com>
Reviewed-by: Huang Rui <ray.huang at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit bdbb4d6e96bc9558e404bf709480ac2f7783c843
Author: Shirish S <shirish.s at amd.com>
Date: Fri Oct 5 10:54:21 2018 +0530
drm/amdgpu: remove the intterupt handling for the KIQ events
[Why]
1. we never submit IBs to the KIQ
2. there seems to be ~500ms delay during amdgpu resume spent in KIQ,
hence pointing toward interrupts are not working correctly.
[How]
remove interrupt handling for KIQ.
Signed-off-by: Shirish S <shirish.s at amd.com>
Reviewed-by: Christian König <christian.koenig at amd.com>i
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 1b19aa5aa8c9394850a5e769abd4df12b3bdd1b7
Author: Felix Kuehling <Felix.Kuehling at amd.com>
Date: Wed Aug 22 15:28:44 2018 -0400
drm/amdkfd: Fix incorrect use of process->mm
This mm_struct pointer should never be dereferenced. If running in
a user thread, just use current->mm. If running in a kernel worker
use get_task_mm to get a safe reference to the mm_struct.
Signed-off-by: Felix Kuehling <Felix.Kuehling at amd.com>
Reviewed-by: Oded Gabbay <oded.gabbay at gmail.com>
Acked-by: Christian König <christian.koenig at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 158b594a96529d895df943a4764609438a01d687
Author: Pratik Vishwakarma <Pratik.Vishwakarma at amd.com>
Date: Wed Oct 3 20:45:11 2018 +0530
drm/amdgpu: skip IB tests for KIQ in general
[Why]
1. We never submit IBs to KIQ.
2. Ring test pass without KIQ's ring also.
3. By skipping we see an improvement of around 500ms
in the amdgpu's resume time.
[How]
skip IB tests for KIQ ring type.
Signed-off-by: Shirish S <shirish.s at amd.com>
Signed-off-by: Pratik Vishwakarma <Pratik.Vishwakarma at amd.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit c1f0320e03207255ef618d1bbfe0939d03c7cfac
Author: Nathan Chancellor <natechancellor at gmail.com>
Date: Mon Oct 1 23:41:24 2018 -0700
drm/scheduler: Simplify spsc_queue_count check in drm_sched_entity_select_rq
Clang generates a warning when it sees a logical not followed by a
conditional operator like ==, >, or <.
drivers/gpu/drm/scheduler/sched_entity.c:470:6: warning: logical not is
only applied to the left hand side of this comparison
[-Wlogical-not-parentheses]
if (!spsc_queue_count(&entity->job_queue) == 0 ||
^ ~~
drivers/gpu/drm/scheduler/sched_entity.c:470:6: note: add parentheses
after the '!' to evaluate the comparison first
if (!spsc_queue_count(&entity->job_queue) == 0 ||
^
( )
drivers/gpu/drm/scheduler/sched_entity.c:470:6: note: add parentheses
around left hand side expression to silence this warning
if (!spsc_queue_count(&entity->job_queue) == 0 ||
^
( )
1 warning generated.
It assumes the author might have made a mistake in their logic:
if (!a == b) -> if (!(a == b))
Sometimes that is the case; other times, it's just a super convoluted
way of saying 'if (a)' when b = 0:
if (!1 == 0) -> if (0 == 0) -> if (true)
Alternatively:
if (!1 == 0) -> if (!!1) -> if (1)
Simplify this comparison so that Clang doesn't complain.
Fixes: 35e160e781a0 ("drm/scheduler: change entities rq even earlier")
Signed-off-by: Nathan Chancellor <natechancellor at gmail.com>
Reviewed-by: Christian König <christian.koenig at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 5e161e5442a8a209404542c91eb889487b1239f4
Author: Rex Zhu <Rex.Zhu at amd.com>
Date: Sat Sep 29 13:54:33 2018 +0800
drm/amd/pp: Refine smu7/8 request_smu_load_fw callback function
The request_smu_load_fw of VI is used to load gfx/sdma
ip's firmware.
Check whether the gfx/sdma firmware have been loaded successfully
in this callback function.
if failed, driver can exit to avoid gpu hard hung.
if successful, clean the flag reload_fw to avoid duplicated fw load.
when suspend/resume, driver need to reload fw.
so in suspend, reset the reload_fw flag to true to enable load fw when
resume.
Reviewed-by: Evan Quan <evan.quan at amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 0a821579a2ed44855d63d9a2d2acb61b38ce6354
Author: Rex Zhu <Rex.Zhu at amd.com>
Date: Sat Sep 29 14:32:47 2018 +0800
drm/amd/pp: Setup SoftRegsStart before request smu load fw
need to know SoftRegsStart value to visit the register
UcodeLoadStatus to check fw loading state.
Reviewed-by: Evan Quan <evan.quan at amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit bcb7c4e8b434d35697024cd47083c3aa0ef19b8b
Author: Rex Zhu <Rex.Zhu at amd.com>
Date: Sat Sep 29 13:28:20 2018 +0800
drm/amd/pp: Refine function iceland_start_smu
if upload firmware failed, no matter how many times
the function runs again, the same error will be encountered.
so remove the duplicated code.
Reviewed-by: Evan Quan <evan.quan at amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 44779b43f15977885a0e3b45bf6deb6be18725e5
Author: Rex Zhu <Rex.Zhu at amd.com>
Date: Sat Sep 29 15:27:02 2018 +0800
drm/amdgpu: Move gfx flag in_suspend to adev
Move in_suspend flag to adev from gfx, so
can be used in other ip blocks, also keep
consistent with gpu_in_reset flag.
Reviewed-by: Evan Quan <evan.quan at amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 3023015f791639838ec5d80e5c14851238a1a7d9
Author: Rex Zhu <Rex.Zhu at amd.com>
Date: Sat Sep 29 14:52:31 2018 +0800
drm/amd/pp: Fix memory leak on CI/AI
On CI/AI, fw was not loaded by smu, but
smu's fw still need to be released
when driver fini.
Reviewed-by: Evan Quan <evan.quan at amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit e5081e30eba1493f098b6e65e22124e36b2de743
Author: Rex Zhu <Rex.Zhu at amd.com>
Date: Sat Sep 29 17:07:48 2018 +0800
drm/amdgpu: Drop dead define in amdgpu.h
the struct was not in use any more.
Reviewed-by: Evan Quan <evan.quan at amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit a57ba84b149cfeca133ea11f253049eac5f9c1a9
Author: Rex Zhu <Rex.Zhu at amd.com>
Date: Sat Oct 6 00:11:25 2018 +0800
drm/amdgpu: Always enable fan sensors for read
don't need to set fan1_enable to read fan sensors.
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit b8a9c003679ea3619cef4092b10390224f09fbaa
Author: Rex Zhu <Rex.Zhu at amd.com>
Date: Fri Sep 28 16:01:48 2018 +0800
drm/amdgpu: Disable sysfs pwm1 if not in manual fan control
Following lm-sensors 3.0.0,
Only enable pwm1 sysfs when fan control mode(pwm1_enable)
in manual
Reviewed-by: Evan Quan <evan.quan at amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit c2870527f700e919fbb543baef36032be5d626e0
Author: Rex Zhu <Rex.Zhu at amd.com>
Date: Thu Sep 20 14:30:55 2018 +0800
drm/amdgpu: Add fan RPM setting via sysfs
Add fan1_target for get/set fan speed in RPM unit
Add fan1_min/fan1_max for get min, max fan speed in RPM unit
Add fan1_enable to enable/disable the fan1 sensor
v3: drop the hardcode value of min/max rpm in comments pointed
out by Alex.
v2: query the min/max rpm gpu support instand of hardcode value.
Reviewed-by: Evan Quan <evan.quan at amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit d5f480372ca485806443afca50ef024623f8eb03
Author: Rex Zhu <Rex.Zhu at amd.com>
Date: Sun Sep 30 13:19:00 2018 +0800
drm/amd/pp: Implement AMDGPU_PP_SENSOR_MIN/MAX_FAN_RPM
so user can query the RPM range
Reviewed-by: Evan Quan <evan.quan at amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 862cd98029d5f31db326e007aff5fec784807941
Author: Rex Zhu <Rex.Zhu at amd.com>
Date: Sun Sep 30 13:18:17 2018 +0800
drm/amdgpu: Add new AMDGPU_PP_SENSOR_MIN/MAX_FAN_RPM sensor
For getting the min/max fan speed in RPM units.
Reviewed-by: Evan Quan <evan.quan at amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit ec442fd3a9756d489009a23cdb0b8a789eedf94e
Author: Rex Zhu <Rex.Zhu at amd.com>
Date: Fri Sep 28 15:25:06 2018 +0800
drm/amdgpu: Refine uvd_v6/7_0_enc_get_destroy_msg
1. make uvd_v7_0_enc_get_destroy_msg static
2. drop a function variable that always true
Reviewed-by: Evan Quan <evan.quan at amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 717276b9256f5d97b43e53adca1670cee2c45db2
Author: Shirish S <shirish.s at amd.com>
Date: Mon Sep 24 19:01:47 2018 +0530
drm/amd/display: Signal hw_done() after waiting for flip_done()
In amdgpu_dm_commit_tail(), wait until flip_done() is signaled before
we signal hw_done().
[Why]
This is to temporarily address a paging error that occurs when a
nonblocking commit contends with another commit, particularly in a
mirrored display configuration where at least 2 CRTCs are updated.
The error occurs in drm_atomic_helper_wait_for_flip_done(), when we
attempt to access the contents of new_crtc_state->commit.
Here's the sequence for a mirrored 2 display setup (irrelevant steps
left out for clarity):
**THREAD 1** | **THREAD 2**
|
Initialize atomic state for flip |
|
Queue worker |
...
| Do work for flip
|
| Signal hw_done() on CRTC 1
| Signal hw_done() on CRTC 2
|
| Wait for flip_done() on CRTC 1
<---- **PREEMPTED BY THREAD 1**
Initialize atomic state for cursor |
update (1) |
|
Do cursor update work on both CRTCs |
|
Clear atomic state (2) |
**DONE** |
...
|
| Wait for flip_done() on CRTC 2
| *ERROR*
|
The issue starts with (1). When the atomic state is initialized, the
current CRTC states are duplicated to be the new_crtc_states, and
referenced to be the old_crtc_states. (The new_crtc_states are to be
filled with update data.)
Some things to note:
* Due to the mirrored configuration, the cursor updates on both CRTCs.
* At this point, the pflip IRQ has already been handled, and flip_done
signaled on all CRTCs. The cursor commit can therefore continue.
* The old_crtc_states used by the cursor update are the **same states**
as the new_crtc_states used by the flip worker.
At (2), the old_crtc_state is freed (*), and the cursor commit
completes. We then context switch back to the flip worker, where we
attempt to access the new_crtc_state->commit object. This is
problematic, as this state has already been freed.
(*) Technically, 'state->crtcs[i].state' is freed, which was made to
reference old_crtc_state in drm_atomic_helper_swap_state()
[How]
By moving hw_done() after wait_for_flip_done(), we're guaranteed that
the new_crtc_state (from the flip worker's perspective) still exists.
This is because any other commit will be blocked, waiting for the
hw_done() signal.
Note that both the i915 and imx drivers have this sequence flipped
already, masking this problem.
Signed-off-by: Shirish S <shirish.s at amd.com>
Signed-off-by: Leo Li <sunpeng.li at amd.com>
Reviewed-by: Harry Wentland <harry.wentland at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit dd330d8c27864494d863caf3cf867e53415fa56e
Author: Nathan Chancellor <natechancellor at gmail.com>
Date: Thu Sep 27 11:06:33 2018 -0700
drm/amd/display: Use proper enums in process_channel_reply
Clang warns when one enumerated type is implicitly converted to another.
drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.c:315:19: warning:
implicit conversion from enumeration type 'enum
aux_channel_operation_result' to different enumeration type 'enum
aux_transaction_reply' [-Wenum-conversion]
reply->status = AUX_CHANNEL_OPERATION_FAILED_HPD_DISCON;
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/i2caux/dce110/aux_engine_dce110.c:349:19:
warning: implicit conversion from enumeration type 'enum
aux_channel_operation_result' to different enumeration type 'enum
aux_transaction_reply' [-Wenum-conversion]
reply->status = AUX_CHANNEL_OPERATION_FAILED_HPD_DISCON;
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The current enum is incorrect, it should be from aux_transaction_reply,
so use AUX_TRANSACTION_REPLY_HPD_DISCON.
Reported-by: Nick Desaulniers <ndesaulniers at google.com>
Suggested-by: Nick Desaulniers <ndesaulniers at google.com>
Signed-off-by: Nathan Chancellor <natechancellor at gmail.com>
Reviewed-by: Nick Desaulniers <ndesaulniers at google.com>
Reviewed-by: Harry Wentland <harry.wentland at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 6c0984d53b073d42ba44c92a1a721840f90bda60
Author: Nicholas Kazlauskas <nicholas.kazlauskas at amd.com>
Date: Fri Sep 21 09:35:24 2018 -0400
drm/amd/display: Raise dispclk value for dce_update_clocks
[Why]
The DISPCLK value was previously requested to be 15% higher for all
ASICS that went through the dce110 bandwidth code path. As part of a
refactoring of dce_clocks and dce110 set_bandwidth this was removed
for power saving considerations.
This changed caused corruption under certain display configurations.
Originally thought to be Vega specific, it was also observed on Polaris.
[How]
The 15% is brought back but its placement differs from the original
patch. This boost should only be enable while DFS bypass is inactive.
This (like the Vega patch) is also a workaround that should be
removed after the root cause is identified.
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas at amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland at amd.com>
Acked-by: Leo Li <sunpeng.li at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit a37786abc3bbbbd3a6dc470665af083b9a492cf7
Author: Murton Liu <murton.liu at amd.com>
Date: Wed Sep 19 14:31:12 2018 -0400
drm/amd/display: HLK Periodic Frame Notification test failed
[Why]
Due to a small pre-fetch window, the active vline timing is a couple
of lines off when compared to what it should be.
[How]
Changed the calculation for the start vline to account for this window.
Signed-off-by: Murton Liu <murton.liu at amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr at amd.com>
Acked-by: Leo Li <sunpeng.li at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 4a0ad70d690c9bc13f691993da0f38b8634d7eeb
Author: Charlene Liu <charlene.liu at amd.com>
Date: Tue Sep 18 13:23:42 2018 -0400
drm/amd/display: fix Interlace video timing.
[Description] interlace mode shows wrong vertical timing.
Interface timing in Edid is half vertical timing as progressive timing.
driver doubled the vertical timing in edid_paser,
no need to double in optc again.
Signed-off-by: Charlene Liu <charlene.liu at amd.com>
Reviewed-by: Chris Park <Chris.Park at amd.com>
Acked-by: Leo Li <sunpeng.li at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit a7fbf17aa8bfaab9abd50168e81034f834165d29
Author: Leo Li <sunpeng.li at amd.com>
Date: Tue Sep 18 10:21:35 2018 -0400
drm/amd/display: Flatten irq handler data struct
[Why]
There is no reason why the common data needs to be kept separate.
[How]
Flatten the struct by moving common data into the DM IRQ struct.
Signed-off-by: Leo Li <sunpeng.li at amd.com>
Reviewed-by: David Francis <David.Francis at amd.com>
Acked-by: Leo Li <sunpeng.li at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 88ed9fb77ef420cf2e4ec1624f3e638685e28c8d
Author: Jun Lei <Jun.Lei at amd.com>
Date: Tue Sep 18 09:38:20 2018 -0400
drm/amd/display: fix memory leak in resource pools
[why]
ddc engines were recently changed to be independently tracked
from pipe count. the change was reflected in resource constructor
but not in destructor. this manifests as a memory leak when
pipe harvesting is enabled, since not all constructed ddc engines
are freed
[how]
make destructor symmetric with constructor for all dcX_resource
Signed-off-by: Jun Lei <Jun.Lei at amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr at amd.com>
Acked-by: Leo Li <sunpeng.li at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 5e174ce63ed7da4807ee86913fda35229d60cdab
Author: Tony Cheng <tony.cheng at amd.com>
Date: Mon Sep 10 11:30:52 2018 -0400
drm/amd/display: dc 3.1.68
Signed-off-by: Tony Cheng <tony.cheng at amd.com>
Reviewed-by: Steven Chiu <Steven.Chiu at amd.com>
Acked-by: Leo Li <sunpeng.li at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit ceb9831dd6e5dfb79f94b205eade4ecc29e26d60
Author: Yongqiang Sun <yongqiang.sun at amd.com>
Date: Mon Sep 17 10:05:51 2018 -0400
drm/amd/display: WA for DF keeps awake after S0i3.
[Why]
DF keeps awake after S0i3 resume due to DRAM_STATE_CNTL
is set by bios command table during dcn init_hw.
[How]
As a work around, check STATE_CNTL status before init_hw,
if it is 0 before init_hw and set to 1 after init_hw,
change it to 0.
Signed-off-by: Yongqiang Sun <yongqiang.sun at amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng at amd.com>
Acked-by: Leo Li <sunpeng.li at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit e15fc81f11854451ec8a8ed9168b8247e4e9a10b
Author: Eric Yang <Eric.Yang2 at amd.com>
Date: Fri Sep 14 15:55:01 2018 -0400
drm/amd/display: clean up encoding checks
[Why]
All ASICS we support has YCbCr support, so
the check is unnecessary, the currently logic
in validate output also returns true all
the time, so the unneccessary logic is removed
Signed-off-by: Eric Yang <Eric.Yang2 at amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng at amd.com>
Acked-by: Leo Li <sunpeng.li at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit b7cd6487a52484bed5ba5424177f7a90166bcaac
Author: Eric Yang <Eric.Yang2 at amd.com>
Date: Fri Sep 14 13:53:14 2018 -0400
drm/amd/display: block DP YCbCr420 modes
[why]
Currently not supported, will black screen when set.
[How]
Fail validate timing helper for those modes.
Signed-off-by: Eric Yang <Eric.Yang2 at amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng at amd.com>
Acked-by: Leo Li <sunpeng.li at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 8ab2180f96f5334974a84f54e794b3bc5912f4d1
Author: Eryk Brol <eryk.brol at amd.com>
Date: Fri Sep 7 13:24:28 2018 -0400
drm/amd/display: Add function to fetch clock requirements
Also add dram clock to clocks struct, for systems that uses them.
Signed-off-by: Eryk Brol <eryk.brol at amd.com>
Reviewed-by: Jun Lei <Jun.Lei at amd.com>
Acked-by: Leo Li <sunpeng.li at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 74eac5f3b43eda8b518662b011d1f18d5560e144
Author: Su Sung Chung <Su.Chung at amd.com>
Date: Thu Sep 13 15:26:08 2018 -0400
drm/amd/display: Calculate swizzle mode using bpp during validation
[Why]
Previously bandwidth validation was failing because swizzle mode was not
initialized during plane_state allocation. The swizzle mode was
calculated using pixed format which is how swizzle mode is initially
calculated in addrlib.
[How]
* Set default swizzle mode for validation to DC_SW_UNKNOWN
* Created new function in dcn10_assign_swizzle_mode which sets the
plane swizzle mode based on selected pixed format
* Added the call of assign_swizzle_mode into dc_validate_global_state
* Set failsafe swizzle mode back to DC_SW_LINEAR
Signed-off-by: Su Sung Chung <Su.Chung at amd.com>
Reviewed-by: Eric Yang <eric.yang2 at amd.com>
Acked-by: Leo Li <sunpeng.li at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit cbad73147fe20be018d976ea59c82bdf26e46151
Author: Nikola Cornij <nikola.cornij at amd.com>
Date: Wed Sep 12 15:17:51 2018 -0400
drm/amd/display: Add a check-function for virtual signal type
[why]
Same functions exist for all other signal types.
[how]
Add a function that checks against virtual signal type.
Signed-off-by: Nikola Cornij <nikola.cornij at amd.com>
Reviewed-by: Leo Li <sunpeng.li at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 39c03e0032ff839e62aae7d85a541451444a3198
Author: Charlene Liu <charlene.liu at amd.com>
Date: Wed Sep 12 18:22:16 2018 -0400
drm/amd/display: fix 4K stereo screen flash issue
[Why]
HDMI_scramber is not enabled for pixel rate >340Mhz.
[How]
Calculate the phy clock to include the Hw frame packing factor.
Signed-off-by: Charlene Liu <charlene.liu at amd.com>
Reviewed-by: Chris Park <Chris.Park at amd.com>
Acked-by: Leo Li <sunpeng.li at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit be61df574256ae8c0dbd45ac148ca7260a0483c0
Author: Jun Lei <Jun.Lei at amd.com>
Date: Thu Sep 13 09:32:26 2018 -0400
drm/amd/display: Add DC build_id to determine build type
[why]
Sometimes there are indications that the incorrect driver is being
loaded in automated tests. This change adds the ability for builds to
be tagged with a string, and picked up by the test infrastructure.
[how]
dc.c will allocate const for build id, which is init-ed with default
value, indicating production build. For test builds, build server will
find/replace this value. The test machine will then verify this value.
Signed-off-by: Jun Lei <Jun.Lei at amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng at amd.com>
Acked-by: Leo Li <sunpeng.li at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 51ef434a15b450bfbef1e06cc87ee4e98a224486
Author: Akshu Agrawal <akshu.agrawal at amd.com>
Date: Mon Sep 24 15:48:02 2018 +0530
drm/amd/powerplay: Enable/Disable NBPSTATE on On/OFF of UVD
We observe black lines (underflow) on display when playing a
4K video with UVD. On Disabling Low memory P state this issue is
not seen.
Multiple runs of power measurement shows no imapct.
Signed-off-by: Akshu Agrawal <akshu.agrawal at amd.com>
Signed-off-by: Satyajit Sahu <satyajit.sahu at amd.com>
Acked-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
Cc: stable at vger.kernel.org
commit 479afffe214759276afece3797b1677c7e1b39d4
Author: Rex Zhu <Rex.Zhu at amd.com>
Date: Wed Sep 26 12:17:52 2018 +0800
drm/amd/pp: Remove wrong code in fiji_start_smu
HW CG feature will be enabled after hw ip initialized
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit e5a4059ceb4c353b1b151f5f7f7b00fd399e4ceb
Author: Rex Zhu <Rex.Zhu at amd.com>
Date: Fri Sep 28 16:57:34 2018 +0800
drm/amd/pp: Remove uncessary extra vcn pg cntl in smu
the vcn power will be controlled by VCN.
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit d09ae92de858d0650441a47f4578e0509186e5d8
Author: Rex Zhu <Rex.Zhu at amd.com>
Date: Tue Sep 25 19:53:30 2018 +0800
drm/amdgpu: Move out power up/down sdma out of smu
smu only expose interface to other ip blocks.
in order to reduce dependence between smu and other ip blocks
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 40bea02f4a1414f0163c5380423f578b3507e69f
Author: Rex Zhu <Rex.Zhu at amd.com>
Date: Tue Sep 25 19:45:46 2018 +0800
drm/amd/pp: Expose the smu support for SDMA PG cntl
SDMA IP can be power up/down via smu message
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit c52dcf49195d06319189c7f1dd8b62bfca545197
Author: Rex Zhu <Rex.Zhu at amd.com>
Date: Thu Sep 20 11:50:26 2018 +0800
drm/amd/pp: Avoid divide-by-zero in fan_ctrl_set_fan_speed_rpm
The minRPM speed maybe equal to zero. so need to check
input RPM not equal to 0, otherwise cause divide-by-zero driver crash.
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit b3ca0f397ead2d794921ec3a08c132dadb37874e
Author: Rex Zhu <Rex.Zhu at amd.com>
Date: Thu Sep 20 15:11:08 2018 +0800
drm/amd/pp: Fix fan's RPM setting not work on VI/Vega10
set the target rpm value to wrong register.
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 8f97829e5c20b2486771c42b8adc4f513f90b3e4
Author: Rex Zhu <Rex.Zhu at amd.com>
Date: Tue Sep 25 13:27:00 2018 +0800
drm/amdgpu: Fix comments error in sdma_v4_1_update_power_gating
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 8010f2886a63a7bd7ebade1ffb13c0cf41b36233
Author: Evan Quan <evan.quan at amd.com>
Date: Thu Sep 27 13:48:45 2018 +0800
drm/amd/powerplay: enable MGPU fan boost feature on Vega20
Added Vega20 specific implementation for MGPU fan boost
feature.
Signed-off-by: Evan Quan <evan.quan at amd.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit b55c9e7a11f9993328a46b43f3c9e4ca1962c352
Author: Evan Quan <evan.quan at amd.com>
Date: Thu Sep 27 13:43:16 2018 +0800
drm/amd/powerplay: helper interfaces for MGPU fan boost feature
MGPU fan boost feature is enabled only when two or more dGPUs
in the system.
Signed-off-by: Evan Quan <evan.quan at amd.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 62d73fbcfb367104db57253a186f410020289517
Author: Evan Quan <evan.quan at amd.com>
Date: Thu Sep 27 13:26:58 2018 +0800
drm/amdgpu: added AMD GPU instance counting V2
Count all GPU instances from AMD(including iGPUs and
dGPUs) in the system.
V2: drop unnecessary initialization for other gpu_info
members except mutex
Signed-off-by: Evan Quan <evan.quan at amd.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit e92b83e50839eced31aede94a39901581b71bada
Author: Alex Deucher <alexander.deucher at amd.com>
Date: Wed Sep 26 22:55:47 2018 -0500
drm/amdgpu/vega20: make power profile output more consistent
Make the profile name line match previous generations more closely.
E.g.,
0 3D_FULL_SCREEN :
vs:
0(3D_FULL_SCREEN )
Reviewed-by: Evan Quan <evan.quan at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit b989531b1f192a77c739a2976953e241d78229a3
Author: Evan Quan <evan.quan at amd.com>
Date: Wed Sep 19 19:07:19 2018 +0800
drm/amdgpu: change Raven always on CUs to 4
For Vega10 and Vega20, the always on CUs are 12.
For Raven, it's 4.
Signed-off-by: Evan Quan <evan.quan at amd.com>
Acked-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 989b68232c7906ab4fb49f6ed5fd451ee22fc41e
Author: Evan Quan <evan.quan at amd.com>
Date: Fri Aug 24 16:40:03 2018 +0800
drm/amdgpu: added vega20 LBPW support v2
Enable LBPW support on vega20.
v2: squash in warning fix (Alex)
Signed-off-by: Evan Quan <evan.quan at amd.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 031db09017da532d4dc7bbba8c734cfc80f49f34
Author: Evan Quan <evan.quan at amd.com>
Date: Tue Sep 18 18:04:44 2018 +0800
drm/amd/powerplay/vega20: enable fan RPM and pwm settings V2
Manual fan RPM and pwm setting on vega20 are
available now.
V2: correct the register for fan speed setting and
avoid divide-by-zero
Signed-off-by: Evan Quan <evan.quan at amd.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
Reviewed-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 42fae99520090423ad639af889d7376774df7fdf
Author: Evan Quan <evan.quan at amd.com>
Date: Mon Sep 17 18:41:28 2018 +0800
drm/amd/powerplay/vega20: tell the correct gfx voltage V2
Export the correct gfx voltage by hwmon interface.
V2: update the register naming for consistency
Signed-off-by: Evan Quan <evan.quan at amd.com>
Reviewed-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 3546916f426f3bac6487d37446d8cc743c53554d
Author: Evan Quan <evan.quan at amd.com>
Date: Mon Sep 17 15:05:54 2018 +0800
drm/amd/powerplay/vega20: correct the hwmon interface ppt limit output
The ppt limit read out by hwmon interface is always 0.
Correct this hwmon interface output.
Signed-off-by: Evan Quan <evan.quan at amd.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
Reviewed-by: Rex Zhu <Rex.Zhu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
commit 7372fd049aa8836310f84da5f82dc9eb146915c8
Author: Sean Paul <sean at poorly.run>
Date: Fri Oct 5 12:02:22 2018 -0400
MAINTAINERS: Add Maxime Ripard as drm-misc maintainer
Unfortunately Gustavo has decided to step down as drm-misc maintainer to
focus on other projects. Thanks Gustavo for your dedication and hard work!
Fortunately for us, we have a wealth of people qualified to assume a
-misc maintainer role. Maxime has done an outstanding job with sun4i and
in the community in general. I'm really excited that he agreed to take
on this responsibility and I look forward to working with him!
Cc: Dave Airlie <airlied at linux.ie>
Cc: Gustavo Padovan <gustavo at padovan.org>
Cc: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
Cc: Maxime Ripard <maxime.ripard at bootlin.com>
Acked-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
Acked-by: Maxime Ripard <maxime.ripard at bootlin.com>
Acked-by: Dave Airlie <airlied at linux.ie>
Signed-off-by: Sean Paul <sean at poorly.run>
Link: https://patchwork.freedesktop.org/patch/msgid/20181005160256.200162-1-sean@poorly.run
commit 16f37102181e23ec4bec88fe1cfdd6c3c24dd1ed
Author: Sean Paul <seanpaul at chromium.org>
Date: Mon Oct 8 14:24:14 2018 -0400
drm/msm: a6xx: Fix improper u64 division
This patch uses the proper do_div() macro to perform u64 division and
guards against overflow if the result is too large for the unsigned long
return type
Fixes: a2c3c0a54d4c drm/msm/a6xx: Add devfreq support for a6xx
Cc: Sharat Masetty <smasetty at codeaurora.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 0f5427219bdf3e3d0ba94e4fbefe623a57616825
Author: Sean Paul <seanpaul at chromium.org>
Date: Mon Oct 8 14:24:13 2018 -0400
drm/msm: a5xx: Remove unneeded parens
A small fixup I posted with my v2 patch [1] that was dropped.
[1]- https://lists.freedesktop.org/archives/freedreno/2018-October/003647.html
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 6952e3a1dffcb931cf8625aa01642b9afac2af61
Merge: c530174b90fa fd99bd8b805c
Author: Dave Airlie <airlied at redhat.com>
Date: Mon Oct 8 16:38:48 2018 +1000
Merge branch 'for-upstream/mali-dp' of git://linux-arm.org/linux-ld into drm-next
I've realised that the commit 3dae1c0919d8 ("drm/arm/malidp: Implemented
the size validation for AFBC framebuffers") got bungled up in the
upstreaming process and it was missing an important line from the
function that calculates the size of the AFBC framebuffer
Signed-off-by: Dave Airlie <airlied at redhat.com>
From: Liviu Dudau <Liviu.Dudau at arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181005152423.GF1156@e110455-lin.cambridge.arm.com
commit 3ce36b4542b585ed0231b175aee31020b2f289c2
Author: Jordan Crouse <jcrouse at codeaurora.org>
Date: Fri Oct 5 14:06:05 2018 -0600
drm/msm/a6xx: Remove CP perfcounter selects from the protected list
The CP performance counter selects were accidentally marked as protected
so they couldn't be written from PM4 streams. Remove the protection
because user space does have an interest in setting up their own
counters.
Signed-off-by: Jordan Crouse <jcrouse at codeaurora.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 82e223a5d854e1f19f46a1a1ad3fae311f337c9a
Author: Sean Paul <seanpaul at chromium.org>
Date: Thu Oct 4 14:09:44 2018 -0400
drm/msm: dpu: Fix memory leak caused by dropped reference
We are currently leaking a drm_crtc_commit struct for every atomic
commit containing plane state. The dpu plane destroy function cleans up
the fb reference manually, but fails to release the commit ref. As a
result, we just keep allocating drm_crtc_commits without ever freeing
them. Fortunately there's a helper function which will clean up all of
our mess at once, so use that.
Thanks to Doug Anderson for reporting the memory leak (and leaving
breadcrumbs from kmemleak!).
Reported-by: Doug Anderson <dianders at chromium.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit f926a2e1718edc28f59f1079ebb6832532810587
Author: Sean Paul <seanpaul at chromium.org>
Date: Thu Oct 4 15:24:04 2018 -0400
drm/msm: a5xx: Fix improper u64 division
This patch uses the proper do_div() macro to perform u64 division and
guards against overflow if the result is too large for the unsigned long
return type
Fixes: de0a3d094de0 drm/msm: re-factor devfreq code
Cc: Sharat Masetty <smasetty at codeaurora.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit a69c5ed25d71c6342fbc6a52fb09b679456394e3
Author: Rob Clark <robdclark at gmail.com>
Date: Thu Oct 4 15:10:30 2018 -0400
drm/msm: update generated headers
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit fd99bd8b805c7c01af7dd66e22bb31c8cfe64310
Author: Liviu Dudau <Liviu.Dudau at arm.com>
Date: Fri Oct 5 13:30:48 2018 +0100
drm: malidp: Add the size of the superblocks when calculating total
size for AFBC buffers
The size of the superblocks being added to the total AFBC buffer size
got lost in the upstreaming process. Add it back.
Reviewed-by: Ayan Kumar Halder <ayan.halder at arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau at arm.com>
commit 8c1d1bb0f0bdebd174a6188ca345e44a03becda5
Author: Arnd Bergmann <arnd at arndb.de>
Date: Wed Sep 26 21:38:36 2018 +0200
drm/imx: fix build failure without CONFIG_DRM_FBDEV_EMULATION
The variable is declared in an #ifdef section, but the user is
now unconditional, which leads to a build failure:
drivers/gpu/drm/imx/imx-drm-core.c: In function 'imx_drm_bind':
drivers/gpu/drm/imx/imx-drm-core.c:264:6: error: 'legacyfb_depth' undeclared (first use in this function); did you mean 'lockdep_depth'?
Remove the remaining #ifdef as well.
Fixes: f53705fd9803 ("drm/imx: Use drm_fbdev_generic_setup()")
Signed-off-by: Arnd Bergmann <arnd at arndb.de>
Signed-off-by: Noralf Trønnes <noralf at tronnes.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20180926193846.2490574-1-arnd@arndb.de
commit a2c3c0a54d4cccb35e8071a11e203c4ac06f9e4e
Author: Sharat Masetty <smasetty at codeaurora.org>
Date: Thu Oct 4 15:11:43 2018 +0530
drm/msm/a6xx: Add devfreq support for a6xx
Implement routines to estimate GPU busy time and fetching the
current frequency for the polling interval. This is required by
the devfreq framework which recommends a frequency change if needed.
The driver code then tries to set this new frequency on the GPU by
sending an Out Of Band(OOB) request to the GMU.
Signed-off-by: Sharat Masetty <smasetty at codeaurora.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit de0a3d094de0858f091cf353c437e912ca41a506
Author: Sharat Masetty <smasetty at codeaurora.org>
Date: Thu Oct 4 15:11:42 2018 +0530
drm/msm: re-factor devfreq code
The devfreq framework requires the drivers to provide busy time estimations.
The GPU driver relies on the hardware performance counteres for the busy time
estimations, but different hardware revisions have counters which can be
sourced from different clocks. So the busy time estimation will be target
dependent. Additionally on targets where the clocks are completely controlled
by the on chip microcontroller, fetching and setting the current GPU frequency
will be different. This patch aims to embrace these differences by re-factoring
the devfreq code a bit.
Signed-off-by: Sharat Masetty <smasetty at codeaurora.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit c28aa2031f64701d4a1a78f97147e93fc5eb0c04
Author: Sharat Masetty <smasetty at codeaurora.org>
Date: Thu Oct 4 15:11:41 2018 +0530
drm/msm/a6xx: Add gmu_read64() register read op
Add a simple function to read 64 registers in the GMU domain
Signed-off-by: Sharat Masetty <smasetty at codeaurora.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit d3fa91c90931e6f3b26f7acbac84b44c6756fa08
Author: Sharat Masetty <smasetty at codeaurora.org>
Date: Thu Oct 4 15:11:40 2018 +0530
drm/msm: suspend devfreq on init
Devfreq turns on and starts recommending power level as soon as it is
initialized. The GPU is still not powered on by the time the devfreq
init happens and this leads to problems on GPU's where register access
is needed to get/set power levels. So we start suspended and only restart
devfreq when GPU is powered on.
Signed-off-by: Sharat Masetty <smasetty at codeaurora.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit bdacdcf20bb5373fb81ba842d36f0b41a7be69b1
Author: Jordan Crouse <jcrouse at codeaurora.org>
Date: Fri Sep 28 08:27:56 2018 -0600
drm/msm/a6xx: Add inactive_period for a6xx
The target definition for a630 didn't set a reasonable
value for inactive_period so it defaulted to zero and
we were essentially powering down after every submission.
Set it back to the default value to keep the GPU from
bouncing too much during regular workloads.
Signed-off-by: Jordan Crouse <jcrouse at codeaurora.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 4d8dc2dfae2c486b54bb082918a398a22b97cf85
Author: Thomas Zimmermann <tzimmermann at suse.de>
Date: Wed Sep 26 13:48:59 2018 +0200
drm/msm: Replace drm_dev_unref with drm_dev_put
This patch unifies the naming of DRM functions for reference counting
of struct drm_device. The resulting code is more aligned with the rest
of the Linux kernel interfaces.
Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 64686886bbffe47a0b390f2073364ca04f7c2c71
Author: Thomas Zimmermann <tzimmermann at suse.de>
Date: Wed Sep 26 13:48:58 2018 +0200
drm/msm: Replace drm_gem_object_{un/reference} with put, get functions
This patch unifies the naming of DRM functions for reference counting
of struct drm_gem_object. The resulting code is more aligned with the
rest of the Linux kernel interfaces.
Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
Reviewed-by: Jordan Crouse <jcrouse at codeaurora.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit f2152d492ca4ff6d53b37edf1a137480c909f6ce
Author: Thomas Zimmermann <tzimmermann at suse.de>
Date: Wed Sep 26 13:48:57 2018 +0200
drm/msm: Replace drm_framebuffer_{un/reference} with put, get functions
This patch unifies the naming of DRM functions for reference counting
of struct drm_framebuffer. The resulting code is more aligned with the
rest of the Linux kernel interfaces.
Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit df0dff132905974697e2a19aa8bcc0ecc447c00e
Author: Jordan Crouse <jcrouse at codeaurora.org>
Date: Thu Sep 20 17:04:43 2018 -0600
drm/msm/a6xx: Poll for HFI responses
The only HFI communication with the GMU on sdm845 happens
during initialization and all commands are synchronous. A fancy
interrupt tasklet and associated infrastructure is entirely
not eeded and puts us at the mercy of the scheduler.
Instead poll for the message signal and handle the response
immediately and go on our way.
Signed-off-by: Jordan Crouse <jcrouse at codeaurora.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 32aa27e15c28d3898ed6f9b3c98f95f34a81eab2
Author: Jordan Crouse <jcrouse at codeaurora.org>
Date: Fri Sep 14 09:03:46 2018 -0600
msm/gpu/a6xx: Force of_dma_configure to setup DMA for GMU
The point of the 'force_dma' parameter for of_dma_configure
is to force the device to be set up even if DMA capability is
not described by the firmware which is exactly the use case
we have for GMU - we need SMMU to get set up but we have no
other dma capabilities since memory is managed by the GPU
driver. Currently we pass false so of_dma_configure() fails
and subsequently GMU and GPU probe does as well.
Fixes: 4b565ca5a2c ("drm/msm: Add A6XX device support")
Signed-off-by: Jordan Crouse <jcrouse at codeaurora.org>
Tested-by: Sibi Sankar <sibis at codeaurora.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit fc6510ac4900db98851cabfd44a4a510b2d22db3
Author: Sharat Masetty <smasetty at codeaurora.org>
Date: Fri Sep 14 14:08:55 2018 +0530
drm/msm/a5xx: Skip hardware preemption init if no preemption
In the case where preemption is not enabled, this patch simply skips
preemption related initialization in hardware init sequence.
Signed-off-by: Sharat Masetty <smasetty at codeaurora.org>
Reviewed-by: Jordan Crouse <jcrouse at codeaurora.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit dfdb3be43ef1195c491e6c3760b922acb52e3575
Author: Colin Ian King <colin.king at canonical.com>
Date: Tue Aug 21 12:55:19 2018 +0100
drm/msm: fix unsigned comparison with less than zero
The return from the call to _mixer_stages can be a negative error
code however this is being assigned to an unsigned variable 'stages'
hence the check is always false. Fix this by making 'stages' an
int.
Detected by Coccinelle ("Unsigned expression compared with zero:
stages < 0")
Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support")
Signed-off-by: Colin Ian King <colin.king at canonical.com>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit f8fc924e088ef49da5ab99a227d176facf47c25c
Author: Jordan Crouse <jcrouse at codeaurora.org>
Date: Wed Aug 8 16:39:38 2018 -0600
drm/msm/a6xx: Fix PDC register overlap
The current design greedily takes a big chunk of the PDC
register space instead of just the GPU specific sections
which conflicts with other drivers and generally makes
a mess of things.
Furthermore we only need to map the GPU PDC sections
just once during init so map the memory inside the function
that uses it and adjust the pointers and register offsets
accordingly.
Signed-off-by: Jordan Crouse <jcrouse at codeaurora.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 06feed5618e7cb0b3bf3e279f029f8ce1b7ea0b9
Author: Jordan Crouse <jcrouse at codeaurora.org>
Date: Wed Aug 8 16:38:52 2018 -0600
drm/msm/a6xx: Rename gmu phandle to qcom,gmu
>From the review for the DT bindings for the GPU/GMU it
was suggested that the phandle for the GMU be
'qcom,gmu' instead of just 'gmu'.
Signed-off-by: Jordan Crouse <jcrouse at codeaurora.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 6969019f65b43afb6da6a26f1d9e55bbdfeebcd5
Author: Anders Roxell <anders.roxell at linaro.org>
Date: Tue Jul 31 22:45:32 2018 +0200
drm/msm/gpu: fix parameters in function msm_gpu_crashstate_capture
When CONFIG_DEV_COREDUMP isn't defined msm_gpu_crashstate_capture
doesn't pass the correct parameters.
drivers/gpu/drm/msm/msm_gpu.c: In function ‘recover_worker’:
drivers/gpu/drm/msm/msm_gpu.c:479:34: error: passing argument 2 of ‘msm_gpu_crashstate_capture’ from incompatible pointer type [-Werror=incompatible-pointer-types]
msm_gpu_crashstate_capture(gpu, submit, comm, cmd);
^~~~~~
drivers/gpu/drm/msm/msm_gpu.c:388:13: note: expected ‘char *’ but argument is of type ‘struct msm_gem_submit *’
static void msm_gpu_crashstate_capture(struct msm_gpu *gpu, char *comm,
^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/msm/msm_gpu.c:479:2: error: too many arguments to function ‘msm_gpu_crashstate_capture’
msm_gpu_crashstate_capture(gpu, submit, comm, cmd);
^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/msm/msm_gpu.c:388:13: note: declared here
static void msm_gpu_crashstate_capture(struct msm_gpu *gpu, char *comm,
In current code the function msm_gpu_crashstate_capture parameters.
Fixes: cdb95931dea3 ("drm/msm/gpu: Add the buffer objects from the submit to the crash dump")
Signed-off-by: Anders Roxell <anders.roxell at linaro.org>
Reviewed-By: Jordan Crouse <jcrouse at codeaurora.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 9fb4bfd0be010371d3fdd2280e9d99f315382379
Author: Sharat Masetty <smasetty at codeaurora.org>
Date: Thu Sep 27 22:16:22 2018 +0530
drm/msm/a6xx: Send the right perf index value to GMU
The index of the perf table was being set in the wrong bit position
in the register. With this fix, the GPU clock can be seen running at
desired frequency.
Signed-off-by: Sharat Masetty <smasetty at codeaurora.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit b689a830f5264e3a53307ba468e376e9f95f15e0
Author: Rob Clark <robdclark at gmail.com>
Date: Tue Sep 25 13:54:00 2018 -0400
drm/msm/rd: fix crash with long process cmdlines
The [v]snprintf() functions return the size that *would have* been
written into the buffer, rather than the size *actually* written.
Which results in us trying to memcpy() past the end of the stack.
What we really want is [v]scnprintf().
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 9027b8719bd4f46b09c6b9d082715209c17971e2
Author: Sean Paul <seanpaul at chromium.org>
Date: Mon Sep 17 16:49:32 2018 -0400
drm/msm: dpu: Don't reset dpu_enc->cur_master on .disable()
cur_master in dpu_encoder is assigned at modeset and cleared on
.disable(). Unfortunately dpms (or enable/disable) does not guarantee a
modeset, so cur_master is NULL when we try to re-enable it.
This patch moves the NULL assignment to setup_display where it will be
re-assigned later in the function.
Tested-by: Bruce Wang <bzwang at chromium.org>
Reviewed-by: Jeykumar Sankaran <jsanka at codeaurora.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 8527b2d836571c20c9ed0934668595f9bba8175e
Author: Bruce Wang <bzwang at chromium.org>
Date: Tue Sep 25 17:10:25 2018 -0400
drm/msm/dpu: Revise _dpu_plane_get_aspace
Remove unneeded checks from _dpu_plane_get_aspace.
v3: change _dpu_plane_get_aspace to return a struct
*msm_gem_address_space instead passing in a pointer of the same
type to edit. Remove uneeded arguments.
Reviewed-by: Jordan Crouse <jcrouse at codeaurora.org>
Signed-off-by: Bruce Wang <bzwang at chromium.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 7b2e7adea732c68ae8bb3d232aacd9a6d4937585
Author: Bruce Wang <bzwang at chromium.org>
Date: Mon Sep 24 12:22:27 2018 -0400
drm/msm/dpu: Make dpu_plane_danger_signal_ctrl void
Removed all impossible checks from the function, which eliminates
the need for a return value. This function is also never used
outside of dpu_plane.c, so the function is made static.
v3: Using helper function _dpu_plane_get_kms() instead of doing
it locally.
Signed-off-by: Bruce Wang <bzwang at chromium.org>
Reviewed-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 1da03408e256435492bd33675aaa703699df37f1
Author: Bruce Wang <bzwang at chromium.org>
Date: Mon Sep 24 12:22:26 2018 -0400
drm/msm/dpu: Change _dpu_crtc_vblank_enable_no_lock to void
Removes redundant tests for _dpu_crtc_vblank_enable_no_lock.
Function return type is now void and all function calls have
been changed accordingly.
Signed-off-by: Bruce Wang <bzwang at chromium.org>
Reviewed-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 9a9ede3f719379c4edc7dcc60b00f44db77b9b74
Author: Bruce Wang <bzwang at chromium.org>
Date: Wed Sep 26 17:28:59 2018 -0400
drm/msm/dpu: Remove _dpu_crtc_power_enable
All checks for _dpu_crtc_power_enable are not true, so the function
can never return an error code. This removes the need for the
function as pm_runtime functions can be used instead.
v3: Separated _dpu_crtc_power_enable into _dpu_crtc_power_enable and
_dpu_crtc_power_disable for clarity.
v4: Removed both _dpu_crtc_power_enable and _dpu_crtc_power_disable
and called pm_runtime_get_sync and pm_runtime_put_sync from all
call points
Reviewed-by: Jordan Crouse <jcrouse at codeaurora.org>
Signed-off-by: Bruce Wang <bzwang at chromium.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 04b96b63c5640a305e30611def7a9c5fcd7a72cf
Author: Bruce Wang <bzwang at chromium.org>
Date: Mon Sep 24 12:22:24 2018 -0400
drm/msm/dpu: Remove unneeded checks in dpu_crtc.c
Removes impossible checks in dpu_crtc.c.
Variable assignments are moved up to be initializations where
possible. Some variables are no longer used, these are removed.
v3: reverted back to original patch
Reviewed-by: Sean Paul <seanpaul at chromium.org>
Reviewed-by: Jordan Crouse <jcrouse at codeaurora.org>
Signed-off-by: Bruce Wang <bzwang at chromium.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit ad444e55303c605d0d23b9b2a012a4e0c584834a
Author: Bruce Wang <bzwang at chromium.org>
Date: Mon Sep 24 12:22:23 2018 -0400
drm/msm/dpu: Clean up plane atomic disable/update
Removes unnecessary checks from dpu_plane_atomic_disable, old_state
argument for both dpu_plane_atomic_disable and
dpu_plane_sspp_atomic_update is removed as it is no longer used.
Reviewed-by: Sean Paul <seanpaul at chromium.org>
Reviewed-by: Jordan Crouse <jcrouse at codeaurora.org>
Signed-off-by: Bruce Wang <bzwang at chromium.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 1bd5a13b7986da7273eb26f117760b8331265e3b
Author: Bruce Wang <bzwang at chromium.org>
Date: Mon Sep 24 12:22:22 2018 -0400
drm/msm/dpu: Remove unneeded checks in dpu_plane.c
Removes some checks from dpu_plane.c that will never result in an error.
Subsequent variable assignments become part of the initialization wherever
possible. Unused variables are removed.
v3: removed additional impossible checks and called helper function
_dpu_plane_get_kms() where possible.
Reviewed-by: Sean Paul <seanpaul at chromium.org>
Reviewed-by: Jordan Crouse <jcrouse at codeaurora.org>
Signed-off-by: Bruce Wang <bzwang at chromium.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit f65f035f197175ebebf002bcaad8974582c372f2
Author: Sean Paul <seanpaul at chromium.org>
Date: Wed Sep 19 14:33:50 2018 -0400
drm/msm: dpu: Don't store/deref pointers in trace ringbuffer
TP_printk is not synchronous, so storing pointers and then later
dereferencing them is a Bad Idea. This patch stores everything locally to
avoid display stomped memory.
Reviewed-by: Abhinav Kumar <abhinavk at codeaurora.org>
[seanpaul fixed up commit msg typo on apply]
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 1bb4e701aad10a57bcab41e1996570c881aa6be7
Author: Sean Paul <seanpaul at chromium.org>
Date: Wed Sep 19 14:33:49 2018 -0400
drm/msm: dpu: Add extra_flush_bits to trigger_flush trace
It's useful to know which bits of the flush come from extra_flush_bits
Reviewed-by: Abhinav Kumar <abhinavk at codeaurora.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit b65bd0454258b07d4f6db9aa1eca55ae530c4802
Author: Sean Paul <seanpaul at chromium.org>
Date: Wed Sep 19 14:33:48 2018 -0400
drm/msm: dpu: Clear frame_busy_mask bit after trace
We're printing the frame_busy_mask in a trace, but after it's been
cleared. This, as it turns out, is pretty pointless.
Reviewed-by: Abhinav Kumar <abhinavk at codeaurora.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 5923005d6a62567a59db1ec3cffc317d46a25143
Author: Sean Paul <seanpaul at chromium.org>
Date: Wed Sep 12 09:54:59 2018 -0400
drm/msm: dpu: Don't continue after error in atomic_check
There's no benefit in falling out of the if, just return directly.
Changes in v2:
- None
Reviewed-by: Jeykumar Sankaran <jsanka at codeaurora.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 2682cefea4c8078adeba4d74b7286e38fb631208
Author: Sean Paul <seanpaul at chromium.org>
Date: Wed Sep 12 09:54:58 2018 -0400
drm/msm: dpu: Make dpu_plane_sspp_atomic_update() void
All of the checks in dpu_plane_sspp_atomic_update() are impossible, so
remove them and make the function void. This removes the need to error
check in dpu_plane_atomic_update(). Additionally, remove impossible checks
in dpu_plane_atomic_update().
Changes in v2:
- None
Reviewed-by: Jeykumar Sankaran <jsanka at codeaurora.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit e1ba78fcee04de09f5da309600af8a6eb1086387
Author: Sean Paul <seanpaul at chromium.org>
Date: Wed Sep 12 09:54:57 2018 -0400
drm/msm: dpu: Remove dpu_plane_enabled()
plane->state->visible encompasses all of these checks and more, so we
can just check visible.
Changes in v2:
- None
Reviewed-by: Jeykumar Sankaran <jsanka at codeaurora.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 31ab6bff07c47c1cee4aa8d0962fdd8229d9873c
Author: Sean Paul <seanpaul at chromium.org>
Date: Wed Sep 12 09:54:56 2018 -0400
drm/msm: dpu: Remove dpu_plane_sspp_enabled()
It's doing the same thing dpu_plane_enabled() is.
Changes in v2:
- None
Reviewed-by: Jeykumar Sankaran <jsanka at codeaurora.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 2a7a92fc31c2c02d0d06fbcf178403cd5889f59b
Author: Sean Paul <seanpaul at chromium.org>
Date: Wed Sep 12 09:54:55 2018 -0400
drm/msm: dpu: Consolidate atomic_check functions()
dpu_plane_atomic_check() is a very thin wrapper around
dpu_plane_sspp_atomic_check(). All it does is a NULL-check of state->fb,
which is already done by drm_atomic_helper_check_plane_state(). Further,
the helper sets state->visible = false when this is true. So remove
dpu_plane_atomic_check() and just use dpu_plane_sspp_atomic_check()
directly.
Changes in v2:
- Fix spelling mistake in Subject (Jeykumar)
Reviewed-by: Jeykumar Sankaran <jsanka at codeaurora.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 8df14b3e6ab367bdd939d52871ad80faf70ae8db
Author: Sean Paul <seanpaul at chromium.org>
Date: Wed Sep 12 09:54:54 2018 -0400
drm/msm: dpu: Move atomic_check_plane_state() call to atomic_check
src/dst rects are checked in both atomic_check and atomic_update, with
the more comprehensive check occurring in atomic_update, which is
backwards. So consolodate the checks in atomic_check.
Changes in v2:
- Use the correct crtc state (Jeykumar)
Cc: Jeykumar Sankaran <jsanka at codeaurora.org>
Reviewed-by: Jeykumar Sankaran <jsanka at codeaurora.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 3d04dc1444be774d8b474962d01b65306756ec54
Author: Sean Paul <seanpaul at chromium.org>
Date: Wed Sep 12 09:54:53 2018 -0400
drm/msm: dpu: Remove impossible checks
This patch removes some checks which are impossible to hit. As a result,
we can move some of the local var assignments into the declarations.
Changes in v2:
- None
Reviewed-by: Jeykumar Sankaran <jsanka at codeaurora.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit a8141bdbb4c90d41b41005c664fb1b35d29a1b54
Author: Jordan Crouse <jcrouse at codeaurora.org>
Date: Thu Sep 13 10:46:15 2018 -0600
drm/msm/dpu: Remove an unused enum
enum dpu_ad isn't used and can be safely removed.
Reviewed-by: Jeykumar Sankaran <jsanka at codeaurora.org>
Signed-off-by: Jordan Crouse <jcrouse at codeaurora.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit ad92af7ec4c89dce1538a73f0741ac134b50bb12
Author: Jeykumar Sankaran <jsanka at codeaurora.org>
Date: Fri Sep 7 17:24:27 2018 -0700
drm/msm/dpu: remove RM topology definition
RM maintained a redundant definition for display topology
to identify the no. of hw blocks needed for a display
and their hardware dependencies. This information can be
implicitly deduced from the msm_display_topology structure
available in RM reserve request. In addition to getting
rid of the redundant topology, this change also removes
the topology name enums and their usages.
changes in v4:
- remove the topology name enum entirely (Sean)
changes in v5:
- remove RM topology definition and their
references (Sean)
- Implement helper for dual mixer CRTC (Sean)
changes in v6:
- avoid heap memory for topology (Sean)
Signed-off-by: Jeykumar Sankaran <jsanka at codeaurora.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 157b9ce7f12d788eec7aef33738e054624d40a8a
Author: Jeykumar Sankaran <jsanka at codeaurora.org>
Date: Fri Sep 7 17:24:26 2018 -0700
drm/msm/dpu: relax parameter validation in encoders
DPU, being over protective, validates every parameter of a
module. This change traces the call stack for some of encoder
functions affected by previous set of clean up patches and
cleans up unwanted validations.
changes in v5:
- Introduced in the series
changes in v6:
- none
Signed-off-by: Jeykumar Sankaran <jsanka at codeaurora.org>
Reviewed-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 32ecf92a3d0106d83478c223beb927bef2ab6df7
Author: Jeykumar Sankaran <jsanka at codeaurora.org>
Date: Fri Sep 7 17:24:25 2018 -0700
drm/msm/dpu: remove RM dependency on connector state
Connector states were passed around RM to update the custom
topology connector property with chosen topology data. Now that
we got rid of both custom properties and topology names, this
change cleans up the mechanism to pass connector states across
RM helpers and encoder functions.
changes in v5:
- Introduced in the series
changes in v6:
- remove parameter checking in rm reserve (Jordan)
Signed-off-by: Jeykumar Sankaran <jsanka at codeaurora.org>
Reviewed-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit d0a1381612e0822e893dec6b242be2455c5ffb6d
Author: Jeykumar Sankaran <jsanka at codeaurora.org>
Date: Wed Sep 5 19:08:25 2018 -0700
drm/msm/dpu: remove display H_TILE from encoder
Encoder H_TILE values are not used for allocating the hw blocks.
no. of hw_intf blocks provides the info.
changes in v4:
- remove irrelevant changes (Sean)
- retain log macros (Sean)
changes in v5:
- none
Signed-off-by: Jeykumar Sankaran <jsanka at codeaurora.org>
Reviewed-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 4a0dc640c550ebf8acddbc3c614f96da2cfdd7fb
Author: Jeykumar Sankaran <jsanka at codeaurora.org>
Date: Wed Sep 5 19:08:24 2018 -0700
drm/msm/dpu: remove LOCK/CLEAR support in RM
DPU had the support to LOCK the hw resources in
atomic check and CLEAR the locked resources explicitly
through custom property values. Now that DPU is
stripped off of all the custom properties, the RM
handlers for this feature will be no-op's. This change
gets rid of all its references.
changes in v5:
- Introduced in the series.
Signed-off-by: Jeykumar Sankaran <jsanka at codeaurora.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 9816b2266567a075c9dbe97858334c17fd7303b7
Author: Jeykumar Sankaran <jsanka at codeaurora.org>
Date: Wed Sep 5 19:08:23 2018 -0700
drm/msm/dpu: remove cdm block support from resource manager
Support for CDM block is not present in DPU. Remove CDM
handlers from resource manager.
changes in v4:
- Introduced in the series
changes in v5:
- Remove catalog references to CDM (Sean)
Signed-off-by: Jeykumar Sankaran <jsanka at codeaurora.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit b033def8741aab3fb58e4bf6c1d5cd73b3beb357
Author: Jeykumar Sankaran <jsanka at codeaurora.org>
Date: Wed Sep 5 19:08:22 2018 -0700
drm/msm/dpu: clean up destination scaler residue
Destination scaling(DS) is a Snapdragon hardware feature to
scale up the display ROI after layer blending. DPU driver doesn't
support programming of DS blocks yet. This change cleans up the
residual code present in catalog and RM for DS block handling.
Support for the same can be added back when the feature is
formally implemented.
changes in v5:
- introduced in the series
Signed-off-by: Jeykumar Sankaran <jsanka at codeaurora.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit cf6916f461475bde76ecf4dfb0dc4d38bec579ef
Author: Jeykumar Sankaran <jsanka at codeaurora.org>
Date: Wed Sep 5 19:08:21 2018 -0700
drm/msm/dpu: rename hw_ctl to lm_ctl
Rename hw_ctl to lm_ctl to mean the ctl associated
with the hw layer mixer block.
sed -i 's/\([*@.>]\)hw_ctl\([^s]\)/\1lm_ctl\2/g' dpu_crtc.c dpu_crtc.h
changes in v4:
- Specifiy shell command used for renaming (Sean)
changes in v5:
- none
Signed-off-by: Jeykumar Sankaran <jsanka at codeaurora.org>
Reviewed-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 9222cdd27e823cacac23fce7548413eebdaf0eb7
Author: Jeykumar Sankaran <jsanka at codeaurora.org>
Date: Wed Sep 5 19:08:20 2018 -0700
drm/msm/dpu: move hw resource tracking to crtc state
Prep changes for state based resource management.
Moves all the hw block tracking for the crtc to the state
object.
changes in v4:
- Serialize crtc state access in debugfs handlers (Sean)
- Split the crtc width query as a separate change (Sean)
changes in v5:
- mode set lock all before crtc state access (Sean)
- remove unwanted memset for hw mixer cache (Sean)
Signed-off-by: Jeykumar Sankaran <jsanka at codeaurora.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 42331668786f5f65e90efb485a686fe456c04131
Author: Jeykumar Sankaran <jsanka at codeaurora.org>
Date: Wed Sep 5 19:08:19 2018 -0700
drm/msm/dpu: make crtc get_mixer_width helper static
Mark CRTC get_mixer_width helper API static as it is
not used outside the file.
changes in v4:
- Patch introduced in the series
changes in v5:
- Simplify the inline function (Sean)
Signed-off-by: Jeykumar Sankaran <jsanka at codeaurora.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 906216baa0a81a6bae17f8b7616757eeed3e44fa
Author: Jeykumar Sankaran <jsanka at codeaurora.org>
Date: Wed Sep 5 19:08:18 2018 -0700
drm/msm/dpu: avoid querying for hw intf before assignment
Resource manager assigns hw_intf blocks for the encoder only on
modeset. If queried for hw_intf objects during init, it will be
NULL. Since hw_intf objects are needed only after encoder enable,
defer the query to encoder enable which will be triggered after
modeset.
changes in v4:
- Add details on commit text on why the change is needed (Sean)
changes in v5:
- Reword commit text on the usage of hw_intf objects (Sean)
Signed-off-by: Jeykumar Sankaran <jsanka at codeaurora.org>
Reviewed-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 3f4db2e2cc412811697a784d6e42759fe9ea974d
Author: Jeykumar Sankaran <jsanka at codeaurora.org>
Date: Wed Sep 5 19:08:17 2018 -0700
drm/msm/dpu: iterate for assigned hw ctl in virtual encoder
In virtual encoder modeset, DPU makes RM request to assign hw blocks
for the display. It is also expected in modeset to iterate and
associate the physical encoders with their relevant hw blocks.
Ping pong blocks are already handled here but hw ctl blocks are not.
This change moves the hw_ctl iteration and mapping from physical
encoder to virtual encoder.
changes in v4:
- Fix hw_ctl initialization (Sean)
changes in v5:
- Update commit text with details on why the change is
needed (Sean)
Signed-off-by: Jeykumar Sankaran <jsanka at codeaurora.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 57250ca5433306774e7f83b11503609ed1bf28cf
Author: Jeykumar Sankaran <jsanka at codeaurora.org>
Date: Wed Sep 5 19:08:16 2018 -0700
drm/msm/dpu: use kms stored hw mdp block
Avoid querying RM for hw mdp block. Use the one
stored in KMS during initialization.
changes in v4:
- none
changes in v5:
- none
Signed-off-by: Jeykumar Sankaran <jsanka at codeaurora.org>
Reviewed-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 86b89080368b4695909bd9d06de3b8a85518aadb
Author: Jeykumar Sankaran <jsanka at codeaurora.org>
Date: Wed Sep 5 19:08:15 2018 -0700
drm/msm/dpu: enable master-slave encoders explicitly
Identify slave-master encoders during initialization and enable
the encoders explicitly as the current logic has redundant and
ambiguous loops.
changes in v4:
- identify master/slave encoder while adding
adding physical encoders(Sean)
changes in v5:
- get rid of temporary variable for phys enc(Sean)
Signed-off-by: Jeykumar Sankaran <jsanka at codeaurora.org>
Reviewed-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit cb307ba34026d34592789b37e2c34f36c8e97f21
Author: Jeykumar Sankaran <jsanka at codeaurora.org>
Date: Wed Sep 5 19:08:14 2018 -0700
drm/msm/dpu: remove ping pong split topology variables
removes left out variables of previous ping pong
split topology cleanup.
changes in v4:
- none
changes in v5:
- none
Signed-off-by: Jeykumar Sankaran <jsanka at codeaurora.org>
Reviewed-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 726bcbb7d615334bff509a079456cbaf0736baed
Author: Jeykumar Sankaran <jsanka at codeaurora.org>
Date: Wed Sep 5 19:08:13 2018 -0700
drm/msm/dpu: remove resource pool manager
resource pool manager utility was introduced to manage
rotator sessions. Removing the support as the rotator
feature doesn't exist.
changes in v4:
- none
changes in v5:
- none
Signed-off-by: Jeykumar Sankaran <jsanka at codeaurora.org>
Reviewed-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit a9a0a61af8067e284b47042ba611689a4a26d8d3
Author: Jeykumar Sankaran <jsanka at codeaurora.org>
Date: Wed Sep 5 19:08:12 2018 -0700
drm/msm/dpu: remove scalar config definitions
cleans up left out scalar config definitions from headers
changes in v4:
- none
changes in v5:
- none
Signed-off-by: Jeykumar Sankaran <jsanka at codeaurora.org>
Reviewed-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit a41a8ccc12441299621a8e049bfc51c64dfaaba1
Author: Jeykumar Sankaran <jsanka at codeaurora.org>
Date: Wed Sep 5 19:08:11 2018 -0700
drm/msm/dpu: squash power handle event types
DPU power handler maintained PRE/POST versions of power
ENABLE/DISABLE events to accommodate tasks which need be
handled before/after data bus voting. But since the bus voting
API's are deprecated and removed from the driver, squash
the events and their clients respective event handlers
to handle only ENABLE/DISABLE events.
changes in v5:
- introduced in the series
Signed-off-by: Jeykumar Sankaran <jsanka at codeaurora.org>
[seanpaul converted #defines to BIT(x) in dpu_power_handle.h]
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit ad8e5c2d7729e2a6f0b5ce3c0e90ab68c40156b8
Author: Jeykumar Sankaran <jsanka at codeaurora.org>
Date: Wed Sep 5 19:08:10 2018 -0700
drm/msm/dpu: remove debugfs support for misr
MISR support is the debug feature present in Snapdragon chipsets.
At the layer mixer and interfaces, MISR algorithm can generate CRC
signatures of the pixel data which can be used for validating
the frames generated. Since there are no clients for this feature,
strip down the support from the driver.
changes in v4:
- changed introduced in the series
changes in v5:
- update commit text with the need for the change(Sean)
Signed-off-by: Jeykumar Sankaran <jsanka at codeaurora.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit d270bdf41e4ac05f16c53482a5769819b040806f
Author: Jordan Crouse <jcrouse at codeaurora.org>
Date: Tue Aug 28 15:23:04 2018 -0600
drm/msm/dpu: Remove dpu_mdss_isr when dpu_mdss_destroy is called
The MDSS device is created before the MSM driver attempts to bind the
sub components. If any of the components return -EPROBE_DEFER the MDSS
device is destroyed and tried again later.
If this happens the dpu_mdss_isr interrupt created from the DPU MDSS
is not freed when the MDSS device is destroyed and has a risk of
triggering later and hitting a fault by accessing a mmio region that
no longer exists. Even if the interrupt isn't triggered by
accident when the device attempts to reprobe it would error out
when it tries to re-register the interrupt so unconditionally removing
it in the destroy is the right move.
Switch the device managed dpu_mdss_isr to be unmanaged and add a
free_irq() in the mdss destroy function.
Reviewed-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Jordan Crouse <jcrouse at codeaurora.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 96fc56a775c1e44c0e3c0119f2cd3d77431c4569
Author: Sean Paul <seanpaul at chromium.org>
Date: Wed Aug 29 13:49:47 2018 -0400
drm/msm: dpu: Allow planes to extend past active display
The atomic_check is a bit too aggressive with respect to planes which
leave the active area. This caused a bunch of log spew when the cursor
got to the edge of the screen and stopped it from going all the way.
This patch removes the conservative bounds checks from atomic and clips
the dst rect such that we properly display planes which go off the
screen.
Changes in v2:
- Apply the clip to src as well (taking into account scaling)
Changes in v3:
- Use drm_atomic_helper_check_plane_state() to clip src/dst
Cc: Sravanthi Kollukuduru <skolluku at codeaurora.org>
Cc: Jeykumar Sankaran <jsanka at codeaurora.org>
Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
Reviewed-by: Jeykumar Sankaran <jsanka at codeaurora.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 1e53ac9280a0ac48ea1024a9d02bc08e3220d842
Author: Jeykumar Sankaran <jsanka at codeaurora.org>
Date: Tue Aug 28 16:02:18 2018 -0700
drm/msm/dpu: use encoder type to identify display type
With patch [1], DPU is broken since it continues to use
incorrect connector_type to identify the display type. Update
DPU to use the encoder type to get the info.
[1] https://patchwork.kernel.org/patch/10568269/
Acked-by: Jordan Crouse <jcrouse at codeaurora.org>
Signed-off-by: Jeykumar Sankaran <jsanka at codeaurora.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 48a8ef7209dba19b9932b375841ea21a69c4c0e2
Author: Jeykumar Sankaran <jsanka at codeaurora.org>
Date: Tue Aug 28 16:02:17 2018 -0700
drm/msm/dpu: remove unwanted encoder type mapping
This change gets rid of unwanted connector-encoder type
mapping used for dsi-staging driver. Now that DPU will
be using upstream DSI driver, remove the stale code.
Signed-off-by: Jeykumar Sankaran <jsanka at codeaurora.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit a2b4ae2924025f64fc619aa69bd260c6b40c2013
Author: Jeykumar Sankaran <jsanka at codeaurora.org>
Date: Tue Aug 28 16:02:16 2018 -0700
drm/msm/dpu: remove stale display port programming
Remove stale display port programming. It can be
added back with DPU support for display port.
Signed-off-by: Jeykumar Sankaran <jsanka at codeaurora.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 74593a28c221246bc59a34fbad5e14134a93fc6a
Author: Sravanthi Kollukuduru <skolluku at codeaurora.org>
Date: Wed Aug 22 23:19:57 2018 +0530
drm/msm/dpu: fix for cursor blend issue
The current driver has the opaque blend mode set as the
default causing the black box effect around the cursor.
The fix enables choosing a different blend mode for alpha
enabled formats.
Changes in V2:
- Use drm_get_format_name() in the logs (Sean)
Signed-off-by: Sravanthi Kollukuduru <skolluku at codeaurora.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 07ca1fc0f8a09b9c920002d5c36378a2ddefe37c
Author: Sravanthi Kollukuduru <skolluku at codeaurora.org>
Date: Wed Aug 22 23:19:56 2018 +0530
drm/msm/dpu: enable cursor plane on dpu
Reserve DMA pipe for cursor plane and attach it to the
crtc during the initialization.
Changes in V2:
None
Signed-off-by: Sravanthi Kollukuduru <skolluku at codeaurora.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 2c043eeffea4813b8f569e84b46035a08de5eb47
Author: Stephen Boyd <swboyd at chromium.org>
Date: Thu Aug 16 16:36:16 2018 -0700
drm/msm/disp/dpu: Use proper define for drm_encoder_init() 'encoder_type'
We got a bug report that this function oopses when trying to do a kasprintf().
PC is at string+0x2c/0x60
LR is at vsnprintf+0x28c/0x4ec
pc : [<ffffff80088d35d8>] lr : [<ffffff80088d5fc4>] pstate: a0c00049
sp : ffffff80095fb540
x29: ffffff80095fb540 x28: ffffff8008ad42bc
x27: 00000000ffffffd8 x26: 0000000000000000
x25: ffffff8008c216c8 x24: 0000000000000000
x23: 0000000000000000 x22: ffffff80095fb720
x21: 0000000000000000 x20: ffffff80095fb720
x19: ffffff80095fb6f0 x18: 000000000000000a
x17: 00000000b42ba473 x16: ffffff800805bbe8
x15: 00000000000a157d x14: 000000000000000c
x13: 0000000000000000 x12: 0000ffff0000000f
x11: 0000000000000003 x10: 0000000000000001
x9 : 0000000000000040 x8 : 000000000000001c
x7 : ffffffffffffffff x6 : 0000000000000000
x5 : 0000000000000228 x4 : 0000000000000000
x3 : ffff0a00ffffff04 x2 : 0000000000007961
x1 : 0000000000000000 x0 : 0000000000000000
Process kworker/3:1 (pid: 61, stack limit = 0xffffff80095f8000)
Call trace:
Exception stack(0xffffff80095fb400 to 0xffffff80095fb540)
b400: 0000000000000000 0000000000000000 0000000000007961 ffff0a00ffffff04
b420: 0000000000000000 0000000000000228 0000000000000000 ffffffffffffffff
b440: 000000000000001c 0000000000000040 0000000000000001 0000000000000003
b460: 0000ffff0000000f 0000000000000000 000000000000000c 00000000000a157d
b480: ffffff800805bbe8 00000000b42ba473 000000000000000a ffffff80095fb6f0
b4a0: ffffff80095fb720 0000000000000000 ffffff80095fb720 0000000000000000
b4c0: 0000000000000000 ffffff8008c216c8 0000000000000000 00000000ffffffd8
b4e0: ffffff8008ad42bc ffffff80095fb540 ffffff80088d5fc4 ffffff80095fb540
b500: ffffff80088d35d8 00000000a0c00049 ffffff80095fb550 ffffff80080d06a4
b520: ffffffffffffffff ffffff80088d5e0c ffffff80095fb540 ffffff80088d35d8
[<ffffff80088d35d8>] string+0x2c/0x60
[<ffffff80088d5fc4>] vsnprintf+0x28c/0x4ec
[<ffffff80083973b8>] kvasprintf+0x68/0x100
[<ffffff800839755c>] kasprintf+0x60/0x80
[<ffffff800849cc24>] drm_encoder_init+0x134/0x164
[<ffffff80084d9a7c>] dpu_encoder_init+0x60/0x94
[<ffffff80084eced0>] _dpu_kms_drm_obj_init+0xa0/0x424
[<ffffff80084ed870>] dpu_kms_hw_init+0x61c/0x6bc
[<ffffff80084f7614>] msm_drm_bind+0x380/0x67c
[<ffffff80085114e4>] try_to_bring_up_master+0x228/0x264
[<ffffff80085116e8>] component_master_add_with_match+0x90/0xc0
[<ffffff80084f722c>] msm_pdev_probe+0x260/0x2c8
[<ffffff800851a910>] platform_drv_probe+0x58/0xa8
[<ffffff80085185c8>] driver_probe_device+0x2d8/0x40c
[<ffffff8008518928>] __device_attach_driver+0xd4/0x10c
[<ffffff800851644c>] bus_for_each_drv+0xb4/0xd0
[<ffffff8008518230>] __device_attach+0xd0/0x160
[<ffffff8008518984>] device_initial_probe+0x24/0x30
[<ffffff800851744c>] bus_probe_device+0x38/0x98
[<ffffff8008517aac>] deferred_probe_work_func+0x144/0x148
[<ffffff80080c8654>] process_one_work+0x218/0x3bc
[<ffffff80080c883c>] process_scheduled_works+0x44/0x48
[<ffffff80080c95bc>] worker_thread+0x288/0x32c
[<ffffff80080cea30>] kthread+0x134/0x13c
[<ffffff8008084750>] ret_from_fork+0x10/0x18
Code: 910003fd 2a0403e6 eb0400ff 54000060 (38646845)
Looking at the code I see that drm_encoder_init() is called from the DPU
code with 'DRM_MODE_CONNECTOR_DSI' passed in as the 'encoder_type'
argument (follow from _dpu_kms_initialize_dsi()). That corresponds to
the integer 16. That is then indexed into drm_encoder_enum_list in
drm_encoder_init() to look up the name of the encoder. If you're still
following along, that's an encoder not a connector! We really want to
use DRM_MODE_ENCODER_DSI (integer 6) instead of DRM_MODE_CONNECTOR_DSI
here, or we'll go out of bounds of the encoder array. Pass the right
thing and everything is fine.
Cc: Jeykumar Sankaran <jsanka at codeaurora.org>
Cc: Jordan Crouse <jcrouse at codeaurora.org>
Cc: Sean Paul <seanpaul at chromium.org>
Fixes: 25fdd5933e4c (drm/msm: Add SDM845 DPU support)
Tested-by: Sai Prakash Ranjan <saiprakash.ranjan at codeaurora.org>
Reviewed-by: Jeykumar Sankaran <jsanka at codeaurora.org>
Signed-off-by: Stephen Boyd <swboyd at chromium.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 9888495a14a80a0a229e13c293592da559c51e64
Author: Sean Paul <seanpaul at chromium.org>
Date: Mon Jul 30 11:26:55 2018 -0400
drm/msm: Don't fail bind if nothing connected to dsi
If there is no bridge or panel connected to a dsi node, don't fail the
entire msm bind. Just ignore the dsi block and move on.
Cc: Doug Anderson <dianders at chromium.org>
Reviewed-by: Abhinav Kumar <abhinavk at codeaurora.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit feb085ec8a3dc186ed1e5e642b6568297c01cc4a
Author: Sean Paul <seanpaul at chromium.org>
Date: Mon Jul 30 11:26:54 2018 -0400
drm/msm: dsi: Return errors whan dt parsing fails
If dt parsing fails, we should return an error instead of pretending
everything completed successfully.
Cc: Doug Anderson <dianders at chromium.org>
Reviewed-by: Abhinav Kumar <abhinavk at codeaurora.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit aea24171c85edbff1e021016e8ea1bf64b89a4f8
Author: Sean Paul <seanpaul at chromium.org>
Date: Mon Jul 30 11:26:53 2018 -0400
drm/msm: dsi: Initialize msm_dsi->id to -1
Currently msm_dsi->id is initialized to 0 during kzalloc. If bind fails
for a secondary dsi device before its id can be properly set (such as
during dt parsing), the id will point to the primary dsi device, causing
its reference to be removed from dsi_manager's global (msm_dsim_glb)
array.
This patch initializes the id to -1 and checks for negative in the
manager cleanup.
Cc: Doug Anderson <dianders at chromium.org>
Reviewed-by: Abhinav Kumar <abhinavk at codeaurora.org>
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Signed-off-by: Rob Clark <robdclark at gmail.com>
commit 84dacb9cad2804a9f5434b775ccea6aa5d9fc6ca
Author: Bibby Hsieh <bibby.hsieh at mediatek.com>
Date: Wed Oct 3 11:41:51 2018 +0800
drm/mediatek: add a error return value when clock driver has been prepared
DRM driver get the comp->clk by of_clk_get(), we only
assign NULL to comp->clk when error happened, but do
not return the error number.
Signed-off-by: Bibby Hsieh <bibby.hsieh at mediatek.com>
Signed-off-by: CK Hu <ck.hu at mediatek.com>
commit 014e604196bddbd3a0186775e02bc5574bed18d4
Author: Bibby Hsieh <bibby.hsieh at mediatek.com>
Date: Wed Oct 3 11:41:50 2018 +0800
drm/mediatek: implement connection from BLS to DPI0
Modify display driver to support connection from BLS to DPI.
Signed-off-by: Bibby Hsieh <bibby.hsieh at mediatek.com>
Signed-off-by: CK Hu <ck.hu at mediatek.com>
commit 0fc721b2968e3cadec520c60d2fc63498d865055
Author: chunhui dai <chunhui.dai at mediatek.com>
Date: Wed Oct 3 11:41:49 2018 +0800
drm/mediatek: add hdmi driver for MT2701 and MT7623
This patch adds hdmi dirver suppot for both MT2701 and MT7623.
And also support other (existing or future) chips that use
the same binding and driver.
Signed-off-by: chunhui dai <chunhui.dai at mediatek.com>
Signed-off-by: CK Hu <ck.hu at mediatek.com>
commit d1ef028d95ffd0f114f2d42ef4f141664abbf1f6
Author: chunhui dai <chunhui.dai at mediatek.com>
Date: Wed Oct 3 11:41:48 2018 +0800
drm/mediatek: add support for SPDIF audio in HDMI
add support for SPDIF audio in HDMI
Signed-off-by: chunhui dai <chunhui.dai at mediatek.com>
Signed-off-by: CK Hu <ck.hu at mediatek.com>
commit be28b6507c46050f5b7244d9d98a19c03b9cf074
Author: chunhui dai <chunhui.dai at mediatek.com>
Date: Wed Oct 3 11:41:47 2018 +0800
drm/mediatek: separate hdmi phy to different file
Different IC has different phy setting of HDMI.
This patch separates the phy hardware relate part for mt8173.
Signed-off-by: chunhui dai <chunhui.dai at mediatek.com>
Signed-off-by: CK Hu <ck.hu at mediatek.com>
commit d08b5ab972449b0ab494600fa985979e91e090ca
Author: chunhui dai <chunhui.dai at mediatek.com>
Date: Wed Oct 3 11:41:46 2018 +0800
drm/mediatek: add dpi driver for mt2701 and mt7623
This patch adds dpi dirver suppot for both mt2701 and mt7623.
And also support other (existing or future) chips that use
the same binding and driver.
Signed-off-by: chunhui dai <chunhui.dai at mediatek.com>
Signed-off-by: CK Hu <ck.hu at mediatek.com>
commit bcc97daee6b8120d1ffeee0073b49bfbd3df026d
Author: chunhui dai <chunhui.dai at mediatek.com>
Date: Wed Oct 3 11:41:45 2018 +0800
drm/mediatek: convert dpi driver to use drm_of_find_panel_or_bridge
Convert dpi driver to use drm_of_find_panel_or_bridge.
This changes some error messages to debug messages (in the graph core).
Graph connections are often "no connects" depending on the particular
board, so we want to avoid spurious messages. Plus the kernel is not a
DT validator.
related links:
[1] https://lkml.org/lkml/2017/2/3/716
[2] https://lkml.org/lkml/2017/2/3/719
Signed-off-by: chunhui dai <chunhui.dai at mediatek.com>
Signed-off-by: CK Hu <ck.hu at mediatek.com>
commit 55c78aa5c808ba7a95bf271a3486f0d14be519ce
Author: chunhui dai <chunhui.dai at mediatek.com>
Date: Wed Oct 3 11:41:44 2018 +0800
drm/mediatek: add clock factor for different IC
different IC has different clock designed in HDMI, the factor for
calculate clock should be different. Usinng the data in of_node
to find this factor.
Signed-off-by: chunhui dai <chunhui.dai at mediatek.com>
Signed-off-by: CK Hu <ck.hu at mediatek.com>
commit 79080159a7c1bcf7cd78713f920a42991bd3c871
Author: chunhui dai <chunhui.dai at mediatek.com>
Date: Wed Oct 3 11:41:43 2018 +0800
drm/mediatek: adjust EDGE to match clock and data
The default timing of DPI data and clock is not match.
We could adjust this bit to make them match.
Signed-off-by: chunhui dai <chunhui.dai at mediatek.com>
Signed-off-by: CK Hu <ck.hu at mediatek.com>
commit 0ace4b993c7a524962c6c17f3956a2d3cf2454e1
Author: chunhui dai <chunhui.dai at mediatek.com>
Date: Wed Oct 3 11:41:42 2018 +0800
drm/mediatek: move hardware register to node data
The address of register DPI_H_FRE_CON is different in different IC.
Using of_node data to find this address.
Signed-off-by: chunhui dai <chunhui.dai at mediatek.com>
Signed-off-by: CK Hu <ck.hu at mediatek.com>
commit 4e90a6eb769a2041a81efb3c288a087790ae885d
Author: chunhui dai <chunhui.dai at mediatek.com>
Date: Wed Oct 3 11:41:41 2018 +0800
drm/mediatek: add refcount for DPI power on/off
After the kernel 4.4, the DRM disable flow was changed, if DPI was
disableed before CRTC, it will cause warning message as following:
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1339 at ../../linux/linux-4.4.24-mtk/drivers/gpu/drm/drm_irq.c:1326 drm_wait_one_vblank+0x188/0x18c()
vblank wait timed out on crtc 0
Modules linked in: bridge mt8521p_ir_shim(O) i2c_eeprom(O) mtk_m4(O) fuse_ctrl(O) virtual_block(O) caamkeys(PO) chk(PO) amperctl(O) ledctl(O) apple_auth(PO) micctl(O) sensors(PO) lla(O) sdd(PO) ice40_fpga(O) psmon(O) event_queue(PO) utils(O) blackbox(O)
CPU: 0 PID: 1339 Comm: kworker/0:1 Tainted: P W O 4.4.24 #1
Hardware name: Mediatek Cortex-A7 (Device Tree)
Workqueue: events drm_mode_rmfb_work_fn
[<c001a710>] (unwind_backtrace) from [<c00151e4>] (show_stack+0x20/0x24)
[<c00151e4>] (show_stack) from [<c027961c>] (dump_stack+0x98/0xac)
[<c027961c>] (dump_stack) from [<c002ac54>] (warn_slowpath_common+0x94/0xc4)
[<c002ac54>] (warn_slowpath_common) from [<c002acc4>] (warn_slowpath_fmt+0x40/0x48)
[<c002acc4>] (warn_slowpath_fmt) from [<c03307ac>] (drm_wait_one_vblank+0x188/0x18c)
[<c03307ac>] (drm_wait_one_vblank) from [<c03307d8>] (drm_crtc_wait_one_vblank+0x28/0x2c)
[<c03307d8>] (drm_crtc_wait_one_vblank) from [<c034f48c>] (mtk_drm_crtc_disable+0x78/0x240)
[<c034f48c>] (mtk_drm_crtc_disable) from [<c03240d4>] (drm_atomic_helper_commit_modeset_disables+0x128/0x3b8)
[<c03240d4>] (drm_atomic_helper_commit_modeset_disables) from [<c0350a7c>] (mtk_atomic_complete+0x74/0xb4)
[<c0350a7c>] (mtk_atomic_complete) from [<c0350b24>] (mtk_atomic_commit+0x68/0x98)
[<c0350b24>] (mtk_atomic_commit) from [<c034ab48>] (drm_atomic_commit+0x54/0x74)
[<c034ab48>] (drm_atomic_commit) from [<c0325c4c>] (drm_atomic_helper_set_config+0x7c/0xa0)
[<c0325c4c>] (drm_atomic_helper_set_config) from [<c0338594>] (drm_mode_set_config_internal+0x68/0xe4)
[<c0338594>] (drm_mode_set_config_internal) from [<c033967c>] (drm_framebuffer_remove+0xe4/0x120)
[<c033967c>] (drm_framebuffer_remove) from [<c0339700>] (drm_mode_rmfb_work_fn+0x48/0x58)
[<c0339700>] (drm_mode_rmfb_work_fn) from [<c0043a38>] (process_one_work+0x154/0x50c)
[<c0043a38>] (process_one_work) from [<c0044074>] (worker_thread+0x284/0x568)
[<c0044074>] (worker_thread) from [<c0049dc4>] (kthread+0xec/0x104)
[<c0049dc4>] (kthread) from [<c0010678>] (ret_from_fork+0x14/0x3c)
---[ end trace 12ae5358e992abd5 ]---
so, we add refcount for DPI power on/off to protect the flow.
Signed-off-by: Bibby Hsieh <bibby.hsieh at mediatek.com>
Signed-off-by: chunhui dai <chunhui.dai at mediatek.com>
Signed-off-by: CK Hu <ck.hu at mediatek.com>
More information about the openchrome-devel
mailing list