Commit Graph

25361 Commits

Author SHA1 Message Date
Wyon Bi
313564d931 drm/rockchip: dsi: support non-continuous clock behavior
This bit enables the automatic mechanism to stop providing clock in
the clock lane when time allows.

Change-Id: Ia3d85589f54adcf6206ee7ded32624b8e92936af
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-01-12 15:03:33 +08:00
Shunqing Chen
9ff817b7ab drm/rockchip: inno_hdmi: add support for rk618
Change-Id: Ic4fcfbc9adec378c67666455e45ae581e3a46ecd
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-01-12 15:03:05 +08:00
Wyon Bi
714abae67e drm/rockchip: rk618: vif: Convert to drm_bridge
Change-Id: I124bfabf7fe67854f55aef5fec0cad00cd5e2eac
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-01-11 16:52:00 +08:00
Wyon Bi
faa3764d61 drm/rockchip: dsi: Add support for PX30
Change-Id: Ib7e43456d8456b1db74880710b88bdf7da4639e8
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-01-11 16:44:58 +08:00
Wyon Bi
371553e68b drm/rockchip: dsi: Add a better description for dw_mipi_dsi_plat_data
Change-Id: I6a149747a12bbd1c3e84cd33769ed453770353af
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-01-11 16:44:26 +08:00
Wyon Bi
993719678f drm/rockchip: dsi: Convert to use regmap
Change-Id: Ia697fce3f51cf0278f37ac0e809173ebca076d6b
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-01-11 10:16:34 +08:00
Wyon Bi
51a7171dd2 drm/rockchip: dsi: Fix pclk hanndling
Change-Id: I31f6bc3991a03b79209c846a9c051acb0b2e8270
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-01-11 10:16:24 +08:00
Wyon Bi
b3e88957f8 drm/rockchip: dsi: support read command
Change-Id: I195b25ecef18978b1801e39ddc3fa37a3ae94050
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-01-08 20:52:18 +08:00
Wyon Bi
db8a437fd3 drm/panel: simple: Add support for BOE MV270QUM-N10
This adds support for the BOE Corporation MV270QUM-N10 27"
eDP(HBR2, 5.4Gbps) UHD TFT LCD panel, which can be supported
by the simple panel driver.

Change-Id: Ib7df60a7c9a5cd4755a67bedef35a95bcc16a498
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-01-05 17:38:15 +08:00
Sandy Huang
f73ce8e085 drm/rockchip: vop: add support overscan for TV
Change-Id: Id4e37862df2b8acd0012469eb3793aa550491fb0
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-01-05 14:19:52 +08:00
Sandy Huang
c6fc59e97a drm/rockchip: vop: fix win2 area0 mst register config error
Change-Id: If122fb253090c4a613f9d5a63f9fcf9f75f31db6
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-01-05 14:19:21 +08:00
Javi Merino
5dcb4226bb BACKPORT: devfreq_cooling: pass a pointer to devfreq in the power model callbacks
When the devfreq cooling device was designed, it was an oversight not to
pass a pointer to the struct devfreq as the first parameters of the
callbacks.  The design patterns of the kernel suggest it for a good
reason.

By passing a pointer to struct devfreq, the driver can register one
function that works with multiple devices.  With the current
implementation, a driver that can work with multiple devices has to
create multiple copies of the same function with different parameters so
that each devfreq_cooling_device can use the appropriate one.  By
passing a pointer to struct devfreq, the driver can identify which
device it's referring to.

Change-Id: I384bf9aafd2391eccab2ca6a76e4e57f2740aa6b
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Reviewed-by: Punit Agrawal <punit.agrawal@arm.com>
Reviewed-by: Ørjan Eide <orjan.eide@arm.com>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Signed-off-by: Javi Merino <javi.merino@arm.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 3aa5374376)
2018-01-04 09:22:34 +08:00
Sandy Huang
855ab68dd6 drm/rockchip: fix uninitialized symbol np_connector
Change-Id: If96511d058a94bbe18c63892a569e206559861d3
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-01-03 14:10:33 +08:00
Sandy Huang
f3cbfc89db drm/rockchip: vop: add support vop global alpha
Change-Id: Ifcd61468adcca8e109a3b43534febf4ee80c1d1f
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-01-03 10:58:40 +08:00
Sandy Huang
aca6aba688 drm/rockchip: vop: add support px30 afbdc
Px30 afbdc made some improvements base on rk3399:
1. support virth width;
2. support buffer xoffset and yoffset;

Change-Id: I6d5b8bc0a66e468882998c9940da21812896b5c4
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-01-02 11:50:07 +08:00
Sandy Huang
a49729409e drm/rockchip: vop: add support px30
PX30 have two vop(vopb and vopl), the vopb have win0, win1 and win2,
the vopl have win1.

win0: support yuv and scale;
win1: support rgbx and afbdc format(vopb only);
win2: support rgbx and four region;

Change-Id: Ibb0ec88bb6c0a5e031d21432a86734fc9267fd1d
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-01-02 11:49:59 +08:00
Liang Chen
17efab953d soc: rockchip: add functions to select opp level form device-tree
Some chips need adjust opp level by different chip-process, add
common functions to select opp level from device-tree, so modules
can select opp level easy.

Change-Id: Ifbd5f720e6a52a68f13697bbb37ac01ff4a87e3e
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-01-02 10:21:39 +08:00
Algea Cao
039a91179b drm/rockchip: Fix up cvbs color abnormal
Solve the cvbs color err after switch from hdmi by
setting cvbs tv state.

Change-Id: Iaf50c2dbbf954fc8437395b88c41846ca47631f3
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2017-12-29 19:22:30 +08:00
Algea Cao
7ba0e9b47a drm/rockchip: Fix cvbs color space
Set cvbs color space to V4L2_COLORSPACE_SMPTE170M
to prevent display err.

Change-Id: I12cb71938e9c423397d64f68a46a257e7e0af5c4
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2017-12-29 18:41:37 +08:00
Zheng Yang
214f0874a3 drm/rockchip: dw-hdmi: fix note of Automatic color depth
Automatic color depth is same as 24bit.

Change-Id: Ifb9cc0d1292626019c9e1260124f79db1490bb70
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-12-29 17:05:06 +08:00
Algea Cao
86155ccebc drm/bridge/synopsys: Move cec_notifier_set_phys_addr out of rxsense setup
If put cec_notifier_set_phys_addr in rxsense setup, hdmi->mutex may
become deadlock. Because cec_notifier_set_phys_addr will call
dw_hdmi_cec_enable which cause hdmi->mutex become deadlock.

Change-Id: I4fed641c9e9d7674451402a973196ef0efeb198f
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2017-12-29 14:30:42 +08:00
Pierre-Hugues Husson
fc41368466 UPSTREAM: drm/bridge: synopsys/dw-hdmi: Enable cec clock
Support the "cec" optional clock. The documentation already mentions "cec"
optional clock and it is used by several boards, but currently the driver
doesn't enable it, thus preventing cec from working on those boards.

And even worse: a /dev/cecX device will appear for those boards, but it
won't be functioning without configuring this clock.

Changes:
v4:
- Change commit message to stress the importance of this patch

v3:
- Drop useless braces

v2:
- Separate ENOENT errors from others
- Propagate other errors (especially -EPROBE_DEFER)

Signed-off-by: Pierre-Hugues Husson <phh@phh.me>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20171125201844.11353-1-phh@phh.me
(cherry picked from commit ebe32c3e28)

Change-Id: I084e254f7ee1b2c537d3f18897d64578e8bfd482
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2017-12-29 09:17:52 +08:00
Chris Wilson
2741859988 UPSTREAM: drm: Release driver references to handle before making it available again
When userspace closes a handle, we remove it from the file->object_idr
and then tell the driver to drop its references to that file/handle.
However, as the file/handle is already available again for reuse, it may
be reallocated back to userspace and active on a new object before the
driver has had a chance to drop the old file/handle references.

Whilst calling back into the driver, we have to drop the
file->table_lock spinlock and so to prevent reusing the closed handle we
mark that handle as stale in the idr, perform the callback and then
remove the handle. We set the stale handle to point to the NULL object,
then any idr_find() whilst the driver is removing the handle will return
NULL, just as if the handle is already removed from idr.

Note: This will be used to have a direct handle -> vma lookup table,
instead of first a handle -> obj lookup, and then an (obj, vm) -> vma
lookup.

v2: Use NULL rather than an ERR_PTR to avoid having to adjust callers.
idr_alloc() tracks existing handles using an internal bitmap, so we are
free to use the NULL object as our stale identifier.
v3: Needed to update the return value check after changing from using
the stale error pointer to NULL.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: dri-devel@lists.freedesktop.org
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Thierry Reding <treding@nvidia.com>
[danvet: Add note about the use-case.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1460721308-32405-1-git-send-email-chris@chris-wilson.co.uk
(cherry picked from commit f6cd7daecf)

Change-Id: Icfa68bd1916c6a3f3b13a33b648bad5006ee2f80
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2017-12-28 16:24:06 +08:00
Chris Wilson
b64b1e03c9 UPSTREAM: drm: Remove opencoded drm_gem_object_release_handle()
drm_gem_handle_delete() contains its own version of
drm_gem_object_release_handle(), so lets just call the release method
instead.

Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1451986951-3703-2-git-send-email-chris@chris-wilson.co.uk
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit 8815b23aa0)

Change-Id: I3ab767d8f42e9ac6ca29b2b2f1d56a30eca02497
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2017-12-28 16:24:06 +08:00
Chris Wilson
6fe76ee08e UPSTREAM: drm: Do not set outparam on error during GEM handle allocation
Good practice dictates that we do not leak stale information to our
callers, and should avoid overwriting an outparam on an error path.

Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1451986951-3703-1-git-send-email-chris@chris-wilson.co.uk
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit 9649399e91)

Change-Id: Id6f2a968d66ff463481e8e090522c837b9e12730
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2017-12-28 16:24:06 +08:00
Chris Wilson
3535f99a2d UPSTREAM: drm: Use a normal idr allocation for the obj->name
Unlike the handle, the name table uses a sleeping mutex rather than a
spinlock. The allocation is in a normal context, and we can use the
simpler sleeping gfp_t, rather than have to take from the atomic
reserves.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1451902261-25380-3-git-send-email-chris@chris-wilson.co.uk
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit 0f646425b9)

Change-Id: I5e087d086b0cd8efbc6bbca56d2dbe6f587ad63f
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2017-12-28 16:24:06 +08:00
Chris Wilson
330381b990 UPSTREAM: drm: Only bump object-reference count when adding first handle
We only need a single reference count for all handles (i.e. non-zero
obj->handle_count) and so can trim a few atomic operations by only
taking the reference on the first handle and dropping it after the last.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1451902261-25380-2-git-send-email-chris@chris-wilson.co.uk
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit 98a8883ad4)

Change-Id: I49d99d2d66658591bf7dcd2a290eb3106c4f6cbb
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2017-12-28 16:24:06 +08:00
Sandy Huang
eaa2077de0 drm/rockchip: fix VOP_REG_SUPPORT judge wrong
If the register isn't define at rockchip_vop_reg.c, the default value
of reg.major is 0, this will lead to judge error. so we add reg.mask
conditions because if it's defined register, the reg.mask can't be 0.

Change-Id: I753b92476fda15a64f94e4a8a47894c5ac3a1a7f
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2017-12-28 14:44:05 +08:00
Zheng Yang
0168873019 drm/bridge/synopsys: fix uninitialized symbol config0
Change-Id: Ifb2438150a5adda4e9542b70668f545c42138e07
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-12-28 11:05:04 +08:00
Sandy Huang
6d852444b8 drm/rockchip: add afbdc feature for plane
For next Soc VOP only vopb win1 support AFBDC, so we need
add afbdc feature for every win.

Change-Id: Icbe5e26189d2147a6b81f2f75d0b855b2c35fd26
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2017-12-28 11:04:01 +08:00
Laurent Pinchart
268d7f4e3d drm: bridge: dw-hdmi: Move the driver to a separate directory.
The driver is already made of 5 separate source files. Move it to a
newly created directory named synopsys where more Synopsys bridge
drivers can be added later (for the DisplayPort controller for
instance).

Suggested-by: Jose Abreu <Jose.Abreu@synopsys.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Jose Abreu <joabreu@synopsys.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20170303172007.26541-10-laurent.pinchart+renesas@ideasonboard.com
(cherry picked from commit 35dc8aabc8)

Change-Id: Ibf30c8dcb9f1a326f35dd7e36908d3dd2776091f
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-12-28 10:54:44 +08:00
Sandy Huang
70f2a67d36 drm/rockchip: vop: fix hdr2sdr csc error
Change-Id: I9792f14675527ff192e77ea7f9fe0f58b09e54b3
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2017-12-28 10:47:46 +08:00
Algea Cao
1be71d23f0 UPSTREAM: drm/bridge: dw-hdmi: add cec driver
Add a CEC driver for the dw-hdmi hardware.

Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
[hans.verkuil: unsigned -> unsigned int]
[hans.verkuil: cec_transmit_done -> cec_transmit_attempt_done]
[hans.verkuil: add missing CEC_CAP_PASSTHROUGH]
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20170802184108.7913-4-hverkuil@xs4all.nl
(cherry picked from commit a616e63c56)

Change-Id: I9e50f3e87d452bc7291755eae4aa14a3ec7ab0b3
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2017-12-27 16:54:13 +08:00
Algea Cao
e453db15f1 UPSTREAM: drm/bridge: dw-hdmi: add missing cec_notifier_put
The __dw_hdmi_remove() function was missing a call to cec_notifier_put
to balance the cec_notifier_get in the probe function.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: https://patchwork.freedesktop.org/patch/msgid/a7688d13-2d61-ed16-f2df-28cbb5007f38@xs4all.nl
(cherry picked from commit e383bf85d3)

Change-Id: I59de801ba6e4c0956b6ba76a49dc57bda34c36a7
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2017-12-27 16:48:24 +08:00
Algea Cao
970623d0d1 UPSTREAM: drm/bridge: dw-hdmi: add better clock disable control
The video setup path aways sets the clock disable register to a specific
value, which has the effect of disabling the CEC engine.  When we add the
CEC driver, this becomes a problem.

Fix this by only setting/clearing the bits that the video path needs to.

Reviewed-by: Jose Abreu <joabreu@synopsys.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: https://patchwork.freedesktop.org/patch/msgid/E1dcBha-00088l-DE@rmk-PC.armlinux.org.uk
(cherry picked from commit 7cc4ab225a)

Change-Id: Ic5603e5197d8107cba821ba4bc1bfbad2d12a1e2
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2017-12-27 16:45:52 +08:00
Algea Cao
c1a59df015 UPSTREAM: drm/bridge: dw-hdmi: add cec notifier support
Add CEC notifier support to the HDMI bridge driver, so that the CEC
part of the IP can receive its physical address.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Tested-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: https://patchwork.freedesktop.org/patch/msgid/E1dcBhV-00088e-8x@rmk-PC.armlinux.org.uk
(cherry picked from commit e84b8d75ac)

Change-Id: Ib3b3f6fc9e08fc3872b043f5dc36b77b50a378aa
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2017-12-27 16:45:32 +08:00
Zheng Yang
064184ce17 drm/rockchip: dw-hdmi: fix 3328/3228 phy bus width
If HDMI output corlor mode is YCbCr422, the tmds clock is same
to YCbCr444 8bit, phy bus width should be set to 8.

Change-Id: I6e844e676a6315ae0cb88b0bd8456f0e27fa5e0c
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-12-27 16:34:05 +08:00
xuhuicong
4f379e1892 drm/rockchip: inno_hdmi: add rk3128 hdmi support
Change-Id: I929880020f4a72e61d21b7af4d73a98da337b10b
Signed-off-by: Huicong Xu <xhc@rock-chips.com>
2017-12-26 15:37:38 +08:00
Thomas Meyer
9064923799 UPSTREAM: drm/rockchip: Cocci spatch "vma_pages"
Use vma_pages function on vma object instead of explicit computation.
Found by coccinelle spatch "api/vma_pages.cocci"

Change-Id: Ib6158ac90566f57a23127283d9462306817599b8
Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1505946334393-988165015-7-diffsplit-thomas@m3y3r.de
(cherry picked from commit f2a44dd023)
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2017-12-26 14:59:05 +08:00
Wyon Bi
6d51582d57 drm/rockchip: add support for rk618
RK618 provides a complete set of display interface to support
very flexible applications as follows:
- 2 RGB display input interface with double data rate
- 1 LVDS display output interface with double channels
- 1 MIPI display output interface with 4 data lanes
- 1 HDMI display output interface
- 1 RGB display output interface shared with LVDS
- 1 RGB display output interface shared with RGB display input interface

VIF is used to LCDC SDR/DDR timing reconstruction.

SCALER is a synchronous parallel RGB frame converter for different
resolution. It is used to realize dual display function from
one display source. It can be used like VIF for LCDC SDR timing
reconstruction only.

DITHER is used for converting 24bit RGB888 to 18bit RGB666 with FRC
dither down.

Change-Id: I5b25e64c283bd84f85d7d7686bee6d940df44910
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2017-12-21 10:32:02 +08:00
Zheng Yang
1a01eb5d1f drm/rockchip: vop: fix dsp_stx and dsp_sty of plane
The dsp_stx and dsp_sty of plane should use crtc_ variables
in adjusted_mode, which is the actual mode we give to hw.

Change-Id: I83199c80604e076f0b91559bff18e1da3783523f
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-12-20 17:08:15 +08:00
Finley Xiao
e8a0df4762 drm/rockchip: Avoid multiple definition
Change-Id: I091eb45fd4ccc30e648d4b743e1f541a8718cc9d
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-12-20 14:51:39 +08:00
Sandy Huang
d5417d3cac drm/rockchip: compare mode->flags with uboot config
If output interlace mode, we should compare the mode->flags to
make sure the vop output timing is unchanged.

Change-Id: I98b540a970cbfff2e957bb33506866dc954f3b05
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2017-12-19 17:51:54 +08:00
Sandy Huang
56c68a50e7 drm/rockchip: vop: fix vop_area->area_id define error
1.
before this commit:
	win3-0: DISABLED
	win3-0: DISABLED
	win3-1: DISABLED
	win3-2: DISABLED
after this commit:
	win3-0: DISABLED
	win3-1: DISABLED
	win3-2: DISABLED
	win3-3: DISABLED
2. fix compile error:
    vop_crtc_load_lut() error: uninitialized symbol 'lut_idx'.

Change-Id: I6cd2de972181438004a68d38ffeca939772ddb29
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2017-12-18 16:08:55 +08:00
Zheng Yang
a7d17fdc65 drm: bridge: dw-hdmi: fix tmds clk in status show
According to HDMI 2.0 chapter 6.1, for TMDS character Rates
avove 340Mcsc, the TMDS Clock Rate shall be one fourth of
the TMDS Character Rate.

Change-Id: I4cc78aa1a5fbf6cec93e787dde49e482d0b4d342
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-12-13 18:34:49 +08:00
Tao Huang
fc5f7f4e52 drm/rockchip: dw-hdmi: fix compilation warning for !PM_SLEEP
Change-Id: I404951709bef35cc2297fcc99002930ded17fe74
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2017-12-13 15:58:54 +08:00
Zheng Yang
df5711cded drm/rockchip: dw-hdmi: set default color depth to 8 bit
If color depth is automatic, it is same as 8bit.
If tmdsclk > max_tmds_clock, fall back to 8bit.

Change-Id: Ia8cbf5206831ef99456ae59add94c6f8b5a33380
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-12-13 14:09:48 +08:00
Jianqun Xu
024bde41c3 drm/rockchip: use __GFP_DMA32 for shmem-backed gem
Rockchip requires bo-pages to be in the DMA32 zone. Explicitly request this
by setting __GFP_DMA32 as mapping-gfp-mask during shmem initialization.
This drops HIGHMEM from the gfp-mask and uses DMA32 instead. shmem-core
takes care to relocate pages during swap-in in case they have been loaded
into the wrong zone.

It is _not_ possible to pass __GFP_DMA32 to shmem_read_mapping_page_gfp()
as the page might have already been swapped-in at that time. The zone-mask
must be set during initialization and be kept constant for now.

Change-Id: I6db4f9e8ed716a1f7c90c7d92920122a484bf45d
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2017-12-13 09:41:02 +08:00
Zhen Chen
aaa43b14a5 MALI Utgard: RK: only prepare clk_gpu not enable it in mali_probe()
Change-Id: I53b2b9e0a277bedc4a15899ae680ed944219f7bf
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2017-12-11 18:49:22 +08:00
Zheng Yang
f8fbbc4520 drm: bridge: dw-hdmi: introduce mpll_cfg_420
RK3368/RK3399 mpll input clock rate is twice of mpll output
in YCBCR420 mode. This patch introduce mpll_cfg_420 to get
the platform YCBCR420 phy setting. If mpll_cfg_420 is not
exist, use mpll_cfg.

Change-Id: I7910a75394cf371a8008f8a83e3ab9ec14e9a68a
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-12-11 15:27:58 +08:00