I'm working on getting Android working with DRM drivers. ATM, I'm
using virtio-gpu as the driver and trying to get just KMS side working
without rendering. I have it working with stock AOSP and the emulated
fb with a few additions to the virtio-gpu driver[1]. Now I'm trying to
get things working with native KMS using drm_gralloc and
drm_hwcomposer (now in AOSP). I've hit one problem though which I'm
not sure how to solve without hacking around it.
Is prime allowed on dumb BOs? AIUI, dumb …
[View More]buffer allocation is not
allowed on render nodes and drmPrimeHandleToFD is not allowed on
card0, so I'm stuck. I could open both nodes, but then I want the case
of no render node to work. After some searching, I thought it was a
matter of needing to do drmAuthMagic, but then found that is
considered obsolete[2].
Rob
[1] git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git android-4.4
[2] http://www.x.org/wiki/Events/XDC2013/XDC2013DavidHerrmannDRMSecurity/slides…
[View Less]
Hi Linus,
A bunch of change across the board, the main things are some vblank
fallout in radeon and nouveau required some work, but I think this should
fix it all. There is also one drm fix for an oops in vmwgfx with how we
pass the drm master around.
The rest is just some amdgpu, i915, imx and rockchip fixes.
probably more than I'd like at this point, but hopefully things settle
down now.
Dave.
The following changes since commit 31ade3b83e1821da5fbb2f11b5b3d4ab2ec39db8:
Linux 4.4-…
[View More]rc3 (2015-11-29 18:58:26 -0800)
are available in the git repository at:
git://people.freedesktop.org/~airlied/linux drm-fixes
for you to fetch changes up to df4d4aa96d1db1657e14b848a341fc614c8d61eb:
Merge branch 'drm-fixes-4.4' of git://people.freedesktop.org/~agd5f/linux into drm-next (2015-12-05 16:15:38 +1000)
----------------------------------------------------------------
Alex Deucher (1):
drm/amdgpu: Fixup hw vblank counter/ts for new drm_update_vblank_count() (v3)
Chris Wilson (2):
drm/i915: Mark uneven memory banks on gen4 desktop as unknown swizzling
drm/i915: Check the timeout passed to i915_wait_request
Christian König (6):
drm/amdgpu: fix userptr flags check
drm/amdgpu: fix VM page table reference counting
drm/amdgpu: set snooped flags only on system addresses v2
drm/amdgpu: take a BO reference in the display code
drm/amdgpu: take a BO reference for the user fence
drm/amdgpu: partially revert "drm/amdgpu: fix VM_CONTEXT*_PAGE_TABLE_END_ADDR" v2
Chunming Zhou (1):
drm/amdgpu: add err check for pin userptr
Daniel Stone (1):
drm/rockchip: Use CRTC vblank event interface
Daniel Vetter (1):
drm/nouveau: Fix pre-nv50 pageflip events (v4)
Dave Airlie (5):
Merge tag 'drm-intel-fixes-2015-11-30' of git://anongit.freedesktop.org/drm-intel into drm-fixes
Merge branch 'drm-fixes-rockchip-2015-12-02' of https://github.com/markyzq/kernel-drm-rockchip into drm-fixes
Merge tag 'drm-intel-fixes-2015-12-03' of git://anongit.freedesktop.org/drm-intel into drm-fixes
Merge tag 'imx-drm-fixes-2015-12-01' of git://git.pengutronix.de/git/pza/linux into drm-fixes
Merge branch 'drm-fixes-4.4' of git://people.freedesktop.org/~agd5f/linux into drm-next
Dominik Behr (1):
drm/rockchip: vop: fix window origin calculation
Heiko Stuebner (1):
drm/rockchip: unset pgoff when mmap'ing gems
Imre Deak (3):
drm/i915/ddi: fix intel_display_port_aux_power_domain() after HDMI detect
drm/i915: add MISSING_CASE to a few port/aux power domain helpers
drm/i915: take a power domain reference while checking the HDMI live status
Liu Ying (1):
drm/imx: ipuv3-crtc: Return error if ipu_plane_init() fails for primary plane
Luis de Bethencourt (2):
drm: imx: imx-tve: Fix module autoload for OF platform driver
drm/rockchip: Fix module autoload for OF platform driver
Lyude (1):
drm/radeon: Retry DDC probing on DVI on failure if we got an HPD interrupt
Marc-André Lureau (1):
virtio-gpu: use no-merge for fill-modes
Mario Kleiner (1):
drm/radeon: Fixup hw vblank counter/ts for new drm_update_vblank_count() (v2)
Markus Elfring (1):
GPU-DRM-IMX: Delete an unnecessary check before drm_fbdev_cma_restore_mode()
Nicolai Hähnle (1):
drm/amdgpu: fix race condition in amd_sched_entity_push_job
Pavel Machek (1):
add blacklist for thinkpad T40p
Philipp Zabel (6):
drm/imx: switch to universal planes
drm/imx: parallel-display: allow to determine bus format from the connected panel
gpu: ipu-v3: drop unused dmfc field from client platform data
gpu: ipu-v3: Remove reg_offset field
gpu: ipu-v3: Assign of_node of child platform devices to corresponding ports
drm/imx: Remove of_node assignment from ipuv3-crtc driver probe
Russell King (1):
drm: imx: convert to drm_crtc_send_vblank_event()
Sjoerd Simons (1):
drm/rockchip: vop: Correct enabled clocks during setup
Takashi Iwai (2):
drm/i915: Don't compare has_drrs strictly in pipe config
drm/i915: Don't override output type for DDI HDMI
Thomas Hellstrom (1):
drm: Fix an unwanted master inheritance v2
Ville Syrjälä (2):
drm/i915: Clean up AUX power domain handling
drm/i915: Introduce a gmbus power domain
jimqu (1):
drm/amdgpu: add spin lock to protect freed list in vm (v2)
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 +
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 6 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 108 +++++++++++++++++++-------
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 5 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 48 +++++++++++-
drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 5 ++
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 1 +
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 17 ++--
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 21 ++++-
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 5 +-
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 5 +-
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 5 +-
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 2 +-
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 2 +-
drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 5 +-
drivers/gpu/drm/drm_drv.c | 5 ++
drivers/gpu/drm/drm_fops.c | 84 +++++++++++++-------
drivers/gpu/drm/drm_irq.c | 54 ++++++++++++-
drivers/gpu/drm/i915/i915_debugfs.c | 2 +
drivers/gpu/drm/i915/i915_drv.h | 1 +
drivers/gpu/drm/i915/i915_gem.c | 12 ++-
drivers/gpu/drm/i915/i915_gem_fence.c | 36 ++++++---
drivers/gpu/drm/i915/intel_display.c | 53 ++++++++++++-
drivers/gpu/drm/i915/intel_dp.c | 51 ++++--------
drivers/gpu/drm/i915/intel_drv.h | 4 +-
drivers/gpu/drm/i915/intel_hdmi.c | 12 +--
drivers/gpu/drm/i915/intel_i2c.c | 6 +-
drivers/gpu/drm/i915/intel_runtime_pm.c | 34 +-------
drivers/gpu/drm/imx/imx-drm-core.c | 7 +-
drivers/gpu/drm/imx/imx-drm.h | 3 +-
drivers/gpu/drm/imx/imx-tve.c | 1 +
drivers/gpu/drm/imx/ipuv3-crtc.c | 63 ++++-----------
drivers/gpu/drm/imx/ipuv3-plane.c | 9 +--
drivers/gpu/drm/imx/ipuv3-plane.h | 2 +-
drivers/gpu/drm/imx/parallel-display.c | 4 +
drivers/gpu/drm/nouveau/nouveau_display.c | 19 +++--
drivers/gpu/drm/radeon/cik.c | 5 +-
drivers/gpu/drm/radeon/evergreen.c | 5 +-
drivers/gpu/drm/radeon/r100.c | 12 ++-
drivers/gpu/drm/radeon/r600.c | 2 +-
drivers/gpu/drm/radeon/radeon.h | 2 +-
drivers/gpu/drm/radeon/radeon_agp.c | 3 +
drivers/gpu/drm/radeon/radeon_connectors.c | 21 ++++-
drivers/gpu/drm/radeon/radeon_display.c | 106 ++++++++++++++++++-------
drivers/gpu/drm/radeon/radeon_irq_kms.c | 8 +-
drivers/gpu/drm/radeon/radeon_kms.c | 50 +++++++++++-
drivers/gpu/drm/radeon/radeon_mode.h | 5 ++
drivers/gpu/drm/radeon/radeon_pm.c | 4 +-
drivers/gpu/drm/radeon/rs600.c | 2 +-
drivers/gpu/drm/radeon/rs690.c | 10 +++
drivers/gpu/drm/radeon/si.c | 5 +-
drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 1 +
drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 43 +++++-----
drivers/gpu/drm/virtio/virtgpu_display.c | 2 +-
drivers/gpu/ipu-v3/ipu-common.c | 69 ++++++++--------
include/drm/drmP.h | 10 +++
include/video/imx-ipu-v3.h | 1 -
57 files changed, 735 insertions(+), 331 deletions(-)
[View Less]
This patch series adds DP audio and hotplug notification
support.
On Skylake two DP ports are available and to enable DP on both
ports all pins need to be enabled.
There is a special vendor widget which need to be programmed to
enable all pins and converters. This series adds hotplug
notification, read/set constraint based on ELD, enable all
pin/cvts, DP1.2, programs the audio infoframe for DP. There is
a one to one mapping between converter and stream, so the dais
are created based on the no …
[View More]of streams supported on hdmi codec.
Even though cvts can be mapped dynamically to the streams,
currently it is statically mapped as simultaneous playback on
both DP and HDMI is not supported as of now.
Pin muxes and controls are created dynamically to map converter
to pin widget. So at run time specific pin is mapped to the dai
based on the control selected (based on the display type DP/HDMI
connected).
Finally the DP audio infoframe programming is added to support
the DP feature.
Also with hotplug notification support, ELD is read and
capabilities are set for rate, formats and channels. drm_eld
sound/core framework is updated to limit the formats based on
ELD.
There are few fixes one fixing the static checker warning and
other one not to fail if no connection list is found for a pin
widget.
Pls note, the 11th patch is adding a small macro for getting
connection type in drm header, we have CCed drm folks on that and
this one. Pls ack so that we can have this series merged thru
sound trees
changes in v2:
- Address review comments
- Dropped devm_xxx for cvt and pin memory allocation.
- Dropped the ELD helper APIs from core and copied to driver.
- Updated notification patch to add PM fixes from legacy hda.
- commit message and change log updated for display power fix.
- Updated DRM helper APIs and the caller
Jeeja KP (1):
ASoC: hdac_hdmi: Add codec suspend/resume handler
Ramesh Babu (1):
ASoC: hdac_hdmi: Fix to keep display active while enumerating codec
Subhransu S. Prusty (12):
ASoC: hdac_hdmi: Fix to check num nodes correctly
ASoC: hdac_hdmi: Fix to warn instead of err for no connected nids
ASoC: hdac_hdmi - Use list to add pins and converters
ASoC: hdac_hdmi: Add hotplug notification and read eld
ALSA: pcm: Add DRM helper to set constraint for format
ASoC: hdac_hdmi: Apply constraints based on ELD
ASoC: hdac_hdmi: Enable DP1.2 and all converters/pins
ASoC: hdac_hdmi - create dais based on number of streams
ASoC: hdac_hdmi: Create widget/route based on nodes enumerated
ASoC: hdac_hdmi: Assign pin for stream based on dapm connection
drm/edid: Add API to help find connection type
ASoC: hdac_hdmi: Add infoframe support for dp audio
include/drm/drm_edid.h | 12 +
sound/core/pcm_drm_eld.c | 42 +-
sound/soc/codecs/Kconfig | 1 +
sound/soc/codecs/hdac_hdmi.c | 1019 ++++++++++++++++++++++++++++++++++++------
4 files changed, 925 insertions(+), 149 deletions(-)
--
1.9.1
[View Less]
Hi Dave,
A few more last minute fixes for 4.4 on top of my pull request from
earlier this week. The big change here is a vblank regression fix due to
commit 4dfd6486 "drm: Use vblank timestamps to guesstimate how many vblanks
were missed". Beyond that, a hotplug fix and a few VM fixes.
The following changes since commit 07df04dfcfe51a45239d056d43cbc09702262c82:
drm/amdgpu: fix race condition in amd_sched_entity_push_job (2015-12-02 15:04:04 -0500)
are available in the git repository at:
…
[View More]git://people.freedesktop.org/~agd5f/linux drm-fixes-4.4
for you to fetch changes up to 8e36f9d33c134d5c6448ad65b423a9fd94e045cf:
drm/amdgpu: Fixup hw vblank counter/ts for new drm_update_vblank_count() (v3) (2015-12-04 15:15:07 -0500)
----------------------------------------------------------------
Alex Deucher (1):
drm/amdgpu: Fixup hw vblank counter/ts for new drm_update_vblank_count() (v3)
Christian König (4):
drm/amdgpu: set snooped flags only on system addresses v2
drm/amdgpu: take a BO reference in the display code
drm/amdgpu: take a BO reference for the user fence
drm/amdgpu: partially revert "drm/amdgpu: fix VM_CONTEXT*_PAGE_TABLE_END_ADDR" v2
Lyude (1):
drm/radeon: Retry DDC probing on DVI on failure if we got an HPD interrupt
Mario Kleiner (1):
drm/radeon: Fixup hw vblank counter/ts for new drm_update_vblank_count() (v2)
jimqu (1):
drm/amdgpu: add spin lock to protect freed list in vm (v2)
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 6 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 108 ++++++++++++++++++++--------
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 48 ++++++++++++-
drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 5 ++
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 7 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 16 ++++-
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 5 +-
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 5 +-
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 5 +-
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 2 +-
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 2 +-
drivers/gpu/drm/radeon/cik.c | 5 +-
drivers/gpu/drm/radeon/evergreen.c | 5 +-
drivers/gpu/drm/radeon/r100.c | 12 +++-
drivers/gpu/drm/radeon/r600.c | 2 +-
drivers/gpu/drm/radeon/radeon.h | 2 +-
drivers/gpu/drm/radeon/radeon_connectors.c | 21 +++++-
drivers/gpu/drm/radeon/radeon_display.c | 106 ++++++++++++++++++++-------
drivers/gpu/drm/radeon/radeon_irq_kms.c | 8 +--
drivers/gpu/drm/radeon/radeon_kms.c | 50 ++++++++++++-
drivers/gpu/drm/radeon/radeon_mode.h | 5 ++
drivers/gpu/drm/radeon/radeon_pm.c | 4 +-
drivers/gpu/drm/radeon/rs600.c | 2 +-
drivers/gpu/drm/radeon/rs690.c | 10 +++
drivers/gpu/drm/radeon/si.c | 5 +-
26 files changed, 364 insertions(+), 84 deletions(-)
[View Less]
From: Stephen Chandler Paul <cpaul(a)redhat.com>
HPD signals on DVI ports can be fired off before the pins required for
DDC probing actually make contact, due to the pins for HPD making
contact first. This results in a HPD signal being asserted but DDC
probing failing, resulting in hotplugging occasionally failing.
This is somewhat rare on most cards (depending on what angle you plug
the DVI connector in), but on some cards it happens constantly. The
Radeon R5 on the machine used for …
[View More]testing this patch for instance, runs
into this issue just about every time I try to hotplug a DVI monitor and
as a result hotplugging almost never works.
Rescheduling the hotplug work for a second when we run into an HPD
signal with a failing DDC probe usually gives enough time for the rest
of the connector's pins to make contact, and fixes this issue.
Signed-off-by: Stephen Chandler Paul <cpaul(a)redhat.com>
---
So this one has kind of been a tough sell with Jerome, mostly because it's
somewhat of a hack. Unfortunately however I've managed to find machines where
DVI hotplugging literally doesn't work without a patch like this. We've already
tried a couple of ways of handling the situation of retriggering ddc probes:
* Trying the DDC probe in the radeon_dvi_detect() function multiple times.
* Trying to reschedule the hotplug_work task whenever DDC probing fails on DVI
but we got a hpd signal (this ended up being a much more complicated patch
then anticipated)
* Doing what we do right now, which is just triggering userspace to rescan all
the ports when the hpd signal is asserted by the DVI port but there's no DDC
probe, and repeating until at least a second passes.
All of these actually work, but I guess it's a question of which one is less of
a hack. If anyone here can think of a cleaner way of handling this feel free to
let me know.
drivers/gpu/drm/radeon/radeon.h | 3 +++
drivers/gpu/drm/radeon/radeon_connectors.c | 20 +++++++++++++++++---
drivers/gpu/drm/radeon/radeon_irq_kms.c | 2 ++
3 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
index b6cbd81..d63f0fe 100644
--- a/drivers/gpu/drm/radeon/radeon.h
+++ b/drivers/gpu/drm/radeon/radeon.h
@@ -2460,6 +2460,9 @@ struct radeon_device {
/* amdkfd interface */
struct kfd_dev *kfd;
+ /* last time we received an hpd signal */
+ unsigned long hpd_time;
+
struct mutex mn_lock;
DECLARE_HASHTABLE(mn_hash, 7);
};
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
index 5a2cafb..4ee9440 100644
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -1228,19 +1228,33 @@ radeon_dvi_detect(struct drm_connector *connector, bool force)
const struct drm_encoder_helper_funcs *encoder_funcs;
int i, r;
enum drm_connector_status ret = connector_status_disconnected;
- bool dret = false, broken_edid = false;
+ bool dret = false, broken_edid = false, hpd_unchanged;
r = pm_runtime_get_sync(connector->dev->dev);
if (r < 0)
return connector_status_disconnected;
- if (!force && radeon_check_hpd_status_unchanged(connector)) {
+ hpd_unchanged = radeon_check_hpd_status_unchanged(connector);
+ if (!force && hpd_unchanged) {
ret = connector->status;
goto exit;
}
- if (radeon_connector->ddc_bus)
+ if (radeon_connector->ddc_bus) {
dret = radeon_ddc_probe(radeon_connector, false);
+
+ /* Sometimes the pins required for the DDC probe on DVI
+ * connectors don't make contact at the same time that the ones
+ * for HPD do. If the DDC probe fails even though we had an HPD
+ * signal, signal userspace to try again */
+ if (!dret && !hpd_unchanged &&
+ connector->status != connector_status_connected &&
+ time_before(jiffies, rdev->hpd_time + msecs_to_jiffies(1000))) {
+ DRM_DEBUG_KMS("%s: hpd asserted but ddc probe failed, retrying\n",
+ connector->name);
+ drm_sysfs_hotplug_event(dev);
+ }
+ }
if (dret) {
radeon_connector->detected_by_load = false;
radeon_connector_free_edid(connector);
diff --git a/drivers/gpu/drm/radeon/radeon_irq_kms.c b/drivers/gpu/drm/radeon/radeon_irq_kms.c
index 171d3e4..579c22c 100644
--- a/drivers/gpu/drm/radeon/radeon_irq_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c
@@ -79,6 +79,8 @@ static void radeon_hotplug_work_func(struct work_struct *work)
struct drm_mode_config *mode_config = &dev->mode_config;
struct drm_connector *connector;
+ rdev->hpd_time = jiffies;
+
/* we can race here at startup, some boards seem to trigger
* hotplug irqs when they shouldn't. */
if (!rdev->mode_info.mode_config_initialized)
--
2.5.0
[View Less]