platform/kernel/linux-rpi.git
6 years agodrm/ttm: use an operation ctx for ttm_mem_global_alloc_page
Roger He [Fri, 8 Dec 2017 07:21:18 +0000 (15:21 +0800)]
drm/ttm: use an operation ctx for ttm_mem_global_alloc_page

forward the operation context to ttm_mem_global_alloc_page as well,
and the ultimate goal is swapout enablement for reserved BOs.

Here reserved BOs refer to all the BOs which share same reservation object

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Roger He <Hongbo.He@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/ttm: use an operation ctx for ttm_mem_global_alloc
Roger He [Fri, 8 Dec 2017 07:09:50 +0000 (15:09 +0800)]
drm/ttm: use an operation ctx for ttm_mem_global_alloc

forward the operation context to ttm_mem_global_alloc as well, and the
ultimate goal is swapout enablement for reserved BOs

Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Roger He <Hongbo.He@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/ttm: call ttm_bo_swapout directly when ttm shrink
Roger He [Mon, 18 Dec 2017 11:50:08 +0000 (19:50 +0800)]
drm/ttm: call ttm_bo_swapout directly when ttm shrink

remove the extra indirection because we have only one implementation anyway

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Roger He <Hongbo.He@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/vmwgfx: remove the default io_mem_pfn set
Tan Xiaojun [Mon, 25 Dec 2017 03:43:32 +0000 (11:43 +0800)]
drm/vmwgfx: remove the default io_mem_pfn set

The default interface situation has been taken into the framework, so
remove the default set of each module.

Signed-off-by: Tan Xiaojun <tanxiaojun@huawei.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/virtio: remove the default io_mem_pfn set
Tan Xiaojun [Mon, 25 Dec 2017 03:43:31 +0000 (11:43 +0800)]
drm/virtio: remove the default io_mem_pfn set

The default interface situation has been taken into the framework, so
remove the default set of each module.

Signed-off-by: Tan Xiaojun <tanxiaojun@huawei.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/radeon: remove the default io_mem_pfn set
Tan Xiaojun [Mon, 25 Dec 2017 03:43:30 +0000 (11:43 +0800)]
drm/radeon: remove the default io_mem_pfn set

The default interface situation has been taken into the framework, so
remove the default set of each module.

Signed-off-by: Tan Xiaojun <tanxiaojun@huawei.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/qxl: remove the default io_mem_pfn set
Tan Xiaojun [Mon, 25 Dec 2017 03:43:29 +0000 (11:43 +0800)]
drm/qxl: remove the default io_mem_pfn set

The default interface situation has been taken into the framework, so
remove the default set of each module.

Signed-off-by: Tan Xiaojun <tanxiaojun@huawei.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/nouveau: remove the default io_mem_pfn set
Tan Xiaojun [Mon, 25 Dec 2017 03:43:28 +0000 (11:43 +0800)]
drm/nouveau: remove the default io_mem_pfn set

The default interface situation has been taken into the framework, so
remove the default set of each module.

Signed-off-by: Tan Xiaojun <tanxiaojun@huawei.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/mgag200: remove the default io_mem_pfn set
Tan Xiaojun [Mon, 25 Dec 2017 03:43:27 +0000 (11:43 +0800)]
drm/mgag200: remove the default io_mem_pfn set

The default interface situation has been taken into the framework, so
remove the default set of each module.

Signed-off-by: Tan Xiaojun <tanxiaojun@huawei.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/cirrus: remove the default io_mem_pfn set
Tan Xiaojun [Mon, 25 Dec 2017 03:43:26 +0000 (11:43 +0800)]
drm/cirrus: remove the default io_mem_pfn set

The default interface situation has been taken into the framework, so
remove the default set of each module.

Signed-off-by: Tan Xiaojun <tanxiaojun@huawei.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/bochs: remove the default io_mem_pfn set
Tan Xiaojun [Mon, 25 Dec 2017 03:43:25 +0000 (11:43 +0800)]
drm/bochs: remove the default io_mem_pfn set

The default interface situation has been taken into the framework, so
remove the default set of each module.

Signed-off-by: Tan Xiaojun <tanxiaojun@huawei.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/ast: remove the default io_mem_pfn set
Tan Xiaojun [Mon, 25 Dec 2017 03:43:24 +0000 (11:43 +0800)]
drm/ast: remove the default io_mem_pfn set

The default interface situation has been taken into the framework, so
remove the default set of each module.

Signed-off-by: Tan Xiaojun <tanxiaojun@huawei.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/ttm: add ttm_bo_io_mem_pfn to check io_mem_pfn
Tan Xiaojun [Mon, 25 Dec 2017 03:43:23 +0000 (11:43 +0800)]
drm/ttm: add ttm_bo_io_mem_pfn to check io_mem_pfn

The io_mem_pfn field was added in commit ea642c3216cb ("drm/ttm: add
io_mem_pfn callback") and is called unconditionally. However, not all
drivers were updated to set it.

Use the ttm_bo_default_io_mem_pfn function if a driver did not set its
own. And add new function ttm_bo_io_mem_pfn() as wrapper.

Signed-off-by: Michal Srb <msrb@suse.com>
Signed-off-by: Tan Xiaojun <tanxiaojun@huawei.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: fix VM faults with per VM BOs
Christian König [Fri, 22 Dec 2017 16:13:03 +0000 (17:13 +0100)]
drm/amdgpu: fix VM faults with per VM BOs

There was a small window between unreserve and second reserve where the
freshly allocated BO could have been evicted without the VM noticing it.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/ttm: drop the spin in delayed delete if the trylock doesn't work
Christian König [Thu, 21 Dec 2017 18:04:15 +0000 (19:04 +0100)]
drm/ttm: drop the spin in delayed delete if the trylock doesn't work

Thomas actually noticed that, but I didn't realized what he meant until
now.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Roger He <Hongbo.He@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/pp: Get and save CZ/ST smu version
Rex Zhu [Thu, 21 Dec 2017 10:38:47 +0000 (18:38 +0800)]
drm/amd/pp: Get and save CZ/ST smu version

The smu firmware is loaded by the sbios on APUs, so query it
from the smu and save the smu fw version info that is reported
to userspace.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: drop client_id from VM
Christian König [Mon, 18 Dec 2017 16:10:01 +0000 (17:10 +0100)]
drm/amdgpu: drop client_id from VM

Use the fence context from the scheduler entity.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: rename vm_id to vmid
Christian König [Mon, 18 Dec 2017 16:08:25 +0000 (17:08 +0100)]
drm/amdgpu: rename vm_id to vmid

sed -i "s/vm_id/vmid/g" drivers/gpu/drm/amd/amdgpu/*.c
sed -i "s/vm_id/vmid/g" drivers/gpu/drm/amd/amdgpu/*.h

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: separate VMID and PASID handling
Christian König [Mon, 18 Dec 2017 15:53:03 +0000 (16:53 +0100)]
drm/amdgpu: separate VMID and PASID handling

Move both into the new files amdgpu_ids.[ch]. No functional change.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agoMerge branch 'drm-next-4.16' of git://people.freedesktop.org/~agd5f/linux into drm...
Dave Airlie [Thu, 21 Dec 2017 01:17:45 +0000 (11:17 +1000)]
Merge branch 'drm-next-4.16' of git://people.freedesktop.org/~agd5f/linux into drm-next

* 'drm-next-4.16' of git://people.freedesktop.org/~agd5f/linux: (171 commits)
  drm/amdgpu: fix test for shadow page tables
  drm/amd/display: Expose dpp1_set_cursor_attributes
  drm/amd/display: Update FMT and OPPBUF functions
  drm/amd/display: check for null before calling is_blanked
  drm/amd/display: dal 3.1.27
  drm/amd/display: Fix unused variable warnings.
  drm/amd/display: Only blank DCN when we have set_blank implementation
  drm/amd/display: Put dcn_mi_registers with other structs
  drm/amd/display: hubp refactor
  drm/amd/display: integrating optc pseudocode
  drm/amd/display: Call validate_fbc should_enable_fbc
  drm/amd/display: Clean up DCN cursor code
  drm/amd/display: fix 180 full screen pipe split
  drm/amd/display: reprogram surface config on scaling change
  drm/amd/display: Remove dwbc from pipe_ctx
  drm/amd/display: Use the maximum link setting which EDP reported.
  drm/amd/display: Add hdr_supported flag
  drm/amd/display: fix global sync param retrieval when not pipe splitting
  drm/amd/display: Update HUBP
  drm/amd/display: fix rotated surface scaling
  ...

6 years agoMerge tag 'omapdrm-4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux...
Dave Airlie [Thu, 21 Dec 2017 01:10:35 +0000 (11:10 +1000)]
Merge tag 'omapdrm-4.16' of git://git./linux/kernel/git/tomba/linux into drm-next

omapdrm changes for v4.16

* support memory bandwidth limits
* DSI command mode panel cleanups for N9
* DMM error handling

* tag 'omapdrm-4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (27 commits)
  drm: omapdrm: Simplify platform registration
  drm: omapdrm: Remove filename from header and fix copyright tag
  drm/omap: DMM: Check for DMM readiness after successful transaction commit
  drm/omap: DMM: Print information if we received an error interrupt
  drm/omap: DMM: In case of error/timeout in wait_status() print the reason
  drm/omap: DMM: Fix DMM_IRQSTAT_ERR_MASK definition
  drm: omapdrm: Deconstruct the omap_drv.h header.
  drm: omapdrm: venc: Return error code on OF parsing failure
  drm: omapdrm: dpi: Remove dpi_data port_initialized field
  drm: omapdrm: dss: Make dss_dump_clocks() function static
  drm: omapdrm: dss: Set the DMA coherent mask
  drm: omapdrm: Remove unused omap_dss_find_device() function
  drm: omapdrm: Pass drm_device to omap_gem_resume()
  drm: omapdrm: dpi: Don't treat GPIO probe deferral as an error
  drm/omap: panel-dsi-cm: switch to gpiod
  drm/omap: panel-dsi-cm: add external backlight support
  drm/omap: panel-dsi-cm: add physical size support
  drm/omap: panel-dsi-cm: add regulator support
  drm/omap: panel-dsi-cm: fix driver
  drm/omap: add support for physical size hints from display drivers
  ...

6 years agoMerge tag 'tilcdc-4.16' of https://github.com/jsarha/linux into drm-next
Dave Airlie [Thu, 21 Dec 2017 01:10:20 +0000 (11:10 +1000)]
Merge tag 'tilcdc-4.16' of https://github.com/jsarha/linux into drm-next

drm/tilcdc changes for 4.16

* tag 'tilcdc-4.16' of https://github.com/jsarha/linux:
  drm/tilcdc: make tilcdc_mode_hvtotal() static
  drm/tilcdc: Remove drm_framebuffer_get() and *_put() calls
  drm/tilcdc: ensure nonatomic iowrite64 is not used

6 years agoMerge tag 'drm-intel-next-2017-12-14' of git://anongit.freedesktop.org/drm/drm-intel...
Dave Airlie [Thu, 21 Dec 2017 01:08:30 +0000 (11:08 +1000)]
Merge tag 'drm-intel-next-2017-12-14' of git://anongit.freedesktop.org/drm/drm-intel into drm-next

- Fix documentation build issues (Randy, Markus)
- Fix timestamp frequency calculation for perf on CNL (Lionel)
- New DMC firmware for Skylake (Anusha)
- GTT flush fixes and other GGTT write track and refactors (Chris)
- Taint kernel when GPU reset fails (Chris)
- Display workarounds organization (Lucas)
- GuC and HuC initialization clean-up and fixes (Michal)
- Other fixes around GuC submission (Michal)
- Execlist clean-ups like caching ELSP reg offset and improving log readability (Chri\
s)
- Many other improvements on our logs and dumps (Chris)
- Restore GT performance in headless mode with DMC loaded (Tvrtko)
- Stop updating legacy fb parameters since FBC is not using anymore (Daniel)
- More selftest improvements (Chris)
- Preemption fixes and improvements (Chris)
- x86/early-quirks improvements for Intel graphics stolen memory. (Joonas, Matthew)
- Other improvements on Stolen Memory code to be resource centric. (Matthew)
- Improvements and fixes on fence allocation/release (Chris).

GVT:

- fixes for two coverity scan errors (Colin)
- mmio switch code refine (Changbin)
- more virtual display dmabuf fixes (Tina/Gustavo)
- misc cleanups (Pei)
- VFIO mdev display dmabuf interface and gvt support (Tina)
- VFIO mdev opregion support/fixes (Tina/Xiong/Chris)
- workload scheduling optimization (Changbin)
- preemption fix and temporal workaround (Zhenyu)
- and misc fixes after refactor (Chris)

* tag 'drm-intel-next-2017-12-14' of git://anongit.freedesktop.org/drm/drm-intel: (87 commits)
  drm/i915: Update DRIVER_DATE to 20171214
  drm/i915: properly init lockdep class
  drm/i915: Show engine state when hangcheck detects a stall
  drm/i915: make CS frequency read support missing more obvious
  drm/i915/guc: Extract doorbell verification into a function
  drm/i915/guc: Extract clients allocation to submission_init
  drm/i915/guc: Extract doorbell creation from client allocation
  drm/i915/guc: Call invalidate after changing the vfunc
  drm/i915/guc: Extract guc_init from guc_init_hw
  drm/i915/guc: Move GuC workqueue allocations outside of the mutex
  drm/i915/guc: Move shared data allocation away from submission path
  drm/i915: Unwind i915_gem_init() failure
  drm/i915: Ratelimit request allocation under oom
  drm/i915: Allow fence allocations to fail
  drm/i915: Mark up potential allocation paths within i915_sw_fence as might_sleep
  drm/i915: Don't check #active_requests from i915_gem_wait_for_idle()
  drm/i915/fence: Use rcu to defer freeing of irq_work
  drm/i915: Dump the engine state before declaring wedged from wait_for_engines()
  drm/i915: Bump timeout for wait_for_engines()
  drm/i915: Downgrade misleading "Memory usable" message
  ...

6 years agodrm/amdgpu: fix test for shadow page tables
Christian König [Wed, 20 Dec 2017 13:21:25 +0000 (14:21 +0100)]
drm/amdgpu: fix test for shadow page tables

They don't work 100% correctly at the moment.

Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Expose dpp1_set_cursor_attributes
Yue Hin Lau [Fri, 24 Nov 2017 21:35:52 +0000 (16:35 -0500)]
drm/amd/display: Expose dpp1_set_cursor_attributes

Signed-off-by: Yue Hin Lau <Yuehin.Lau@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Update FMT and OPPBUF functions
Eric Bernstein [Tue, 12 Dec 2017 19:14:10 +0000 (14:14 -0500)]
drm/amd/display: Update FMT and OPPBUF functions

Updates to FMT and OPPBUF programming from HW team
pseudocode review.

Signed-off-by: Eric Bernstein <eric.bernstein@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: check for null before calling is_blanked
Yue Hin Lau [Tue, 12 Dec 2017 19:34:30 +0000 (14:34 -0500)]
drm/amd/display: check for null before calling is_blanked

Signed-off-by: Yue Hin Lau <Yuehin.Lau@amd.com>
Reviewed-by: Eric Bernstein <Eric.Bernstein@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: dal 3.1.27
Andrew Jiang [Tue, 12 Dec 2017 17:34:47 +0000 (12:34 -0500)]
drm/amd/display: dal 3.1.27

Signed-off-by: Andrew Jiang <Andrew.Jiang@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Fix unused variable warnings.
Leo (Sunpeng) Li [Tue, 12 Dec 2017 15:48:50 +0000 (10:48 -0500)]
drm/amd/display: Fix unused variable warnings.

... since linux kernel compile treats warnings as errors.

Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Only blank DCN when we have set_blank implementation
Yue Hin Lau [Mon, 4 Dec 2017 21:58:11 +0000 (16:58 -0500)]
drm/amd/display: Only blank DCN when we have set_blank implementation

Also rename timing_generator to optc

Signed-off-by: Yue Hin Lau <Yuehin.Lau@amd.com>
Reviewed-by: Eric Bernstein <Eric.Bernstein@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Put dcn_mi_registers with other structs
Eric Bernstein [Thu, 7 Dec 2017 20:49:43 +0000 (15:49 -0500)]
drm/amd/display: Put dcn_mi_registers with other structs

Signed-off-by: Eric Bernstein <eric.bernstein@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: hubp refactor
Yue Hin Lau [Fri, 8 Dec 2017 20:57:44 +0000 (15:57 -0500)]
drm/amd/display: hubp refactor

Signed-off-by: Yue Hin Lau <Yuehin.Lau@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: integrating optc pseudocode
Yue Hin Lau [Thu, 7 Dec 2017 19:43:24 +0000 (14:43 -0500)]
drm/amd/display: integrating optc pseudocode

Signed-off-by: Yue Hin Lau <Yuehin.Lau@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Call validate_fbc should_enable_fbc
Harry Wentland [Fri, 1 Dec 2017 14:49:46 +0000 (09:49 -0500)]
drm/amd/display: Call validate_fbc should_enable_fbc

validate_fbc never fails a modeset. It's simply used to decide whether
to use FBC or not. Calling it validate_fbc might be confusing to some so
rename it to should_enable_fbc.

With that let's also remove the DC_STATUS return code and return bool
and make enable_fbc a void function since we never check it's return
value and probably never want to anyways.

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Roman Li <Roman.Li@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Clean up DCN cursor code
Eric Bernstein [Tue, 5 Dec 2017 21:48:30 +0000 (16:48 -0500)]
drm/amd/display: Clean up DCN cursor code

Signed-off-by: Eric Bernstein <eric.bernstein@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: fix 180 full screen pipe split
Dmytro Laktyushkin [Thu, 7 Dec 2017 20:48:15 +0000 (15:48 -0500)]
drm/amd/display: fix 180 full screen pipe split

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: Yongqiang Sun <yongqiang.sun@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: reprogram surface config on scaling change
Eric Yang [Thu, 7 Dec 2017 15:42:33 +0000 (10:42 -0500)]
drm/amd/display: reprogram surface config on scaling change

When plane size changes, we need to reprogram surface pitch in addition
to viewport and scaler. This change is a conservative way to make this happen.
However it could be more optimized to move pitch programming into
mem_program_viewport.

Signed-off-by: Eric Yang <Eric.Yang2@amd.com>
Reviewed-by: Andrew Jiang <Andrew.Jiang@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Remove dwbc from pipe_ctx
Eric Bernstein [Thu, 23 Nov 2017 21:38:52 +0000 (16:38 -0500)]
drm/amd/display: Remove dwbc from pipe_ctx

Signed-off-by: Eric Bernstein <eric.bernstein@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Use the maximum link setting which EDP reported.
Hugo Hu [Thu, 7 Dec 2017 07:33:22 +0000 (15:33 +0800)]
drm/amd/display: Use the maximum link setting which EDP reported.

Signed-off-by: Hugo Hu <hugo.hu@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Add hdr_supported flag
Yongqiang Sun [Wed, 6 Dec 2017 21:29:21 +0000 (16:29 -0500)]
drm/amd/display: Add hdr_supported flag

Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com>
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: fix global sync param retrieval when not pipe splitting
Dmytro Laktyushkin [Mon, 4 Dec 2017 20:48:13 +0000 (15:48 -0500)]
drm/amd/display: fix global sync param retrieval when not pipe splitting

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Update HUBP
Eric Bernstein [Tue, 5 Dec 2017 15:51:35 +0000 (10:51 -0500)]
drm/amd/display: Update HUBP

Signed-off-by: Eric Bernstein <eric.bernstein@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: fix rotated surface scaling
Dmytro Laktyushkin [Wed, 29 Nov 2017 22:42:08 +0000 (17:42 -0500)]
drm/amd/display: fix rotated surface scaling

This is a resubmit with the errors fixed

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: clean up dcn soc params
Dmytro Laktyushkin [Tue, 28 Nov 2017 16:22:15 +0000 (11:22 -0500)]
drm/amd/display: clean up dcn soc params

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: dal 3.1.26
Eric Yang [Tue, 5 Dec 2017 19:34:56 +0000 (14:34 -0500)]
drm/amd/display: dal 3.1.26

Signed-off-by: Eric Yang <Eric.Yang2@amd.com>
Reviewed-by: Andrew Jiang <Andrew.Jiang@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Fix rehook MST display not light back on
Jerry (Fangzhi) Zuo [Fri, 1 Dec 2017 18:26:05 +0000 (13:26 -0500)]
drm/amd/display: Fix rehook MST display not light back on

Original applied dm_restore_drm_connector_state() has got removed.
Set link status to BAD before hotplug() event could trigger
another modeset from userspace.

The fix "Fix MST daisy chain SST not light up" commit makes so it is trying
to create a stream prior to dc_sink. That makes dc_sink is not present in
create_stream_for_sink().

Signed-off-by: Jerry (Fangzhi) Zuo <Jerry.Zuo@amd.com>
Reviewed-by: Roman Li <Roman.Li@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Fix check for whether dmcu fw is running
Anthony Koo [Fri, 24 Nov 2017 20:43:05 +0000 (15:43 -0500)]
drm/amd/display: Fix check for whether dmcu fw is running

Signed-off-by: Anthony Koo <Anthony.Koo@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Declare and share color space types for dcn's
Vitaly Prosyak [Fri, 1 Dec 2017 17:42:18 +0000 (11:42 -0600)]
drm/amd/display: Declare and share color space types for dcn's

Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Do DC mode-change check after stream creation
Leo (Sunpeng) Li [Tue, 21 Nov 2017 18:19:04 +0000 (13:19 -0500)]
drm/amd/display: Do DC mode-change check after stream creation

Do DC level mode change checks (via dc_stream_state) only when creating
a new stream, as this check is uneccessary without a new dc_stream_state
anyways. Doing so better demonstrates the intent of this mode-change
check, in comparison to guarding it with the 'enable' flag.

Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Define BLNDGAM_CONFIG_STATUS
Vitaly Prosyak [Wed, 29 Nov 2017 18:54:53 +0000 (12:54 -0600)]
drm/amd/display: Define BLNDGAM_CONFIG_STATUS

Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Don't spam debug log on long reg waits
Harry Wentland [Mon, 27 Nov 2017 21:12:43 +0000 (16:12 -0500)]
drm/amd/display: Don't spam debug log on long reg waits

Certain reg waits take up to a frame. Don't spam the log when this
happens.

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Jordan Lazare <Jordan.Lazare@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Error print when ATOM BIOS implementation is missing
Harry Wentland [Mon, 27 Nov 2017 14:50:01 +0000 (09:50 -0500)]
drm/amd/display: Error print when ATOM BIOS implementation is missing

We fail apply_ctx_to_hw when crtc_source_select is missing. This isn't
really helpful at this point. It would aid ASIC bringup if we log an error
when we can't find the implementation for the ATOM version.

Do the same for all other function points in the command table that do a
NULL check before being called.

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Roman Li <Roman.Li@amd.com>
Reviewed-by: Jordan Lazare <Jordan.Lazare@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Remove dead enable_plane function definition and call
Harry Wentland [Mon, 27 Nov 2017 14:30:48 +0000 (09:30 -0500)]
drm/amd/display: Remove dead enable_plane function definition and call

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Jordan Lazare <Jordan.Lazare@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Print type if we get wrong ObjectID from bios
Harry Wentland [Fri, 24 Nov 2017 14:11:23 +0000 (09:11 -0500)]
drm/amd/display: Print type if we get wrong ObjectID from bios

We've seen a bunch of issues where we can't get the connector from vbios
for what we think should be a valid connector id. Print some more info
when this happens.

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/radeon: Remove KFD_CIK_SDMA_QUEUE_OFFSET
Michel Dänzer [Wed, 20 Dec 2017 09:45:36 +0000 (10:45 +0100)]
drm/radeon: Remove KFD_CIK_SDMA_QUEUE_OFFSET

Leftover from recently removed amdkfd support.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agoRevert "drm/radeon: reduce number of free VMIDs and pipes in KV"
Michel Dänzer [Wed, 20 Dec 2017 09:45:36 +0000 (10:45 +0100)]
Revert "drm/radeon: reduce number of free VMIDs and pipes in KV"

This reverts the remaining changes of commit
62a7b7fbd08ef745bb51e8728e89125a0ba6327e, because radeon doesn't support
amdkfd anymore. The number of VMIDs was already changed back when amdkfd
support was removed.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agoRevert "drm/radeon/cik: Don't touch int of pipes 1-7"
Michel Dänzer [Wed, 20 Dec 2017 09:45:36 +0000 (10:45 +0100)]
Revert "drm/radeon/cik: Don't touch int of pipes 1-7"

This reverts commit 28b57b856b635ea0d44f1281e2efdc963c100ea3. radeon
doesn't support amdkfd anymore, so the latter doesn't set up interrupts
for pipes 1-7.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agoRevert "drm/radeon: Report doorbell configuration to amdkfd"
Michel Dänzer [Wed, 20 Dec 2017 09:45:36 +0000 (10:45 +0100)]
Revert "drm/radeon: Report doorbell configuration to amdkfd"

This reverts commit ebff8453d3a57a2405c4d96d9f9c4f4acc7d4d79. Unused
since amdkfd is no longer supported with radeon.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agoRevert "drm/radeon: adding synchronization for GRBM GFX"
Michel Dänzer [Wed, 20 Dec 2017 09:45:35 +0000 (10:45 +0100)]
Revert "drm/radeon: adding synchronization for GRBM GFX"

This reverts commit 1c0a46255f8d7daf5b601668836e185fd1294e94. Not needed
anymore, since amdkfd is no longer supported with radeon.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/pp: Implement force_dpm_level on Rv
Rex Zhu [Wed, 13 Dec 2017 07:28:06 +0000 (15:28 +0800)]
drm/amd/pp: Implement force_dpm_level on Rv

user can change dpm level on Rv through sysfs

v3: add smu version check
v2: fix no return statement

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/pp: Get and save Rv smu version
Rex Zhu [Tue, 19 Dec 2017 06:08:54 +0000 (14:08 +0800)]
drm/amd/pp: Get and save Rv smu version

The smu firmware is loaded by the sbios on APUs, so query it
from the smu and save the smu fw version info that is reported
to userspace.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/pp: update smu_version value for CI/VI
Rex Zhu [Tue, 19 Dec 2017 06:07:09 +0000 (14:07 +0800)]
drm/amd/pp: update smu_version value for CI/VI

Set the new common smu firmware version for smu7 parts (CI and VI).

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/pp: Move smu_version to common code
Rex Zhu [Tue, 19 Dec 2017 06:04:24 +0000 (14:04 +0800)]
drm/amd/pp: Move smu_version to common code

Move the smu_version to struct hwmgr, so it can be shared
by other asics.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: use defines for mmBIF_IOV_FUNC_IDENTIFIER fields
Alex Deucher [Tue, 19 Dec 2017 14:57:53 +0000 (09:57 -0500)]
drm/amdgpu: use defines for mmBIF_IOV_FUNC_IDENTIFIER fields

Rather than magic numbers.

Reviewed-by: Xiangliang Yu <Xiangliang.Yu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: only check mmBIF_IOV_FUNC_IDENTIFIER on tonga/fiji
Alex Deucher [Tue, 19 Dec 2017 14:52:31 +0000 (09:52 -0500)]
drm/amdgpu: only check mmBIF_IOV_FUNC_IDENTIFIER on tonga/fiji

We only support SR-IOV on tonga/fiji.  Don't check this register
on other VI parts.

Fixes: 048765ad5af7c89 (amdgpu: fix asic initialization for virtualized environments (v2))
Reviewed-by: Xiangliang Yu <Xiangliang.Yu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
6 years agodrm/amd/pp: export more smu message on Rv
Rex Zhu [Wed, 13 Dec 2017 07:26:15 +0000 (15:26 +0800)]
drm/amd/pp: export more smu message on Rv

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/pp: delete repeated call of force_dpm_level
Rex Zhu [Mon, 18 Dec 2017 11:48:00 +0000 (19:48 +0800)]
drm/amd/pp: delete repeated call of force_dpm_level

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/pp: implement phm_reset_power_profile_state
Rex Zhu [Mon, 18 Dec 2017 11:44:24 +0000 (19:44 +0800)]
drm/amd/pp: implement phm_reset_power_profile_state

mv related code out of force_dpm_level to
phm_reset_power_profile_state

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/pp: delete dead code of arbiter overdriver clk
Rex Zhu [Mon, 18 Dec 2017 07:03:23 +0000 (15:03 +0800)]
drm/amd/pp: delete dead code of arbiter overdriver clk

for sclk/mclk, can be adjusted through sysfs.
for uvd/vce clk, will be adjusted case by case when
requested.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agoBackMerge tag 'v4.15-rc4' into drm-next
Dave Airlie [Tue, 19 Dec 2017 11:37:24 +0000 (21:37 +1000)]
BackMerge tag 'v4.15-rc4' into drm-next

Linux 4.15-rc4

Daniel requested it to fix some messy conflicts.

6 years agodrm: omapdrm: Simplify platform registration
Andrew F. Davis [Tue, 5 Dec 2017 20:29:32 +0000 (14:29 -0600)]
drm: omapdrm: Simplify platform registration

Currently, calls into each file are used to register the various
platform drivers. Change this to a table of pointers to platform_driver
structs to allow using platform_register_drivers.

Signed-off-by: Andrew F. Davis <afd@ti.com>
6 years agodrm: omapdrm: Remove filename from header and fix copyright tag
Andrew F. Davis [Tue, 5 Dec 2017 20:29:31 +0000 (14:29 -0600)]
drm: omapdrm: Remove filename from header and fix copyright tag

Having the filename in the header serves little purpose and is
often wrong after renames as it is here in several places, just
drop it from all omapdrm files.

While we are here unify the copyright tags to the TI recommended style.

Signed-off-by: Andrew F. Davis <afd@ti.com>
6 years agodrm/omap: DMM: Check for DMM readiness after successful transaction commit
Peter Ujfalusi [Fri, 29 Sep 2017 11:49:49 +0000 (14:49 +0300)]
drm/omap: DMM: Check for DMM readiness after successful transaction commit

Check the status of the DMM engine after it is reported that the
transaction was completed as in rare cases the engine might not reached a
working state.

The wait_status() will print information in case the DMM is not reached the
expected state and the dmm_txn_commit() will return with an error code to
make sure that we are not continuing with a broken setup.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
6 years agodrm/omap: DMM: Print information if we received an error interrupt
Peter Ujfalusi [Fri, 29 Sep 2017 11:49:48 +0000 (14:49 +0300)]
drm/omap: DMM: Print information if we received an error interrupt

To help diagnose DMM errors, print out information if any of the error bits
are set in the interrupt status register.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
6 years agodrm/omap: DMM: In case of error/timeout in wait_status() print the reason
Peter Ujfalusi [Fri, 29 Sep 2017 11:49:47 +0000 (14:49 +0300)]
drm/omap: DMM: In case of error/timeout in wait_status() print the reason

If the wait_status() fails either because of an error reported in the
STATUS register or because of a timeout waiting for the wait_mask, print
information which might help diagnose the reason.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
6 years agodrm/omap: DMM: Fix DMM_IRQSTAT_ERR_MASK definition
Peter Ujfalusi [Fri, 29 Sep 2017 11:49:46 +0000 (14:49 +0300)]
drm/omap: DMM: Fix DMM_IRQSTAT_ERR_MASK definition

The error bit definitions are typoed in DMM_IRQSTAT_ERR_MASK which went
unnoticed since the DMM_IRQSTAT_ERR_MASK was not used.

Change the bit definitions to the correct ones.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
6 years agodrm: omapdrm: Deconstruct the omap_drv.h header.
Laurent Pinchart [Fri, 13 Oct 2017 14:59:05 +0000 (17:59 +0300)]
drm: omapdrm: Deconstruct the omap_drv.h header.

The number of function declarations in the omap_drv.h degrades
readability. To fix it, create new header files for each part of the
driver and move the related functions.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
6 years agodrm: omapdrm: venc: Return error code on OF parsing failure
Laurent Pinchart [Fri, 13 Oct 2017 14:59:04 +0000 (17:59 +0300)]
drm: omapdrm: venc: Return error code on OF parsing failure

The venc_probe_of() function has an error cleanup path that returns
success instead of an error code. Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
6 years agodrm: omapdrm: dpi: Remove dpi_data port_initialized field
Laurent Pinchart [Fri, 13 Oct 2017 14:59:03 +0000 (17:59 +0300)]
drm: omapdrm: dpi: Remove dpi_data port_initialized field

The dpi_data structure port_initialized field is used to check in the
cleanup path whether the DPI has been initialized. This can be performed
through the associated device_node data field instead. Remove the
port_initialized field.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
6 years agodrm: omapdrm: dss: Make dss_dump_clocks() function static
Laurent Pinchart [Fri, 13 Oct 2017 14:59:02 +0000 (17:59 +0300)]
drm: omapdrm: dss: Make dss_dump_clocks() function static

The function isn't used outside of its compilation unit, make it static.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
6 years agodrm: omapdrm: dss: Set the DMA coherent mask
Laurent Pinchart [Fri, 13 Oct 2017 14:59:01 +0000 (17:59 +0300)]
drm: omapdrm: dss: Set the DMA coherent mask

When merging the omapdrm and omapdss drivers the omapdrm virtual
platform device will disappear, and the omapdss platform device will be
used for DMA memory allocation. To prepare for that, set the DMA
coherent mask for the device.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
6 years agodrm: omapdrm: Remove unused omap_dss_find_device() function
Laurent Pinchart [Fri, 13 Oct 2017 14:58:59 +0000 (17:58 +0300)]
drm: omapdrm: Remove unused omap_dss_find_device() function

The omap_dss_find_device() function is unused. Remove it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
6 years agodrm: omapdrm: Pass drm_device to omap_gem_resume()
Laurent Pinchart [Fri, 13 Oct 2017 14:58:58 +0000 (17:58 +0300)]
drm: omapdrm: Pass drm_device to omap_gem_resume()

The omap_gem_resume() function is internal to the driver. Pass it a
drm_device pointer that the caller already has instead of looking it up
from device data.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
6 years agodrm: omapdrm: dpi: Don't treat GPIO probe deferral as an error
Laurent Pinchart [Fri, 13 Oct 2017 14:58:57 +0000 (17:58 +0300)]
drm: omapdrm: dpi: Don't treat GPIO probe deferral as an error

There's no need to print an error message on probe deferral, that's a
normal situation. Probe deferral debugging can be performed by enabling
the related debug messages in the drivers core.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
6 years agodrm/omap: panel-dsi-cm: switch to gpiod
Sebastian Reichel [Mon, 24 Jul 2017 17:33:09 +0000 (19:33 +0200)]
drm/omap: panel-dsi-cm: switch to gpiod

Use the new descriptor based GPIO API instead of
the legacy one, which results in cleaner code
with less lines of code.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
6 years agodrm/omap: panel-dsi-cm: add external backlight support
Sebastian Reichel [Mon, 24 Jul 2017 17:33:08 +0000 (19:33 +0200)]
drm/omap: panel-dsi-cm: add external backlight support

Droid 4 has a command mode DSI panel, which does not have/use
DSI based backlight support. This adds proper support for this
using a backlight phandle property, which follows the common
panel binding.

If no backlight phandle is found, it is assumed, that the
native backlight should be used instead. This is used by
the Nokia N950.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
6 years agodrm/omap: panel-dsi-cm: add physical size support
Sebastian Reichel [Mon, 24 Jul 2017 17:33:07 +0000 (19:33 +0200)]
drm/omap: panel-dsi-cm: add physical size support

Add support to load physical size information from DT using
the properties defined by the common panel binding.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
6 years agodrm/omap: panel-dsi-cm: add regulator support
Sebastian Reichel [Mon, 24 Jul 2017 17:33:06 +0000 (19:33 +0200)]
drm/omap: panel-dsi-cm: add regulator support

Add support for regulators used by panels found inside
of the Nokia N950, N9 and Motorola Droid 4.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
6 years agodrm/omap: panel-dsi-cm: fix driver
Tony Lindgren [Mon, 24 Jul 2017 17:33:05 +0000 (19:33 +0200)]
drm/omap: panel-dsi-cm: fix driver

This adds support for get_timings() and check_timings()
to get the driver working and properly initializes the
timing information from DT.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
6 years agodrm/omap: add support for physical size hints from display drivers
Sebastian Reichel [Mon, 24 Jul 2017 17:33:04 +0000 (19:33 +0200)]
drm/omap: add support for physical size hints from display drivers

While physical size information is automatically parsed for EDID
based displays, we need to provide it manually for displays providing
one fixed mode.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
6 years agodrm/omap: drop incorrect comment
Sebastian Reichel [Mon, 24 Jul 2017 17:32:59 +0000 (19:32 +0200)]
drm/omap: drop incorrect comment

The wrappers have been removed in commit 5a35876e2830
(drm: omapdrm: Remove manual update display support)
and will not be reintroduced, since the normal sys
functions properly call the dirty callback.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
6 years agodrm/omap: remove unused function defines
Sebastian Reichel [Mon, 24 Jul 2017 17:32:58 +0000 (19:32 +0200)]
drm/omap: remove unused function defines

Remove driver (un)register API defines. They do not even exist
anymore.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
6 years agodrm/omap: Filter displays mode based on bandwidth limit
Peter Ujfalusi [Thu, 30 Nov 2017 12:12:37 +0000 (14:12 +0200)]
drm/omap: Filter displays mode based on bandwidth limit

If we have memory bandwidth limit configured, reject the modes which would
require more bandwidth than the limit if it is used with one full
resolution plane (most common use case).

This filtering is not providing full protection as it is possible that
application would pick smaller crtc resolution with high resolution planes
and down scaling, or can enable more smaller planes where the sum of their
bandwidth need would be higher than the limit.

This patch only allows us to filter out modes which would need more
bandwidth if they were used with one full screen plane.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
6 years agodrm/omap: dss: Add support for reporting memory bandwidth limitation
Peter Ujfalusi [Thu, 30 Nov 2017 12:12:36 +0000 (14:12 +0200)]
drm/omap: dss: Add support for reporting memory bandwidth limitation

The get_memory_bandwidth_limit() in dispc_ops can be used to query the
memory bandwidth limit of dispc by upper layers.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
6 years agodt-bindings: display/ti: Add optional property to set memory bandwidth limit
Peter Ujfalusi [Thu, 30 Nov 2017 12:12:35 +0000 (14:12 +0200)]
dt-bindings: display/ti: Add optional property to set memory bandwidth limit

max-memory-bandwidth can be used to specify the maximum bandwidth dispc
can use when reading display data from main memory.

In some SoC (am437x for example) we have memory bandwidth limitation
which causes underflow in the display subsystem.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
6 years agoomapdrm: panel: td028ttec1: replace MODULE_ALIAS by MODULE_DEVICE_TABLE
H. Nikolaus Schaller [Tue, 28 Nov 2017 15:48:55 +0000 (16:48 +0100)]
omapdrm: panel: td028ttec1: replace MODULE_ALIAS by MODULE_DEVICE_TABLE

to make it easier to keep in sync with the OF device table.

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
6 years agoomapdrm: panel: fix compatible vendor string for td028ttec1
H. Nikolaus Schaller [Tue, 28 Nov 2017 15:48:54 +0000 (16:48 +0100)]
omapdrm: panel: fix compatible vendor string for td028ttec1

The vendor name was "toppoly" but other panels and the vendor list
have defined it as "tpo". So let's fix it in driver and bindings.

We keep the old definition in parallel to stay compatible with
potential older DTB setup.

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
6 years agodrm/tilcdc: make tilcdc_mode_hvtotal() static
Xiongwei Song [Sat, 2 Dec 2017 11:24:22 +0000 (19:24 +0800)]
drm/tilcdc: make tilcdc_mode_hvtotal() static

The function tilcdc_mode_hvtotal is local to the source and does not need
to be in global scope, so make it static.

drivers/gpu/drm/tilcdc/tilcdc_crtc.c:297:6: warning: no previous prototype for 'tilcdc_mode_hvtotal' [-Wmissing-prototypes]
 uint tilcdc_mode_hvtotal(const struct drm_display_mode *mode)

Signed-off-by: Xiongwei Song <sxwjean@gmail.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
6 years agoRevert "drm/amd/amdgpu: set gtt size according to system memory size only"
Andrey Grodzovsky [Fri, 15 Dec 2017 17:09:16 +0000 (12:09 -0500)]
Revert "drm/amd/amdgpu: set gtt size according to system memory size only"

This reverts commit ba851eed895c76be0eb4260bdbeb7e26f9ccfaa2.
With that change piglit max size tests (running with -t max.*size) are causing
OOM and hard hang on my CZ with 1GB RAM.

Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Roger He <Hongbo.He@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agoMAINTAINERS: add separate entry for DRM TTM v2
Christian König [Wed, 6 Dec 2017 13:07:22 +0000 (14:07 +0100)]
MAINTAINERS: add separate entry for DRM TTM v2

AMD is the major user of TTM, so it also makes sense that we maintain
it.

v2: mention Alex git tree as well

Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>