Commit Graph

1707 Commits

Author SHA1 Message Date
Huicong Xu
d4953cfed3 phy: rockchip: inno-hdmi: fix 4k10 bit display abnormal
avoid out of value range calculate catmdsclk when 4k10bit and set
scdc high tmds clock ratio when mtmdsclock is more than 340000000

Change-Id: I8aed4c99813e43c69526f3918d5e7024879d3288
Signed-off-by: Huicong Xu <xhc@rock-chips.com>
2018-01-30 16:24:50 +08:00
Tao Huang
640193f76b Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
* linux-linaro-lsk-v4.4-android: (733 commits)
  LSK-ANDROID: memcg: Remove wrong ->attach callback
  LSK-ANDROID: arm64: mm: Fix __create_pgd_mapping() call
  ANDROID: sdcardfs: Move default_normal to superblock
  blkdev: Refactoring block io latency histogram codes
  FROMLIST: arm64: kpti: Fix the interaction between ASID switching and software PAN
  FROMLIST: arm64: Move post_ttbr_update_workaround to C code
  FROMLIST: arm64: mm: Rename post_ttbr0_update_workaround
  sched: EAS: Initialize push_task as NULL to avoid direct reference on out_unlock path
  fscrypt: updates on 4.15-rc4
  ANDROID: uid_sys_stats: fix the comment
  BACKPORT: tee: indicate privileged dev in gen_caps
  BACKPORT: tee: optee: sync with new naming of interrupts
  BACKPORT: tee: tee_shm: Constify dma_buf_ops structures.
  BACKPORT: tee: optee: interruptible RPC sleep
  BACKPORT: tee: optee: add const to tee_driver_ops and tee_desc structures
  BACKPORT: tee.txt: standardize document format
  BACKPORT: tee: add forward declaration for struct device
  BACKPORT: tee: optee: fix uninitialized symbol 'parg'
  BACKPORT: tee: add ARM_SMCCC dependency
  BACKPORT: selinux: nlmsgtab: add SOCK_DESTROY to the netlink mapping tables
  ...

Conflicts:
	arch/arm64/kernel/vdso.c
	drivers/usb/host/xhci-plat.c
	include/drm/drmP.h
	include/linux/kasan.h
	kernel/time/timekeeping.c
	mm/kasan/kasan.c
	security/selinux/nlmsgtab.c

Also add this commit:
0bcdc0987cce ("time: Fix ktime_get_raw() incorrect base accumulation")
2018-01-26 19:26:47 +08:00
Noralf Trønnes
9728403491 UPSTREAM: drm/atomic: Add drm_atomic_helper_best_encoder()
Add (struct drm_connector_helper_funcs *)->best_encoder callback helper
for connectors that support exactly 1 encoder, statically determined at
driver init time.

Change-Id: Iddcf190e2a08a768dc8d5bb52a1e4572b1ce51d1
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1462982962-10530-6-git-send-email-noralf@tronnes.org
Signed-off-by: Jerry Xu <xbl@rock-chips.com>
(cherry picked from commit 9ecb549867d7f642f0379f574f0e52870009a8bf)
2018-01-23 14:27:05 +08:00
xuhuicong
87b681f969 drm/bridge: dw-hdmi: fix display shaking when uboot to kernel show
Change-Id: I899bb0dde7111fe97dd2c89d20afb09562d31300
Signed-off-by: xuhuicong <xhc@rock-chips.com>
2018-01-15 14:11:16 +08:00
Dave Gordon
74b6030355 drm: extra printk() wrapper macros
commit 30b0da8d556e65ff935a56cd82c05ba0516d3e4a upstream.

We had only DRM_INFO() and DRM_ERROR(), whereas the underlying printk()
provides several other useful intermediate levels such as NOTICE and
WARNING. So this patch fills out the set by providing both regular and
once-only macros for each of the levels INFO, NOTICE, and WARNING, using
a common underlying macro that does all the token-pasting.

DRM_ERROR is unchanged, as it's not just a printk wrapper.

v2:
    Fix whitespace, missing ## (Eric Engestrom)

Signed-off-by: Dave Gordon <david.s.gordon@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Cc: dri-devel@lists.freedesktop.org
Acked-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-16 10:33:49 +01: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
Zheng Yang
773d508df7 drm: introduce atomic_begin for connector
atomic_begin is used to prepare for update flush.

Change-Id: I1d3a2afaea4022c065bda2b4c0746464cc0c1303
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-12-11 15:17:24 +08:00
Mark Yao
8eb3838532 drm: support atomic update flush for connector
Change-Id: I101111c489b769244f9ef5e1c1ba78d31b272ae8
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-11-16 14:39:25 +08:00
Zheng Yang
36a3883514 drm: Add HDR panel metadata property
HDR_PANEL_METADATA is used to indicate HDR capacity of sink device.

Change-Id: I598a7bb5634f14b57f94135fd3be6b0ad2075116
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-11-08 16:45:50 +08:00
Zheng Yang
21b0ea0285 drm: record hdr_source_metadata_property blob_id
The blob_id is used to get blob data of hdr_source_metadata_property.

Change-Id: I8383265e50261438cf8484bd731e42fc23c24c51
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-11-08 16:45:18 +08:00
Rob Herring
aeaec6aa88 UPSTREAM: drm: of: introduce drm_of_find_panel_or_bridge
Many drivers have a common pattern of searching the OF graph for either an
attached panel or bridge and then finding the DRM struct for the panel
or bridge. Also, most drivers need to handle deferred probing when the
DRM device is not yet instantiated. Create a common function,
drm_of_find_panel_or_bridge, to find the connected node and the
associated DRM panel or bridge device.

(cherry picked from commit 1f2db3034c9f16ed918e34809167546f21d0fcb4)

Change-Id: Ibda889742bfb0ea53181ed2ef9b19a9d9df3303e
Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
[seanpaul dropped extern from drm_of.h]
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-11-08 10:29:53 +08:00
Zheng Yang
eda86cea45 drm: move panel HDR metadata to drm_hdmi_info
The hdr_panel_metadata indicate sink HDR capability,moving
it to drm_hdmi_info is more reasonable.

Change-Id: I0ccd404cfb0ec1e74130b0692de4261ae9a24c8f
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-11-02 15:41:19 +08:00
Uma Shankar
c51c06e952 FROMLIST: drm: Enable HDR infoframe support
Enable Dynamic Range and Mastering Infoframe for HDR
content, which is defined in CEA 861.3 spec.

 The metadata will be computed based on blending
policy in userspace compositors and passed as a connector
property blob to driver. The same will be sent as infoframe
to panel which support HDR.

Change-Id: I8025c3dba43dc5bb614115ede7841fe89d9f4d0b
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
(am from https://patchwork.kernel.org/patch/9756447/)
2017-11-02 15:33:34 +08:00
Uma Shankar
b1d0690d17 FROMLIST: drm: Add HDR source metadata property
This patch adds a blob property to get HDR metadata
information from userspace. This will be send as part
of AVI Infoframe to panel.

Change-Id: I0d009889ca567213a5e264d74b6816ba6d2ee0d4
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
(am from https://patchwork.kernel.org/patch/9756427/)
2017-11-02 15:33:02 +08:00
Uma Shankar
2ea096780c FROMLIST: drm: Parse Colorimetry data block from EDID
CEA 861.3 spec adds colorimetry data block for HDMI.
Parsing the block to get the colorimetry data from
panel.

Change-Id: I7067bdec0dde52bc0e83d3cd30e6a674020823ad
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
(am from https://patchwork.kernel.org/patch/9756433/)
2017-11-02 15:32:35 +08:00
Zheng Yang
a7a73c3770 drm: bridge: dw-hdmi: support attach property
Introduce struct dw_hdmi_property_ops in plat_data to attach
vendor connector property.

Change-Id: I3d23e40e9d342b22ca47f723b3f81057b58010e8
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-11-01 09:08:04 +08:00
Zheng Yang
a931e3a83f drm: fix ycbcr 420 deep color defination
According to HDMI2.0 spec table 10-6, DC_48bit_420/DC_36bit_420/
DC_30bit_420 is at bit2~bit0 of HDMI Fortum Vendor Specific Data
Block byte7.

Change-Id: Iab2748695c68b950617955132579a3c12476cc5b
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-10-31 11:51:47 +08:00
Jyri Sarha
5cb9cc3e1b UPSTREAM: drm: Make drm_atomic_replace_property_blob_from_id() more generic
Change drm_atomic_replace_property_blob_from_id()'s first parameter
from drm_crtc to drm_device, so that the function can be used for other
drm_mode_objects too.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/851b8504c7f294a10645ba6f6d391ac9764068b7.1492768073.git.jsarha@ti.com
(cherry picked from commit dafee60d4801a1f4e0e396c91ea0dab3073f9263)

Change-Id: I479323a163deaeb6e6ecac2f04fecb39d48444b1
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-10-30 11:08:41 +08:00
Mark Yao
8f4d032130 drm/atomic-helper: fixup atomit commit backport
Change-Id: I7a8dc2552a1738eb3837e7bfffb82872627340c9
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-10-24 15:12:16 +08:00
Daniel Vetter
6d2f104013 UPSTREAM: drm/atomic-helper: roll out commit synchronization
To facilitate easier reviewing this is split out from the overall
nonblocking commit rework. It just rolls out the helper functions
and uses them in the main drm_atomic_helper_commit() function
to make it clear where in the flow they're used.

The next patch will actually split drm_atomic_helper_commit() into
2 pieces, with the tail being run asynchronously from a worker.

v2: Improve kerneldocs (Maarten).

v3: Don't convert ERESTARTSYS to EINTR (Maarten). Also don't fail if
the wait succeed in stall_check - we need to convert that case (it
returns the remaining jiffies) to 0 for success.

v4: Switch to long for wait_for_completion_timeout return value
everywhere (Maarten).

v5: Fix miscaped function in kerneldoc (Maarten).

Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Tested-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Tomeu Vizoso <tomeu.vizoso@gmail.com>
Cc: Daniel Stone <daniels@collabora.com>
Tested-by: Liviu Dudau <Liviu.Dudau@arm.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1465398936-22305-1-git-send-email-daniel.vetter@ffwll.ch
(cherry picked from commit a095caa7f5ec54b51a1aa8a5c692b2a8c1609f5d)

Change-Id: I116ef7f1196534159dd75d75e9bfa712ca869249
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-10-24 15:12:06 +08:00
Daniel Vetter
8b97ee27fd UPSTREAM: drm/atomic: Add struct drm_crtc_commit to track async updates
Split out from my big nonblocking atomic commit helper code as prep
work. While add it, also add some neat asciiart to document how it's
supposed to be used.

v2: Resurrect misplaced hunk in the kerneldoc.

v3: Wording improvements from Liviu.

Tested-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Tomeu Vizoso <tomeu.vizoso@gmail.com>
Cc: Daniel Stone <daniels@collabora.com>
Tested-by: Liviu Dudau <Liviu.Dudau@arm.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1465388359-8070-8-git-send-email-daniel.vetter@ffwll.ch
(cherry picked from commit 3b24f7d6758165919ba7b83b3c8365c38ffacc0b)

Change-Id: I3c8ffa0d3defc915bac9127944ebb962b04806ad
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-10-24 15:11:44 +08:00
Daniel Vetter
8862c8b101 UPSTREAM: drm: Create drm_send_event helpers
Use them in the core vblank code and exynos/vmwgfx drivers.

Note that the difference between wake_up_all and _interruptible in
vmwgfx doesn't matter since the only waiter is the core code in
drm_fops.c. And that is interruptible.

v2: Adjust existing kerneldoc too.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1)
Acked-by: Daniel Stone <daniels@collabora.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Thomas Hellstrom <thellstrom@vmware.com>
Cc: Inki Dae <inki.dae@samsung.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1452548477-15905-6-git-send-email-daniel.vetter@ffwll.ch
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
[danvet: Squash in compile fixup, spotted by 0-day.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

(cherry picked from commit fb740cf2492cc1e8f2216bc5ad9f5b2c49a32752)

Change-Id: I249350864b0b236b6289d2badbbdf32bd4607f36
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-10-24 15:11:28 +08:00
Daniel Vetter
092d14f0b8 UPSTREAM: drm: Add functions to setup/tear down drm_events.
An attempt at not spreading out the file_priv->event_space stuff out
quite so far and wide.  And I think fixes something in ipp_get_event()
that is broken (or if they are doing something more weird/subtle, then
breaks it in a fun way).

Based upon a patch from Rob Clark, rebased and polished.

v2: Spelling fixes (Alex).

Cc: Alex Deucher <alexdeucher@gmail.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Cc: Rob Clark <robdclark@gmail.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1452548477-15905-3-git-send-email-daniel.vetter@ffwll.ch
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
(cherry picked from commit 2dd500f1870e3d852488c9b30c4ecec91c6e2eea)

Change-Id: I8d42c34f019cf6e4eb0617646e887431c0aa455f
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-10-24 15:11:20 +08:00
xuhuicong
727e0fe68d drm/edid: output common tv resolution and hdmi mode if no read the correct edid
Change-Id: Ib7379340e8c1d59382553d21b60165fe5fb371e8
Signed-off-by: xuhuicong <xhc@rock-chips.com>
2017-09-29 16:59:09 +08:00
Zheng Yang
8f49e6018e drm: bridge: dw-hdmi: support dynamically get input/out color info
To get input/output bus_format/enc_format dynamically, this patch
introduce following funstion in plat_data:
	- get_input_bus_format
	- get_output_bus_format
	- get_enc_in_encoding
	- get_enc_out_encoding

Change-Id: Ic703cba93fad8ceff773e1caca80759f95a9d547
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-09-13 15:22:15 +08:00