Lyude
4c732e6ee9
drm/i915/vlv: Reset the ADPA in vlv_display_power_well_init()
...
While VGA hotplugging worked(ish) before, it looks like that was mainly
because we'd unintentionally enable it in
valleyview_crt_detect_hotplug() when we did a force trigger. This
doesn't work reliably enough because whenever the display powerwell on
vlv gets disabled, the values set in VLV_ADPA get cleared and
consequently VGA hotplugging gets disabled. This causes bugs such as one
we found on an Intel NUC, where doing the following sequence of
hotplugs:
- Disconnect all monitors
- Connect VGA
- Disconnect VGA
- Connect HDMI
Would result in VGA hotplugging becoming disabled, due to the powerwells
getting toggled in the process of connecting HDMI.
Changes since v3:
- Expose intel_crt_reset() through intel_drv.h and call that in
vlv_display_power_well_init() instead of
encoder->base.funcs->reset(&encoder->base);
Changes since v2:
- Use intel_encoder structs instead of drm_encoder structs
Changes since v1:
- Instead of handling the register writes ourself, we just reuse
intel_crt_detect()
- Instead of resetting the ADPA during display IRQ installation, we now
reset them in vlv_display_power_well_init()
Cc: stable@vger.kernel.org
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Signed-off-by: Lyude <cpaul@redhat.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
[danvet: Rebase over dev_priv/drm_device embedding.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
(cherry picked from commit 9504a89247 )
2016-07-19 09:16:56 +02:00
Lyude
4570d83339
drm/i915/vlv: Make intel_crt_reset() per-encoder
...
This lets call intel_crt_reset() in contexts where IRQs are disabled and
as such, can't hold the locks required to work with the connectors.
Cc: stable@vger.kernel.org
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Signed-off-by: Lyude <cpaul@redhat.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
(cherry picked from commit 28cf71ce3e )
2016-07-19 09:16:51 +02:00
Markus Elfring
a1bf09e69f
drm/ttm: Delete an unnecessary check before the function call "ttm_tt_destroy"
...
The ttm_tt_destroy() function tests whether its argument is NULL
and then returns immediately. Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/54338f58-830c-a8b4-4554-5d4459bcd321@users.sourceforge.net
2016-07-19 08:31:49 +02:00
Chris Wilson
bf0901731d
drm/vgem: Remember to offset relative timeouts to mod_timer() by jiffies
...
mod_timer() takes an absolute jiffie value, not a relative timeout and
quietly fixup the missed ret=0 otherwise gcc just always returns that
the fence timed out.
Testcase: igt/vgem_basic/fence
Fixes: 4077798484 ("drm/vgem: Attach sw fences to exported vGEM dma-buf")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/1468834278-26716-1-git-send-email-chris@chris-wilson.co.uk
2016-07-19 08:31:49 +02:00
Dave Airlie
84ade45e05
Merge tag 'drm-intel-fixes-2016-07-18' of git://anongit.freedesktop.org/drm-intel into drm-fixes
...
Two more regression fixes for 4.7.
* tag 'drm-intel-fixes-2016-07-18' of git://anongit.freedesktop.org/drm-intel:
drm/i915: add missing condition for committing planes on crtc
drm/i915: Treat eDP as always connected, again
2016-07-19 16:09:20 +10:00
John Keeping
dc0b408f5a
drm/rockchip: allocate correct crtc state structure on reset
...
Because we are using a custom crtc_state structure, we must override the
reset helper to allocate the correct amount of memory.
Cc: stable@vger.kernel.org
Fixes: 4e257d9eee ("drm/rockchip: get rid of rockchip_drm_crtc_mode_config")
Signed-off-by: John Keeping <john@metanate.com >
Signed-off-by: Mark Yao <mark.yao@rock-chips.com >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
2016-07-19 14:01:53 +08:00
Markus Elfring
f5e193a16d
drm/rockchip: Delete an unnecessary check before drm_gem_object_unreference_unlocked()
...
The drm_gem_object_unreference_unlocked() function tests whether
its argument is NULL and then returns immediately.
Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net >
2016-07-19 10:02:30 +08:00
Dan Carpenter
15da78084d
drm/rockchip: fix a couple off by one bugs
...
The priv->crtc_funcs[] array has ROCKCHIP_MAX_CRTC elements so > should
be >= here.
Fixes: 2048e3286f ('drm: rockchip: Add basic drm driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
2016-07-19 09:42:39 +08:00
Mark Yao
44958207d6
drm/rockchip: vop: correct rk3036 register define
...
Signed-off-by: Mark Yao <mark.yao@rock-chips.com >
Reported-by: Tomasz Figa <tfiga@chromium.org >
2016-07-19 09:42:21 +08:00
Mark Yao
ee8662fc1f
drm/rockchip: vop: correct the source size of uv scale factor setting
...
When the input color format is YUV, we need to do some external scale
for CBCR. Like,
* In YUV420 data format:
cbcr_xscale = dst_w / src_w * 2;
cbcr_yscale = dst_h / src_h * 2;
* In YUV422 data format:
cbcr_xscale = dst_w / src_w * 2;
cbcr_yscale = dst_h / src_h;
* In YUV444 data format
cbcr_xscale = dst_w / src_w;
cbcr_yscale = dst_h / src_h;
Signed-off-by: Yakir Yang <ykk@rock-chips.com >
2016-07-19 09:42:20 +08:00
Yakir Yang
7a1ff36c2c
drm/rockchip: vop: add uv_vir register field for RK3036 VOP
...
The WIN0 of RK3036 VOP could support YUV data format, but driver
forget to add the uv_vir register field for it.
Signed-off-by: Yakir Yang <ykk@rock-chips.com >
2016-07-19 09:42:20 +08:00
John Keeping
8ff490ae42
drm/rockchip: fix "should it be static?" warnings
...
Combined with the previous commit, this fixes all of the sparse warnings
in drm/rockchip.
Signed-off-by: John Keeping <john@metanate.com >
2016-07-19 09:42:19 +08:00
John Keeping
a7e03fb537
drm/rockchip: fb: add missing header
...
This fixes the following sparse warnings:
drivers/gpu/drm/rockchip/rockchip_drm_fb.c:32:23: warning: symbol 'rockchip_fb_get_gem_obj' was not declared. Should it be static?
drivers/gpu/drm/rockchip/rockchip_drm_fb.c:315:24: warning: symbol 'rockchip_drm_framebuffer_init' was not declared. Should it be static?
drivers/gpu/drm/rockchip/rockchip_drm_fb.c:329:6: warning: symbol 'rockchip_drm_mode_config_init' was not declared. Should it be static?
Signed-off-by: John Keeping <john@metanate.com >
2016-07-19 09:42:18 +08:00
John Keeping
a38656958e
drm/rockchip: dw_hdmi: remove unused #include
...
drm_encoder_slave is not used in this file.
Signed-off-by: John Keeping <john@metanate.com >
2016-07-19 09:42:18 +08:00
Rodrigo Vivi
a4a027a860
drm/i915/kbl: Introduce the first official DMC for Kabylake.
...
Version 1.01.
This firmware is made for Kabylake platform so it doesn't
need the stepping workaround that we had before.
v2: Rebased on top of latest nightly with min version
required change.
v3: With right CSR_VERSION (Patrik).
Cc: Christophe Prigent <christophe.prigent@intel.com >
Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com >
Reviewed-by: Ben Widawsky <benjamin.widawsky@intel.com > (v1)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Reviewed-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1461707991-15336-1-git-send-email-rodrigo.vivi@intel.com
(cherry picked from commit 4922d49195 )
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2016-07-18 18:46:19 +02:00
Lionel Landwerlin
ed2eebbd61
drm/i915: add missing condition for committing planes on crtc
...
The i915 driver checks for color management properties changes as part
of a plane update. Therefore a color management update must imply a
plane update, otherwise we never update the transformation matrixes
and degamma/gamma LUTs.
v2: add comment about moving the commit of color management registers
to an async worker
v3: Commit color management register right after vblank
v4: Move back color management commit condition together with planes
commit
v5: Trigger color management commit through the planes commit (Daniel)
v6: Make plane change update more readable
Fixes: 20a34e78f0 (drm/i915: Update color management during vblank evasion.)
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: drm-intel-fixes@lists.freedesktop.org
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
References: https://lkml.org/lkml/2016/7/14/614
Reviewed-and-tested-by: Mario Kleiner <mario.kleiner.de@gmail.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1464183041-8478-1-git-send-email-lionel.g.landwerlin@intel.com
(cherry picked from commit e7852a4b3a )
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2016-07-18 14:34:51 +02:00
Ville Syrjälä
c71d4d5898
drm/i915: Treat eDP as always connected, again
...
eDP should be treated as connected even if doesn't have an EDID. In that
case we'll use the timings from the VBT. That used to be the case until
commit f21a21983e ("drm/i915: Splitting intel_dp_detect")
broke things by considering even eDP disconnected if we fail to get
an EDID for it.
Fix things up again by treating eDP as always connected.
Cc: Shubhangi Shrivastava <shubhangi.shrivastava@intel.com >
Cc: Nathan D Ciobanu <nathan.d.ciobanu@intel.com >
Cc: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com >
Cc: Ander Conselvan de Oliveira <conselvan2@gmail.com >
Cc: Larry Finger <larry.finger@lwfinger.net >
Reported-by: Larry Finger <larry.finger@lwfinger.net >
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96675
Cc: drm-intel-fixes@lists.freedesktop.org
Fixes: f21a21983e ("drm/i915: Splitting intel_dp_detect")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Tested-by: Larry Finger <larry.finger@lwfinger.net >
Link: http://patchwork.freedesktop.org/patch/msgid/1468836914-16537-1-git-send-email-ville.syrjala@linux.intel.com
(cherry picked from commit 1b7f2c8b07 )
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2016-07-18 14:33:09 +02:00
Tobias Jakobi
f39c9096d6
drm/arm: make fbdev support really optional
...
Currently enabling ARM HDLCD DRM support automatically pulls
in fbdev dependency. However this dep is unnecessary since
DRM core already handles this for us (DRM_FBDEV_EMULATION).
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/1468586897-32298-21-git-send-email-tjakobi@math.uni-bielefeld.de
2016-07-18 09:11:42 +02:00
Tobias Jakobi
339b19e3c4
drm/ast: make fbdev support really optional
...
Currently enabling AST Server DRM support automatically pulls
in fbdev dependency. However this dep is unnecessary since
DRM core already handles this for us (DRM_FBDEV_EMULATION).
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/1468586897-32298-20-git-send-email-tjakobi@math.uni-bielefeld.de
2016-07-18 09:11:41 +02:00
Tobias Jakobi
0b6320dfdf
drm/virtio: make fbdev support really optional
...
Currently enabling VirtIO DRM support automatically pulls in
fbdev dependency. However this dep is unnecessary since
DRM core already handles this for us (DRM_FBDEV_EMULATION).
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/1468586897-32298-19-git-send-email-tjakobi@math.uni-bielefeld.de
2016-07-18 09:11:40 +02:00
Tobias Jakobi
c0f0c177b5
drm/udl: make fbdev support really optional
...
Currently enabling USB DisplayLink DRM support automatically pulls
in fbdev dependency. However this dep is unnecessary since
DRM core already handles this for us (DRM_FBDEV_EMULATION).
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/1468586897-32298-17-git-send-email-tjakobi@math.uni-bielefeld.de
2016-07-18 09:11:40 +02:00
Tobias Jakobi
3aa9a8e4e3
drm/bochs: make fbdev support really optional
...
Currently enabling Bochs DRM support automatically pulls in
fbdev dependency. However this dep is unnecessary since
DRM core already handles this for us (DRM_FBDEV_EMULATION).
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/1468586897-32298-15-git-send-email-tjakobi@math.uni-bielefeld.de
2016-07-18 09:11:39 +02:00
Tobias Jakobi
e27962af0c
drm/fsl-dcu: make fbdev support really optional
...
Currently enabling Freescale DCU DRM support automatically pulls
in fbdev dependency. However this dep is unnecessary since
DRM core already handles this for us (DRM_FBDEV_EMULATION).
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/1468586897-32298-14-git-send-email-tjakobi@math.uni-bielefeld.de
2016-07-18 09:11:39 +02:00
Tobias Jakobi
1103ea40f3
drm/tilcdc: make fbdev support really optional
...
Currently enabling TI LCDC DRM support automatically pulls in
fbdev dependency. However this dep is unnecessary since
DRM core already handles this for us (DRM_FBDEV_EMULATION).
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/1468586897-32298-13-git-send-email-tjakobi@math.uni-bielefeld.de
2016-07-18 09:11:38 +02:00
Tobias Jakobi
c85b1ad395
drm/gma500: make fbdev support really optional
...
Currently enabling Intel GMA DRM support automatically pulls
in fbdev dependency. However this dep is unnecessary since
DRM core already handles this for us (DRM_FBDEV_EMULATION).
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/1468586897-32298-11-git-send-email-tjakobi@math.uni-bielefeld.de
2016-07-18 09:11:37 +02:00
Tobias Jakobi
505a2fca48
drm/shmobile: make fbdev support really optional
...
Currently enabling SH Mobile DRM support automatically pulls
in fbdev dependency. However this dep is unnecessary since
DRM core already handles this for us (DRM_FBDEV_EMULATION).
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/1468586897-32298-9-git-send-email-tjakobi@math.uni-bielefeld.de
2016-07-18 09:11:37 +02:00
Tobias Jakobi
400cc2de37
drm/imx: make fbdev support really optional
...
Currently enabling Freescale i.MX DRM support automatically pulls
in fbdev dependency. However this dep is unnecessary since
DRM core already handles this for us (DRM_FBDEV_EMULATION).
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/1468586897-32298-8-git-send-email-tjakobi@math.uni-bielefeld.de
2016-07-18 09:11:36 +02:00
Tobias Jakobi
f0a3e1e05c
drm/qxl: make fbdev support really optional
...
Currently enabling QXL DRM support automatically pulls in
fbdev dependency. However this dep is unnecessary since
DRM core already handles this for us (DRM_FBDEV_EMULATION).
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/1468586897-32298-7-git-send-email-tjakobi@math.uni-bielefeld.de
2016-07-18 09:11:35 +02:00
Tobias Jakobi
b6a2a4f38c
drm/cirrus: make fbdev support really optional
...
Currently enabling QEMU Cirrus DRM support automatically pulls
in fbdev dependency. However this dep is unnecessary since
DRM core already handles this for us (DRM_FBDEV_EMULATION).
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/1468586897-32298-6-git-send-email-tjakobi@math.uni-bielefeld.de
2016-07-18 09:11:35 +02:00
Tobias Jakobi
198edaf38c
drm/mgag200: make fbdev support really optional
...
Currently enabling MGA G200 DRM support automatically pulls in
fbdev dependency. However this dep is unnecessary since
DRM core already handles this for us (DRM_FBDEV_EMULATION).
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/1468586897-32298-5-git-send-email-tjakobi@math.uni-bielefeld.de
2016-07-18 09:11:34 +02:00
Tobias Jakobi
9bcba8c7f7
drm/omap: make fbdev support really optional
...
Currently enabling OMAP DRM support automatically pulls in
fbdev dependency. However this dep is unnecessary since
DRM core already handles this for us (DRM_FBDEV_EMULATION).
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/1468586897-32298-4-git-send-email-tjakobi@math.uni-bielefeld.de
2016-07-18 09:11:34 +02:00
Tobias Jakobi
0095ed4cba
drm/armada: make fbdev support really optional
...
Currently enabling Marvell Armada DRM support automatically pulls
in fbdev dependency. However this dep is unnecessary since
DRM core already handles this for us (DRM_FBDEV_EMULATION).
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/1468586897-32298-3-git-send-email-tjakobi@math.uni-bielefeld.de
2016-07-18 09:11:33 +02:00
Tobias Jakobi
c89f813a01
drm/arc: make fbdev support really optional
...
Currently enabling ARC DRM support automatically pulls in
fbdev dependency. However this dep is unnecessary since
DRM core already handles this for us (DRM_FBDEV_EMULATION).
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/1468586897-32298-2-git-send-email-tjakobi@math.uni-bielefeld.de
2016-07-18 09:11:32 +02:00
Markus Elfring
f7813aa037
drm/ast: Delete an unnecessary check before drm_gem_object_unreference_unlocked()
...
The drm_gem_object_unreference_unlocked() function tests whether
its argument is NULL and then returns immediately.
Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/f28c063f-ec56-e62b-9370-89ce833fa4e5@users.sourceforge.net
2016-07-18 09:11:32 +02:00
Markus Elfring
536cea6073
drm/hdlcd: Delete an unnecessary check before drm_fbdev_cma_hotplug_event()
...
The drm_fbdev_cma_hotplug_event() function tests whether its argument
is NULL and then returns immediately.
Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/c2b0f310-fa06-f4cc-0014-ea7f40564d26@users.sourceforge.net
2016-07-18 09:11:31 +02:00
Markus Elfring
63ecf57248
drm/cirrus: Delete an unnecessary check before drm_gem_object_unreference_unlocked()
...
The drm_gem_object_unreference_unlocked() function tests whether
its argument is NULL and then returns immediately.
Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/bebf88d8-cc28-657a-e96c-58447d8cf376@users.sourceforge.net
2016-07-18 09:11:30 +02:00
Markus Elfring
a63caf13a8
drm/tegra: Delete an unnecessary check before the function call "vunmap"
...
The vunmap() function performs also input parameter validation.
Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/b3fbdcaf-1bda-7ce9-935b-2d716727ec39@users.sourceforge.net
2016-07-18 09:11:30 +02:00
Markus Elfring
5345a5ab51
drm/virtgpu: Delete unnecessary checks before drm_gem_object_unreference_unlocked()
...
The drm_gem_object_unreference_unlocked() function tests whether
its argument is NULL and then returns immediately.
Thus the test around the calls is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/5e3dafff-72bb-e616-e84a-368f78fa66b1@users.sourceforge.net
2016-07-18 09:11:29 +02:00
Markus Elfring
f15a8e9a14
drm/arcpgu: Delete an unnecessary check before drm_fbdev_cma_hotplug_event()
...
The drm_fbdev_cma_hotplug_event() function tests whether its argument
is NULL and then returns immediately.
Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/dd9a16b1-234c-6776-e6d9-943a8457334e@users.sourceforge.net
2016-07-18 09:11:29 +02:00
Markus Elfring
63fe9bb865
drm/vc4: Delete unnecessary checks before two function calls
...
The following functions test whether their argument is NULL
and then return immediately.
* drm_fbdev_cma_hotplug_event
* drm_fbdev_cma_restore_mode
Thus the tests around their calls are not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/fb33d930-6a5c-c501-6676-26bd486f1cb5@users.sourceforge.net
2016-07-18 09:11:28 +02:00
Markus Elfring
d37e2a150e
drm/rockchip: Delete an unnecessary check before drm_gem_object_unreference_unlocked()
...
The drm_gem_object_unreference_unlocked() function tests whether
its argument is NULL and then returns immediately.
Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/b66399ed-278b-b85d-4a21-b34164936ef6@users.sourceforge.net
2016-07-18 08:54:55 +02:00
Markus Elfring
d3ae255068
drm/bochs: Delete an unnecessary check before drm_gem_object_unreference_unlocked()
...
The drm_gem_object_unreference_unlocked() function tests whether
its argument is NULL and then returns immediately.
Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/1e3a8c0d-e737-f092-727e-af7e3810b8dc@users.sourceforge.net
2016-07-18 08:54:55 +02:00
Chris Wilson
4077798484
drm/vgem: Attach sw fences to exported vGEM dma-buf (ioctl)
...
vGEM buffers are useful for passing data between software clients and
hardware renders. By allowing the user to create and attach fences to
the exported vGEM buffers (on the dma-buf), the user can implement a
deferred renderer and queue hardware operations like flipping and then
signal the buffer readiness (i.e. this allows the user to schedule
operations out-of-order, but have them complete in-order).
This also makes it much easier to write tightly controlled testcases for
dma-buf fencing and signaling between hardware drivers.
v2: Don't pretend the fences exist in an ordered timeline, but allocate
a separate fence-context for each fence so that the fences are
unordered.
v3: Make the debug output more interesting, and show the signaled status.
v4: Automatically signal the fence to prevent userspace from
indefinitely hanging drivers.
Testcase: igt/vgem_basic/dmabuf-fence
Testcase: igt/vgem_slow/nohang
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Sean Paul <seanpaul@chromium.org >
Cc: Zach Reizner <zachr@google.com >
Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Acked-by: Zach Reizner <zachr@google.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/1468571471-12610-1-git-send-email-chris@chris-wilson.co.uk
2016-07-18 08:54:55 +02:00
Archit Taneja
1d926114d8
drm: rcar-du: Remove i2c slave encoder interface for hdmi encoder
...
The hdmi output in rcar-du uses the i2c slave encoder interface to link
to the adv7511 encoder chip. The kms driver creates encoder and connector
entities that internally uses the drm_encoder_slave_funcs ops provided by
the slave encoder driver.
Change the driver such that it expects a bridge entity instead of a slave
encoder. The hdmi connector code isn't needed anymore as we expect the
adv7511 bridge driver to create/manage the connector.
Note that the kms driver still expects a connector node for hdmi to be
present in DT. This node has no connection to the connector created
by the bridge driver.
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
2016-07-18 08:58:45 +05:30
Andrey Gusakov
7caff0fc42
drm/bridge: tc358767: Add DPI to eDP bridge driver
...
Add a drm_bridge driver for the Toshiba TC358767 DPI/DSI to
eDP/DP bridge. Currently only DPI input with 24-bit RGB is
supported.
Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com >
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
2016-07-17 14:00:57 +05:30
Markus Elfring
0a677125d0
drm/msm: Delete an unnecessary check before drm_gem_object_unreference()
...
The drm_gem_object_unreference() function tests whether its argument
is NULL and then returns immediately.
Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net >
Signed-off-by: Rob Clark <robdclark@gmail.com >
2016-07-16 10:29:35 -04:00
Markus Elfring
e73a856973
drm/msm: Delete unnecessary checks before drm_gem_object_unreference_unlocked()
...
The drm_gem_object_unreference_unlocked() function tests whether
its argument is NULL and then returns immediately.
Thus the test around the calls is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net >
Signed-off-by: Rob Clark <robdclark@gmail.com >
2016-07-16 10:29:34 -04:00
Markus Elfring
851dd75d64
drm/msm/hdmi: Delete an unnecessary check before the function call "kfree"
...
The kfree() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net >
Signed-off-by: Rob Clark <robdclark@gmail.com >
2016-07-16 10:29:33 -04:00
Dan Carpenter
5745d21f9a
drm/msm: return -EFAULT instead of bytes remaining
...
copy_to/from_user returns the number of bytes remaining to be copied but
we want to return -EFAULT.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Rob Clark <robdclark@gmail.com >
2016-07-16 10:29:32 -04:00
Wei Yongjun
06f3217207
drm/msm/hdmi: use PTR_ERR_OR_ZERO() to simplify the code
...
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR.
Generated by: scripts/coccinelle/api/ptr_ret.cocci
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn >
Signed-off-by: Rob Clark <robdclark@gmail.com >
2016-07-16 10:29:31 -04:00