Puthikorn Voravootivat
ae25eceab6
drm/i915: Add option to support dynamic backlight via DPCD
...
This patch adds option to enable dynamic backlight for eDP
panel that supports this feature via DPCD register and
set minimum / maximum brightness to 0% and 100% of the
normal brightness.
Signed-off-by: Puthikorn Voravootivat <puthik@chromium.org >
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/20170622190339.142671-4-puthik@chromium.org
2017-06-23 12:24:55 +02:00
Puthikorn Voravootivat
560a758d39
drm/i915: Add heuristic to determine better way to adjust brightness
...
Add heuristic to decide that AUX or PWM pin should use for
backlight brightness adjustment and modify i915 param description
to have auto, force disable, and force enable.
The heuristic to determine that using AUX pin is better than using
PWM pin is that the panel support any of the feature list here.
- Regional backlight brightness adjustment
- Backlight PWM frequency set
- More than 8 bits resolution of brightness level
- Backlight enablement via AUX and not by BL_ENABLE pin
Signed-off-by: Puthikorn Voravootivat <puthik@chromium.org >
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/20170622190339.142671-3-puthik@chromium.org
2017-06-23 12:24:49 +02:00
Puthikorn Voravootivat
c03e53b030
drm/i915: Set PWM divider to match desired frequency in vbt
...
Read desired PWM frequency from panel vbt and calculate the
value for divider in DPCD address 0x724 and 0x728 to have
as many bits as possible for PWM duty cyle for granularity of
brightness adjustment while the frequency divisor is still
within 25% of the desired value.
Signed-off-by: Puthikorn Voravootivat <puthik@chromium.org >
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/20170622190339.142671-2-puthik@chromium.org
2017-06-23 12:24:40 +02:00
Daniel Vetter
8f6ece97da
drm/mxsfb: Drop drm_vblank_cleanup
...
Almost right but still racy, it's called before the interrupts are
uninstalled. So let's just drop it.
Cc: Marek Vasut <marex@denx.de >
Reviewed-by: Marek Vasut <marex@denx.de >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170621082850.13224-7-daniel.vetter@ffwll.ch
2017-06-23 11:08:44 +02:00
Daniel Vetter
91e976777d
drm/amd|radeon: Drop drm_vblank_cleanup
...
Both drivers shut down all crtc beforehand already, which will shut up
any pending vblank (the only thing vblank_cleanup really does is
disable the disable timer). Hence we don't need this here and can
remove it.
Cc: Alex Deucher <alexander.deucher@amd.com >
Cc: Christian König <christian.koenig@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170621082850.13224-2-daniel.vetter@ffwll.ch
2017-06-23 11:08:44 +02:00
Gerd Hoffmann
747fddd4e8
drm/qxl: move extern variable declaration header file
...
Flagged by sparse.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
Acked-by: Daniel Vetter <daniel@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/20170620113916.6967-4-kraxel@redhat.com
2017-06-23 10:06:43 +02:00
Gerd Hoffmann
45dfe57771
drm/qxl: declare a bunch of functions as static
...
Flagged by sparse.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
Acked-by: Daniel Vetter <daniel@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/20170620113916.6967-3-kraxel@redhat.com
2017-06-23 10:06:38 +02:00
Gerd Hoffmann
6545135a5e
drm/qxl: fix __user annotations
...
Drop them from u64 fields, tag local variables correctly instead.
While being at it switch the code to use u64_to_user_ptr().
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
Acked-by: Daniel Vetter <daniel@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/20170620113916.6967-2-kraxel@redhat.com
2017-06-23 10:06:31 +02:00
Dave Airlie
33ce7563a4
Merge tag 'drm-misc-fixes-2017-06-22' of git://anongit.freedesktop.org/git/drm-misc into drm-fixes
...
UAPI Changes:
- drm: Fix regression in GETCONNECTOR ioctl returning stale properties (Daniel)
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
* tag 'drm-misc-fixes-2017-06-22' of git://anongit.freedesktop.org/git/drm-misc:
drm: Fix GETCONNECTOR regression
2017-06-23 11:44:51 +10:00
Mark Yao
8814b40bf6
drm/rockchip: dw_hdmi: introduce the pclk for grf
...
For RK3399's GRF module, if we want to operate the graphic related grf
registers, we need to enable the pclk_vio_grf which supply power for VIO
GRF IOs, so it's better to introduce an optional grf clock in driver.
Signed-off-by: Yakir Yang <ykk@rock-chips.com >
Signed-off-by: Mark Yao <mark.yao@rock-chips.com >
Acked-by: Rob Herring <robh@kernel.org >
2017-06-23 08:52:03 +08:00
Mark Yao
5e3bc6d1ab
drm/rockchip: dw_hdmi: introduce the VPLL clock setting
...
For RK3399 HDMI, there is an external clock need for HDMI PHY,
and it should keep the same clock rate with VOP DCLK.
VPLL have supported the clock for HDMI PHY, but there is no
clock divider bewteen VPLL and HDMI PHY. So we need to set the
VPLL rate manually in HDMI driver.
Signed-off-by: Yakir Yang <ykk@rock-chips.com >
Signed-off-by: Mark Yao <mark.yao@rock-chips.com >
Acked-by: Rob Herring <robh@kernel.org >
2017-06-23 08:52:03 +08:00
Mark Yao
6445e394c5
drm/rockchip: dw_hdmi: add RK3399 HDMI support
...
RK3399 and RK3288 shared the same HDMI IP controller, only some light
difference with GRF configure.
Signed-off-by: Yakir Yang <ykk@rock-chips.com >
Signed-off-by: Mark Yao <mark.yao@rock-chips.com >
Acked-by: Rob Herring <robh@kernel.org >
2017-06-23 08:52:03 +08:00
Peter Rosin
364a7bf574
drm: atmel-hlcdc: add support for 8-bit color lookup table mode
...
All layers of all supported chips support this, the only variable is the
base address of the lookup table in the register map.
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Signed-off-by: Peter Rosin <peda@axentia.se >
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1498107791-17450-3-git-send-email-peda@axentia.se
2017-06-22 22:53:02 +02:00
Peter Rosin
ae7c59f0e7
drm: atmel-hlcdc: add missing .set_property helper to the crtc
...
The default implementation should be used.
Signed-off-by: Peter Rosin <peda@axentia.se >
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1498107791-17450-2-git-send-email-peda@axentia.se
2017-06-22 22:50:21 +02:00
Eric Anholt
55a0b9d70a
drm/vc4: Remove dead vc4_event_pending().
...
It is no longer used as of commit 34c8ea400f ("drm/vc4: Mimic
drm_atomic_helper_commit() behavior")
Signed-off-by: Eric Anholt <eric@anholt.net >
Link: http://patchwork.freedesktop.org/patch/msgid/20170621185002.28563-4-eric@anholt.net
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com >
2017-06-22 11:14:39 -07:00
Eric Anholt
cf1b372ec1
drm/vc4: Use the atomic state's commit workqueue.
...
Now that we're using the atomic helpers for fence waits, we can use
the same codepath as drm_atomic_helper_commit() does for async,
getting rid of our custom vc4_commit struct.
Signed-off-by: Eric Anholt <eric@anholt.net >
Link: http://patchwork.freedesktop.org/patch/msgid/20170621185002.28563-3-eric@anholt.net
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com >
2017-06-22 11:14:32 -07:00
Eric Anholt
53ad06949d
drm/vc4: Wait for fences interruptibly in blocking mode.
...
We should allow SIGIO and things to interrupt us before we get to the
no-error stage of the commit process. This code is effectively copied
from drm_atomic_helper_commit().
Signed-off-by: Eric Anholt <eric@anholt.net >
Link: http://patchwork.freedesktop.org/patch/msgid/20170621185002.28563-2-eric@anholt.net
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com >
2017-06-22 11:14:19 -07:00
Eric Anholt
334dbd69c6
drm/vc4: Hook up plane prepare_fb to lookup dma-buf reservations.
...
This way drm_atomic_helper_wait_for_fences() will actually do
something. The vc4_seqno_cb has been doing the fence waits on V3D
manually, so far.
Signed-off-by: Eric Anholt <eric@anholt.net >
Link: http://patchwork.freedesktop.org/patch/msgid/20170621185002.28563-1-eric@anholt.net
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com >
2017-06-22 11:13:54 -07:00
Mario Kleiner
7d2818f54e
drm/vc4: Allow vblank_disable_immediate on non-fw-kms. (v2)
...
With instantaneous high precision vblank timestamping
that updates at leading edge of vblank, the emulated
"hw vblank counter" from vblank timestamping which
increments at leading edge of vblank, and reliable
page flip execution and completion at leading edge
of vblank, we should meet the requirements for fast
vblank irq disable/enable.
Testing against rpi-4.12-rc5 Linux kernel with timing
measurement equipment indicates this works fine,
so allow immediate vblank disable for power saving.
For debugging in case of unexpected trouble, booting
with kernel cmdline option drm.vblankoffdelay=0
would keep vblank irqs on to approximate old behavior.
v2: Respin onto drm-misc-next, per Eric's suggestion.
Drop !vc4->firmware_kms check, as the firmware_kms
implementation does not exist in upstream.
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com >
Cc: Eric Anholt <eric@anholt.net >
Reviewed-by: Eric Anholt <eric@anholt.net >
Link: http://patchwork.freedesktop.org/patch/msgid/20170622012811.2139-1-mario.kleiner.de@gmail.com
2017-06-22 11:13:33 -07:00
Ville Syrjälä
c5e855d078
drm/i915: Always use 9 bits of the LPC bridge device ID for PCH detection
...
Make the code less confusiong by always using the top 9 bits of the
LPC bridge device ID to detect the PCH type. We need to add a bit of
new code for WPT, and we need to adjust the KBP ID as well. All the
other pre-CNP IDs are fine as is.
The virtualization cases I think are fine. These P2X and P3X IDs
actually just look like the old PIIX4 and PIIX3 IDs to me. Not sure
why they're not called PIIX3/4 though. The qemu one has a comment
saying the full ID is 0x2918 which is fine with 9 bits.
v2: Keep the CNP ID as 0xa300 (DK)
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com >
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170621174944.23306-1-ville.syrjala@linux.intel.com
2017-06-22 19:08:35 +03:00
Ville Syrjälä
d4cdbf0334
drm/i915: Clean up some expressions
...
Write the '!(SNB||IVB)' checks in the CPT/PPT detections
as '!SNB && !IVB' to make it less messy looking, and clear out
some useless parens the from the virtualization PCH detection case.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170620130310.13245-5-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2017-06-22 19:08:35 +03:00
Ville Syrjälä
243dec586f
drm/i915: Document that PPT==CPT and WPT==LPT
...
For our purposes PPT is equivalent to CPT, and WPT is equivalent to
LPT. Document that fact.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170620130310.13245-4-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2017-06-22 19:08:35 +03:00
Ville Syrjälä
aa03213006
drm/i915: s/Couar/Cougar/
...
Fix a typo in the PCH type debug message.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170620130310.13245-3-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2017-06-22 19:08:34 +03:00
Ville Syrjälä
b9eb89b21f
drm/i915: Use HAS_PCH_CPT() everywhere
...
We have a few cases comparing pch_type directly. Let's just replace
them with HAS_PCH_CPT() since CPT/PPT is what they're looking for.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170620130310.13245-2-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2017-06-22 19:08:34 +03:00
Matthew Auld
4a234c5fae
drm/i915: pass the vma to insert_entries
...
The vma already contains most of the information we need for insertion.
But also in preparation for supporting huge gtt pages, it would be
useful to know the details of the vma, such that we can we can easily
determine the page sizes we are allowed to use when inserting into the
48b PPGTT. This is especially true for 64K where we can't just
arbitrarily use it, since we require aligning/padding the vm space to
2M, which sometimes we can't enforce in the upper levels.
Suggested-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Matthew Auld <matthew.auld@intel.com >
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Link: http://patchwork.freedesktop.org/patch/msgid/20170622095836.6800-1-matthew.auld@intel.com
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
2017-06-22 16:48:50 +01:00
Boris Brezillon
0108648749
drm: Add drm_atomic_helper_wait_for_flip_done()
...
Add an helper to wait for all page flips of an atomic state to be done.
v2:
- Pimp kerneldoc as discussed with Boris on irc
- Add missing doc for @dev.
- Use old_state for consitency with wait_for_vblanks
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com > (v1)
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/1496392332-8722-2-git-send-email-boris.brezillon@free-electrons.com
2017-06-22 15:11:51 +02:00
Chris Wilson
51d05e1b29
drm/i915: Clear execbuf's vma backpointer upon release
...
commit 2889caa923 ("drm/i915: Eliminate lots of iterations over the
execobjects array") jiggled around the error handling and replace a test
that we cleaned up properly after ourselves with an assertion. That
assertion failed because in the release function (moments after the
assertion) we were indeed forgetting to mark the vma as cleared. The
consequence was when testing an invalid relocation address, we would try
to release the vma twice (following the couple of attempts to verify the
address) and on the second release notice that the first release was
incomplete.
Testcase: igt/gem_reloc_overflow/invalid-address
Fixes: 2889caa923 ("drm/i915: Eliminate lots of iterations over the execobjects array")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170622104722.2583-1-chris@chris-wilson.co.uk
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
2017-06-22 12:59:07 +01:00
Jose Abreu
2b3d860efa
drm: arcpgu: Use crtc->mode_valid() callback
...
Now that we have a callback to check if crtc supports a given mode
we can use it in arcpgu so that we restrict the number of probbed
modes to the ones we can actually display.
This is specially useful because arcpgu crtc is responsible to set
a clock value in the commit() stage but unfortunatelly this clock
does not support all the needed ranges.
Also, remove the atomic_check() callback as mode_valid() callback
will be called before.
Signed-off-by: Jose Abreu <joabreu@synopsys.com >
Reviewed-by: Alexey Brodkin <abrodkin@synopsys.com >
Cc: Carlos Palminha <palminha@synopsys.com >
Cc: Alexey Brodkin <abrodkin@synopsys.com >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Dave Airlie <airlied@linux.ie >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Changes v4->v5:
- Change commit message to "arcpgu" (Alexey)
Changes v3->v4:
- Do not use aux function (Laurent)
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com >
Acked-by: Dave Airlie <airlied@gmail.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/c3bcd69016c77f68a03ff3cb6b22ca6f90e930b0.1495720737.git.joabreu@synopsys.com
2017-06-22 10:45:10 +02:00
Daniel Vetter
33b6b7b12d
drm/zte: Drop drm_vblank_cleanup
...
It again looks all cargo-culted for no good reasons.
Cc: Shawn Guo <shawnguo@kernel.org >
Acked-by: Shawn Guo <shawnguo@kernel.org >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170621082850.13224-13-daniel.vetter@ffwll.ch
2017-06-22 08:41:15 +02:00
Daniel Vetter
10f9818307
drm/shmob: Drop drm_vblank_cleanup
...
It doesn't do anything in the driver load error paths that the drm
core doesn't also do (cleanup is done in drm_dev_fini).
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170621082850.13224-10-daniel.vetter@ffwll.ch
2017-06-22 08:41:15 +02:00
Boris Brezillon
edeb729f79
drm/vc4: Send a VBLANK event when disabling a CRTC
...
VBLANK events are missed when the CRTC is being disabled because the
driver does not wait till the end of the frame before stopping the
HVS and PV blocks. In this case, we should explicitly issue a VBLANK
event if there's one waiting.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Link: http://patchwork.freedesktop.org/patch/msgid/1497601833-24588-1-git-send-email-boris.brezillon@free-electrons.com
2017-06-21 10:27:04 -07:00
Daniel Vetter
22a884cfe5
drm: Check for drm_device->dev in drm_set_busid
...
I've failed to remember that we have virtual drivers like vgem which
have no underlying struct device. Fix this asap.
Reported-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Fixes: 5c484cee7e ("drm: Remove drm_driver->set_busid hook")
Cc: Thierry Reding <treding@nvidia.com >
Cc: Daniel Vetter <daniel.vetter@intel.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170621130429.20537-1-daniel.vetter@ffwll.ch
2017-06-21 17:38:43 +02:00
Chris Wilson
4ee056f418
drm/i915: Cancel pending execlist tasklet upon wedging
...
Highly unlikely, but if the stop_machine() did suspend the tasklet, we
want to make sure that when it wakes it finds there is nothing to do.
Otherwise, it will loudly complain that the ELSP port tracking no longer
matches the hardware, and we will be mightly confused.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170621124804.4529-1-chris@chris-wilson.co.uk
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
2017-06-21 15:15:33 +01:00
Arvind Yadav
c284a0bdb1
drm: sti: sti_hqvdp: undo preparation of a clock source.
...
Undo preparation of a clock source, if sti_hqvdp_start_xp70 and
sti_hqvdp_atomic_check are not successful.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com >
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org >
Link: http://patchwork.freedesktop.org/patch/msgid/7afad3012fb6e40f43a1eb5a64dc6364c38bd052.1498039961.git.arvind.yadav.cs@gmail.com
2017-06-21 15:45:19 +02:00
Thierry Reding
5a1535b110
drm/rockchip: Remove unnecessary NULL check
...
The expression &private->fbdev_helper can never be NULL, so the check is
completely unnecessary.
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Signed-off-by: Thierry Reding <treding@nvidia.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/20170329144401.1804-12-thierry.reding@gmail.com
2017-06-21 15:38:32 +02:00
Thierry Reding
6c8e54714c
drm/atmel-hlcdc: Remove unnecessary NULL check
...
drm_fbdev_cma_hotplug_event() already checks for NULL pointers before
dereferencing, so callers don't need to do that.
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Signed-off-by: Thierry Reding <treding@nvidia.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/20170329144401.1804-11-thierry.reding@gmail.com
2017-06-21 15:38:26 +02:00
Eric Anholt
e6f0acb2f0
bridge: Fix panel-bridge error return on !panel.
...
ERR_PTR() needs a negative errno argument.
Signed-off-by: Eric Anholt <eric@anholt.net >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170615175423.17954-1-eric@anholt.net
2017-06-21 15:38:02 +05:30
Arnd Bergmann
fee4964f0a
drm/arm: hdlcd: remove unused variables
...
The last rework left behind two unused variables:
drm/arm/hdlcd_crtc.c: In function 'hdlcd_plane_atomic_update':
drm/arm/hdlcd_crtc.c:264:13: warning: unused variable 'src_y' [-Wunused-variable]
drm/arm/hdlcd_crtc.c:264:6: warning: unused variable 'src_x' [-Wunused-variable]
This removes them.
Fixes: b2ae06ae9834 ("drm/arm: hdlcd: Use CMA helper for plane buffer address calculation")
Signed-off-by: Arnd Bergmann <arnd@arndb.de >
Acked-by: Liviu Dudau <liviu.dudau@arm.com >
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com >
2017-06-21 10:51:26 +01:00
Chris Wilson
0caf81b5c5
drm/i915: Hold struct_mutex for per-file stats in debugfs/i915_gem_object
...
As we walk the obj->vma_list in per_file_stats(), we need to hold
struct_mutex to prevent alteration of that list.
Fixes: 1d2ac403ae ("drm: Protect dev->filelist with its own mutex")
Fixes: c84455b4ba ("drm/i915: Move debug only per-request pid tracking from request to ctx")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101460
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Daniel Vetter <daniel.vetter@intel.com >
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170617115744.4452-1-chris@chris-wilson.co.uk
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
2017-06-21 10:31:00 +01:00
Liviu Dudau
49a58f26af
drm/arm: hdlcd: Use CMA helper for plane buffer address calculation
...
CMA has gained a recent helper function for calculating the start
of the plane buffer's physical address. Use that instead of the
hand rolled version.
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com >
2017-06-21 10:30:01 +01:00
Liviu Dudau
de5cc8155c
drm/arm: hdlcd: Set the CRTC's port before binding the encoder.
...
The component-based encoder(s) used by HDLCD expect the CRTC port
to be set before binding in order to find the right endpoint.
Without this patch, the TDA19988 encoder driver prints a warning
"Falling back to first CRTC".
Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com >
2017-06-21 10:30:01 +01:00
Chris Wilson
7a3bc034ed
drm/i915: Assert the vma's active tracking is clear before free
...
In looking at a use-after-free on Baytrail, it looks like the VMA's
activity tracking is suspect. Add some asserts to catch freeing the VMA
before we have decoupled all of its i915_gem_active trackers.
References: https://bugs.freedesktop.org/show_bug.cgi?id=101511
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com >
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170620124321.1108-3-chris@chris-wilson.co.uk
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com >
2017-06-21 10:24:10 +01:00
Chris Wilson
760a898d80
drm/i915: Retire the VMA's fence tracker before unbinding
...
Since we may track unfenced access (GPU access to the vma that
explicitly requires no fence), vma->last_fence may be set without any
attached fence (vma->fence) and so will not be flushed when we call
i915_vma_put_fence(). Since we stopped doing a full retire of the
activity trackers for unbind, we need to explicitly retire each tracker.
Fixes: b0decaf75b ("drm/i915: Track active vma requests")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170620124321.1108-1-chris@chris-wilson.co.uk
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com >
2017-06-21 10:23:28 +01:00
Nicholas Piggin
a25bcadd0d
drm/i915: select CRC32
...
kbuild test robot found a build failure when building with thin
archives:
http://marc.info/?l=linux-kbuild&m=149802285009737&w=2
Signed-off-by: Nicholas Piggin <npiggin@gmail.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/20170621063420.24913-1-npiggin@gmail.com
2017-06-21 11:13:27 +02:00
Daniel Vetter
e94ac3510b
drm: Fix GETCONNECTOR regression
...
In
commit 91eefc05f0
Author: Daniel Vetter <daniel.vetter@ffwll.ch >
Date: Wed Dec 14 00:08:10 2016 +0100
drm: Tighten locking in drm_mode_getconnector
I reordered the logic a bit in that IOCTL, but that broke userspace
since it'll get the new mode list, but not the new property values.
Fix that again.
v2: Fix up the error path handling when copy_to_user for the modes
failes (Dhinakaran).
Fixes: 91eefc05f0 ("drm: Tighten locking in drm_mode_getconnector")
Cc: Sean Paul <seanpaul@chromium.org >
Cc: Daniel Vetter <daniel.vetter@intel.com >
Cc: Jani Nikula <jani.nikula@linux.intel.com >
Cc: David Airlie <airlied@linux.ie >
Cc: dri-devel@lists.freedesktop.org
Reported-by: "H.J. Lu" <hjl.tools@gmail.com >
Tested-by: "H.J. Lu" <hjl.tools@gmail.com >
Cc: <stable@vger.kernel.org > # v4.11+
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100576
Cc: "H.J. Lu" <hjl.tools@gmail.com >
Cc: "Pandiyan, Dhinakaran" <dhinakaran.pandiyan@intel.com >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170620202837.1701-1-daniel.vetter@ffwll.ch
2017-06-21 09:18:44 +02:00
Arvind Yadav
8590971662
drm: armada: make of_device_ids const.
...
of_device_ids are not supposed to change at runtime. All functions
working with of_device_ids provided by <linux/of.h> work with const
of_device_ids. So mark the non-const structs as const.
File size before:
text data bss dec hex filename
8836 744 0 9580 256c drivers/gpu/drm/armada/armada_crtc.o
File size after constify armada_lcd_of_match:
text data bss dec hex filename
9220 328 0 9548 254c drivers/gpu/drm/armada/armada_crtc.o
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/ff9a9a908cf347775ab62cfadfde986de72dcf13.1497935382.git.arvind.yadav.cs@gmail.com
2017-06-21 09:06:44 +02:00
Dave Airlie
816b4e448c
Merge branch 'drm-fixes-4.12' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
...
A few fixes for 4.12:
- Add a new Polaris12 pci id
- A stack corruption fix
- Suspend/resume fix
- PX fix
- Display flickering fix
* 'drm-fixes-4.12' of git://people.freedesktop.org/~agd5f/linux:
drm/radeon: add a quirk for Toshiba Satellite L20-183
drm/radeon: add a PX quirk for another K53TK variant
drm/amdgpu: adjust default display clock
drm/amdgpu/atom: fix ps allocation size for EnableDispPowerGating
drm/amdgpu: add Polaris12 DID
2017-06-21 11:23:35 +10:00
Dave Airlie
09da4baa4d
Merge tag 'drm-intel-fixes-2017-06-20' of git://anongit.freedesktop.org/git/drm-intel into drm-fixes
...
drm/i915 fixes for v4.12-rc7
* tag 'drm-intel-fixes-2017-06-20' of git://anongit.freedesktop.org/git/drm-intel:
drm/i915: Don't enable backlight at setup time.
drm/i915: Plumb the correct acquire ctx into intel_crtc_disable_noatomic()
drm/i915: Fix deadlock witha the pipe A quirk during resume
drm/i915: Remove __GFP_NORETRY from our buffer allocator
drm/i915: Encourage our shrinker more when our shmemfs allocations fails
drm/i915: Differentiate between sw write location into ring and last hw read
2017-06-21 11:22:34 +10:00
Dave Airlie
047b8e21e3
Merge tag 'drm-misc-next-2017-06-19_0' of git://anongit.freedesktop.org/git/drm-misc into drm-next
...
UAPI Changes:
- vc4: Add get/set tiling format ioctls (Eric)
Driver Changes:
- vc4: Add tiling T-format support for scanout (Eric)
- vc4: Use atomic helpers in commit (Boris)
Cc: Boris Brezillon <boris.brezillon@free-electrons.com >
Cc: Eric Anholt <eric@anholt.net >
* tag 'drm-misc-next-2017-06-19_0' of git://anongit.freedesktop.org/git/drm-misc:
drm/vc4: Mimic drm_atomic_helper_commit() behavior
drm/vc4: Add get/set tiling ioctls.
drm/vc4: Add T-format scanout support.
2017-06-21 08:57:34 +10:00
Dave Airlie
296923e121
drm/i915: remove rate_to_index, messed up merge.
...
This was from a merge I did incorrectly.
Signed-off-by: Dave Airlie <airlied@redhat.com >
2017-06-21 08:56:54 +10:00