aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-07-09 21:48:37 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-07-09 21:48:37 -0400
commitaf3c8d98508d37541d4bf57f13a984a7f73a328c (patch)
treee8dd974d6ebccd38b1e373be8a5e4a2f8bf3c6ce /include/linux
parentd3e3b7eac886fb1383db2f22b81550fa6d87f62f (diff)
parent00fc2c26bc46a64545cdf95a1511461ea9acecb4 (diff)
Merge tag 'drm-for-v4.13' of git://people.freedesktop.org/~airlied/linux
Pull drm updates from Dave Airlie: "This is the main pull request for the drm, I think I've got one later driver pull for mediatek SoC driver, I'm undecided on if it needs to go to you yet. Otherwise summary below: Core drm: - Atomic add driver private objects - Deprecate preclose hook in modern drivers - MST bandwidth tracking - Use kvmalloc in more places - Add mode_valid hook for crtc/encoder/bridge - Reduce sync_file construction time - Documentation updates - New DRM synchronisation object support New drivers: - pl111 - pl111 CLCD display controller Panel: - Innolux P079ZCA panel driver - Add NL12880B20-05, NL192108AC18-02D, P320HVN03 panels - panel-samsung-s6e3ha2: Add s6e3hf2 panel support i915: - SKL+ watermark fixes - G4x/G33 reset improvements - DP AUX backlight improvements - Buffer based GuC/host communication - New getparam for (sub)slice infomation - Cannonlake and Coffeelake initial patches - Execbuf optimisations radeon/amdgpu: - Lots of Vega10 bug fixes - Preliminary raven support - KIQ support for compute rings - MEC queue management rework - DCE6 Audio support - SR-IOV improvements - Better radeon/amdgpu selection support nouveau: - HDMI stereoscopic support - Display code rework for >= GM20x GPUs msm: - GEM rework for fine-grained locking - Per-process pagetable work - HDMI fixes for Snapdragon 820. vc4: - Remove 256MB CMA limit from vc4 - Add out-fence support - Add support for cygnus - Get/set tiling ioctls support - Add T-format tiling support for scanout zte: - add VGA support. etnaviv: - Thermal throttle support for newer GPUs - Restore userspace buffer cache performance - dma-buf sync fix stm: - add stm32f429 display support exynos: - Rework vblank handling - Fixup sw-trigger code sun4i: - V3s display engine support - HDMI support for older SoCs - Preliminary work on dual-pipeline SoCs. rcar-du: - VSP work imx-drm: - Remove counter load enable from PRE - Double read/write reduction flag support tegra: - Documentation for the host1x and drm driver. - Lots of staging ioctl fixes due to grate project work. omapdrm: - dma-buf fence support - TILER rotation fixes" * tag 'drm-for-v4.13' of git://people.freedesktop.org/~airlied/linux: (1270 commits) drm: Remove unused drm_file parameter to drm_syncobj_replace_fence() drm/amd/powerplay: fix bug fail to remove sysfs when rmmod amdgpu. amdgpu: Set cik/si_support to 1 by default if radeon isn't built drm/amdgpu/gfx9: fix driver reload with KIQ drm/amdgpu/gfx8: fix driver reload with KIQ drm/amdgpu: Don't call amd_powerplay_destroy() if we don't have powerplay drm/ttm: Fix use-after-free in ttm_bo_clean_mm drm/amd/amdgpu: move get memory type function from early init to sw init drm/amdgpu/cgs: always set reference clock in mode_info drm/amdgpu: fix vblank_time when displays are off drm/amd/powerplay: power value format change for Vega10 drm/amdgpu/gfx9: support the amdgpu.disable_cu option drm/amd/powerplay: change PPSMC_MSG_GetCurrPkgPwr for Vega10 drm/amdgpu: Make amdgpu_cs_parser_init static (v2) drm/amdgpu/cs: fix a typo in a comment drm/amdgpu: Fix the exported always on CU bitmap drm/amdgpu/gfx9: gfx_v9_0_enable_gfx_static_mg_power_gating() can be static drm/amdgpu/psp: upper_32_bits/lower_32_bits for address setup drm/amd/powerplay/cz: print message if smc message fails drm/amdgpu: fix typo in amdgpu_debugfs_test_ib_init ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/amba/clcd-regs.h86
-rw-r--r--include/linux/amba/clcd.h68
-rw-r--r--include/linux/host1x.h38
-rw-r--r--include/linux/platform_data/omapdss.h1
-rw-r--r--include/linux/sync_file.h14
5 files changed, 132 insertions, 75 deletions
diff --git a/include/linux/amba/clcd-regs.h b/include/linux/amba/clcd-regs.h
new file mode 100644
index 000000000000..516a6fda83c5
--- /dev/null
+++ b/include/linux/amba/clcd-regs.h
@@ -0,0 +1,86 @@
1/*
2 * David A Rusling
3 *
4 * Copyright (C) 2001 ARM Limited
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file COPYING in the main directory of this archive
8 * for more details.
9 */
10
11#ifndef AMBA_CLCD_REGS_H
12#define AMBA_CLCD_REGS_H
13
14/*
15 * CLCD Controller Internal Register addresses
16 */
17#define CLCD_TIM0 0x00000000
18#define CLCD_TIM1 0x00000004
19#define CLCD_TIM2 0x00000008
20#define CLCD_TIM3 0x0000000c
21#define CLCD_UBAS 0x00000010
22#define CLCD_LBAS 0x00000014
23
24#define CLCD_PL110_IENB 0x00000018
25#define CLCD_PL110_CNTL 0x0000001c
26#define CLCD_PL110_STAT 0x00000020
27#define CLCD_PL110_INTR 0x00000024
28#define CLCD_PL110_UCUR 0x00000028
29#define CLCD_PL110_LCUR 0x0000002C
30
31#define CLCD_PL111_CNTL 0x00000018
32#define CLCD_PL111_IENB 0x0000001c
33#define CLCD_PL111_RIS 0x00000020
34#define CLCD_PL111_MIS 0x00000024
35#define CLCD_PL111_ICR 0x00000028
36#define CLCD_PL111_UCUR 0x0000002c
37#define CLCD_PL111_LCUR 0x00000030
38
39#define CLCD_PALL 0x00000200
40#define CLCD_PALETTE 0x00000200
41
42#define TIM2_PCD_LO_MASK GENMASK(4, 0)
43#define TIM2_PCD_LO_BITS 5
44#define TIM2_CLKSEL (1 << 5)
45#define TIM2_IVS (1 << 11)
46#define TIM2_IHS (1 << 12)
47#define TIM2_IPC (1 << 13)
48#define TIM2_IOE (1 << 14)
49#define TIM2_BCD (1 << 26)
50#define TIM2_PCD_HI_MASK GENMASK(31, 27)
51#define TIM2_PCD_HI_BITS 5
52#define TIM2_PCD_HI_SHIFT 27
53
54#define CNTL_LCDEN (1 << 0)
55#define CNTL_LCDBPP1 (0 << 1)
56#define CNTL_LCDBPP2 (1 << 1)
57#define CNTL_LCDBPP4 (2 << 1)
58#define CNTL_LCDBPP8 (3 << 1)
59#define CNTL_LCDBPP16 (4 << 1)
60#define CNTL_LCDBPP16_565 (6 << 1)
61#define CNTL_LCDBPP16_444 (7 << 1)
62#define CNTL_LCDBPP24 (5 << 1)
63#define CNTL_LCDBW (1 << 4)
64#define CNTL_LCDTFT (1 << 5)
65#define CNTL_LCDMONO8 (1 << 6)
66#define CNTL_LCDDUAL (1 << 7)
67#define CNTL_BGR (1 << 8)
68#define CNTL_BEBO (1 << 9)
69#define CNTL_BEPO (1 << 10)
70#define CNTL_LCDPWR (1 << 11)
71#define CNTL_LCDVCOMP(x) ((x) << 12)
72#define CNTL_LDMAFIFOTIME (1 << 15)
73#define CNTL_WATERMARK (1 << 16)
74
75/* ST Microelectronics variant bits */
76#define CNTL_ST_1XBPP_444 0x0
77#define CNTL_ST_1XBPP_5551 (1 << 17)
78#define CNTL_ST_1XBPP_565 (1 << 18)
79#define CNTL_ST_CDWID_12 0x0
80#define CNTL_ST_CDWID_16 (1 << 19)
81#define CNTL_ST_CDWID_18 (1 << 20)
82#define CNTL_ST_CDWID_24 ((1 << 19)|(1 << 20))
83#define CNTL_ST_CEAEN (1 << 21)
84#define CNTL_ST_LCDBPP24_PACKED (6 << 1)
85
86#endif /* AMBA_CLCD_REGS_H */
diff --git a/include/linux/amba/clcd.h b/include/linux/amba/clcd.h
index 1035879b322c..d0c3be77c18e 100644
--- a/include/linux/amba/clcd.h
+++ b/include/linux/amba/clcd.h
@@ -10,73 +10,7 @@
10 * for more details. 10 * for more details.
11 */ 11 */
12#include <linux/fb.h> 12#include <linux/fb.h>
13 13#include <linux/amba/clcd-regs.h>
14/*
15 * CLCD Controller Internal Register addresses
16 */
17#define CLCD_TIM0 0x00000000
18#define CLCD_TIM1 0x00000004
19#define CLCD_TIM2 0x00000008
20#define CLCD_TIM3 0x0000000c
21#define CLCD_UBAS 0x00000010
22#define CLCD_LBAS 0x00000014
23
24#define CLCD_PL110_IENB 0x00000018
25#define CLCD_PL110_CNTL 0x0000001c
26#define CLCD_PL110_STAT 0x00000020
27#define CLCD_PL110_INTR 0x00000024
28#define CLCD_PL110_UCUR 0x00000028
29#define CLCD_PL110_LCUR 0x0000002C
30
31#define CLCD_PL111_CNTL 0x00000018
32#define CLCD_PL111_IENB 0x0000001c
33#define CLCD_PL111_RIS 0x00000020
34#define CLCD_PL111_MIS 0x00000024
35#define CLCD_PL111_ICR 0x00000028
36#define CLCD_PL111_UCUR 0x0000002c
37#define CLCD_PL111_LCUR 0x00000030
38
39#define CLCD_PALL 0x00000200
40#define CLCD_PALETTE 0x00000200
41
42#define TIM2_CLKSEL (1 << 5)
43#define TIM2_IVS (1 << 11)
44#define TIM2_IHS (1 << 12)
45#define TIM2_IPC (1 << 13)
46#define TIM2_IOE (1 << 14)
47#define TIM2_BCD (1 << 26)
48
49#define CNTL_LCDEN (1 << 0)
50#define CNTL_LCDBPP1 (0 << 1)
51#define CNTL_LCDBPP2 (1 << 1)
52#define CNTL_LCDBPP4 (2 << 1)
53#define CNTL_LCDBPP8 (3 << 1)
54#define CNTL_LCDBPP16 (4 << 1)
55#define CNTL_LCDBPP16_565 (6 << 1)
56#define CNTL_LCDBPP16_444 (7 << 1)
57#define CNTL_LCDBPP24 (5 << 1)
58#define CNTL_LCDBW (1 << 4)
59#define CNTL_LCDTFT (1 << 5)
60#define CNTL_LCDMONO8 (1 << 6)
61#define CNTL_LCDDUAL (1 << 7)
62#define CNTL_BGR (1 << 8)
63#define CNTL_BEBO (1 << 9)
64#define CNTL_BEPO (1 << 10)
65#define CNTL_LCDPWR (1 << 11)
66#define CNTL_LCDVCOMP(x) ((x) << 12)
67#define CNTL_LDMAFIFOTIME (1 << 15)
68#define CNTL_WATERMARK (1 << 16)
69
70/* ST Microelectronics variant bits */
71#define CNTL_ST_1XBPP_444 0x0
72#define CNTL_ST_1XBPP_5551 (1 << 17)
73#define CNTL_ST_1XBPP_565 (1 << 18)
74#define CNTL_ST_CDWID_12 0x0
75#define CNTL_ST_CDWID_16 (1 << 19)
76#define CNTL_ST_CDWID_18 (1 << 20)
77#define CNTL_ST_CDWID_24 ((1 << 19)|(1 << 20))
78#define CNTL_ST_CEAEN (1 << 21)
79#define CNTL_ST_LCDBPP24_PACKED (6 << 1)
80 14
81enum { 15enum {
82 /* individual formats */ 16 /* individual formats */
diff --git a/include/linux/host1x.h b/include/linux/host1x.h
index 3d04aa1dc83e..630b1a98ab58 100644
--- a/include/linux/host1x.h
+++ b/include/linux/host1x.h
@@ -32,11 +32,27 @@ enum host1x_class {
32 32
33struct host1x_client; 33struct host1x_client;
34 34
35/**
36 * struct host1x_client_ops - host1x client operations
37 * @init: host1x client initialization code
38 * @exit: host1x client tear down code
39 */
35struct host1x_client_ops { 40struct host1x_client_ops {
36 int (*init)(struct host1x_client *client); 41 int (*init)(struct host1x_client *client);
37 int (*exit)(struct host1x_client *client); 42 int (*exit)(struct host1x_client *client);
38}; 43};
39 44
45/**
46 * struct host1x_client - host1x client structure
47 * @list: list node for the host1x client
48 * @parent: pointer to struct device representing the host1x controller
49 * @dev: pointer to struct device backing this host1x client
50 * @ops: host1x client operations
51 * @class: host1x class represented by this client
52 * @channel: host1x channel associated with this client
53 * @syncpts: array of syncpoints requested for this client
54 * @num_syncpts: number of syncpoints requested for this client
55 */
40struct host1x_client { 56struct host1x_client {
41 struct list_head list; 57 struct list_head list;
42 struct device *parent; 58 struct device *parent;
@@ -156,7 +172,6 @@ struct host1x_channel;
156struct host1x_job; 172struct host1x_job;
157 173
158struct host1x_channel *host1x_channel_request(struct device *dev); 174struct host1x_channel *host1x_channel_request(struct device *dev);
159void host1x_channel_free(struct host1x_channel *channel);
160struct host1x_channel *host1x_channel_get(struct host1x_channel *channel); 175struct host1x_channel *host1x_channel_get(struct host1x_channel *channel);
161void host1x_channel_put(struct host1x_channel *channel); 176void host1x_channel_put(struct host1x_channel *channel);
162int host1x_job_submit(struct host1x_job *job); 177int host1x_job_submit(struct host1x_job *job);
@@ -177,6 +192,13 @@ struct host1x_reloc {
177 unsigned long shift; 192 unsigned long shift;
178}; 193};
179 194
195struct host1x_waitchk {
196 struct host1x_bo *bo;
197 u32 offset;
198 u32 syncpt_id;
199 u32 thresh;
200};
201
180struct host1x_job { 202struct host1x_job {
181 /* When refcount goes to zero, job can be freed */ 203 /* When refcount goes to zero, job can be freed */
182 struct kref ref; 204 struct kref ref;
@@ -226,7 +248,10 @@ struct host1x_job {
226 u8 *gather_copy_mapped; 248 u8 *gather_copy_mapped;
227 249
228 /* Check if register is marked as an address reg */ 250 /* Check if register is marked as an address reg */
229 int (*is_addr_reg)(struct device *dev, u32 reg, u32 class); 251 int (*is_addr_reg)(struct device *dev, u32 class, u32 reg);
252
253 /* Check if class belongs to the unit */
254 int (*is_valid_class)(u32 class);
230 255
231 /* Request a SETCLASS to this class */ 256 /* Request a SETCLASS to this class */
232 u32 class; 257 u32 class;
@@ -251,6 +276,15 @@ void host1x_job_unpin(struct host1x_job *job);
251 276
252struct host1x_device; 277struct host1x_device;
253 278
279/**
280 * struct host1x_driver - host1x logical device driver
281 * @driver: core driver
282 * @subdevs: table of OF device IDs matching subdevices for this driver
283 * @list: list node for the driver
284 * @probe: called when the host1x logical device is probed
285 * @remove: called when the host1x logical device is removed
286 * @shutdown: called when the host1x logical device is shut down
287 */
254struct host1x_driver { 288struct host1x_driver {
255 struct device_driver driver; 289 struct device_driver driver;
256 290
diff --git a/include/linux/platform_data/omapdss.h b/include/linux/platform_data/omapdss.h
index 679177929045..7feb011ed500 100644
--- a/include/linux/platform_data/omapdss.h
+++ b/include/linux/platform_data/omapdss.h
@@ -27,7 +27,6 @@ enum omapdss_version {
27 27
28/* Board specific data */ 28/* Board specific data */
29struct omap_dss_board_info { 29struct omap_dss_board_info {
30 const char *default_display_name;
31 int (*dsi_enable_pads)(int dsi_id, unsigned int lane_mask); 30 int (*dsi_enable_pads)(int dsi_id, unsigned int lane_mask);
32 void (*dsi_disable_pads)(int dsi_id, unsigned int lane_mask); 31 void (*dsi_disable_pads)(int dsi_id, unsigned int lane_mask);
33 int (*set_min_bus_tput)(struct device *dev, unsigned long r); 32 int (*set_min_bus_tput)(struct device *dev, unsigned long r);
diff --git a/include/linux/sync_file.h b/include/linux/sync_file.h
index 3e3ab84fc4cd..5726107963b2 100644
--- a/include/linux/sync_file.h
+++ b/include/linux/sync_file.h
@@ -14,7 +14,6 @@
14#define _LINUX_SYNC_FILE_H 14#define _LINUX_SYNC_FILE_H
15 15
16#include <linux/types.h> 16#include <linux/types.h>
17#include <linux/kref.h>
18#include <linux/ktime.h> 17#include <linux/ktime.h>
19#include <linux/list.h> 18#include <linux/list.h>
20#include <linux/spinlock.h> 19#include <linux/spinlock.h>
@@ -24,8 +23,6 @@
24/** 23/**
25 * struct sync_file - sync file to export to the userspace 24 * struct sync_file - sync file to export to the userspace
26 * @file: file representing this fence 25 * @file: file representing this fence
27 * @kref: reference count on fence.
28 * @name: name of sync_file. Useful for debugging
29 * @sync_file_list: membership in global file list 26 * @sync_file_list: membership in global file list
30 * @wq: wait queue for fence signaling 27 * @wq: wait queue for fence signaling
31 * @fence: fence with the fences in the sync_file 28 * @fence: fence with the fences in the sync_file
@@ -33,8 +30,14 @@
33 */ 30 */
34struct sync_file { 31struct sync_file {
35 struct file *file; 32 struct file *file;
36 struct kref kref; 33 /**
37 char name[32]; 34 * @user_name:
35 *
36 * Name of the sync file provided by userspace, for merged fences.
37 * Otherwise generated through driver callbacks (in which case the
38 * entire array is 0).
39 */
40 char user_name[32];
38#ifdef CONFIG_DEBUG_FS 41#ifdef CONFIG_DEBUG_FS
39 struct list_head sync_file_list; 42 struct list_head sync_file_list;
40#endif 43#endif
@@ -49,5 +52,6 @@ struct sync_file {
49 52
50struct sync_file *sync_file_create(struct dma_fence *fence); 53struct sync_file *sync_file_create(struct dma_fence *fence);
51struct dma_fence *sync_file_get_fence(int fd); 54struct dma_fence *sync_file_get_fence(int fd);
55char *sync_file_get_name(struct sync_file *sync_file, char *buf, int len);
52 56
53#endif /* _LINUX_SYNC_H */ 57#endif /* _LINUX_SYNC_H */