[Freedreno] [PATCH v3 1/2] drm/msm: Add a GPU-wide wait queue

2020-01-23 Thread Brian Ho
This wait queue is signaled on all IRQs for a given GPU and will be used as part of the new MSM_WAIT_IOVA ioctl so userspace can sleep until the value at a given iova reaches a certain condition. Signed-off-by: Brian Ho --- drivers/gpu/drm/msm/msm_gpu.c | 4 drivers/gpu/drm/msm/msm_gpu.h |

[Freedreno] [PATCH v3 0/2] drm/msm: Add the MSM_WAIT_IOVA ioctl

2020-01-23 Thread Brian Ho
This patch set implements the MSM_WAIT_IOVA ioctl which lets userspace sleep until the value at a given iova reaches a certain condition. This is needed in turnip to implement the VK_QUERY_RESULT_WAIT_BIT flag for vkGetQueryPoolResults. First, we add a GPU-wide wait queue that is signaled on all

[Freedreno] [PATCH v3 2/2] drm/msm: Add MSM_WAIT_IOVA ioctl

2020-01-23 Thread Brian Ho
Implements an ioctl to wait until a value at a given iova is greater than or equal to a supplied value. This will initially be used by turnip (open-source Vulkan driver for QC in mesa) for occlusion queries where the userspace driver can block on a query becoming available before continuing via

[Freedreno] [PATCH v3] drm/msm: Add syncobj support.

2020-01-23 Thread Bas Nieuwenhuizen
This 1) Enables core DRM syncobj support. 2) Adds options to the submission ioctl to wait/signal syncobjs. Just like the wait fence fd, this does inline waits. Using the scheduler would be nice but I believe it is out of scope for this work. Support for timeline syncobjs is implemented and the

Re: [Freedreno] [PATCH v2] drm/msm: Add syncobj support.

2020-01-23 Thread Bas Nieuwenhuizen
On Mon, Jan 20, 2020 at 5:06 PM Jordan Crouse wrote: > > On Fri, Jan 17, 2020 at 07:32:27PM +0100, Bas Nieuwenhuizen wrote: > > On Fri, Jan 17, 2020 at 7:17 PM Jordan Crouse > > wrote: > > > > > > On Fri, Jan 17, 2020 at 12:04:17AM +0100, Bas Nieuwenhuizen wrote: > > > > This > > > > > > > > 1)

Re: [Freedreno] [PATCH] drm/msm: Fix a6xx GMU shutdown sequence

2020-01-23 Thread Matthias Kaehlcke
Hi Jordan, On Thu, Jan 23, 2020 at 09:42:36AM -0700, Jordan Crouse wrote: > Commit e812744c5f95 ("drm: msm: a6xx: Add support for A618") missed > updating the VBIF flush in a6xx_gmu_shutdown and instead > inserted the new sequence into a6xx_pm_suspend along with a redundant > GMU idle. > > Move

Re: [Freedreno] [v2] arm64: dts: sc7180: add display dt nodes

2020-01-23 Thread Bjorn Andersson
On Thu 23 Jan 04:15 PST 2020, Harigovindan P wrote: > Add display, DSI hardware DT nodes for sc7180. > > Changes in v1: > -Added display DT nodes for sc7180 > Changes in v2: > -Renamed node names > -Corrected code alignments > -Removed extra new line Please keep the

[Freedreno] [PATCH] drm/msm: Fix a6xx GMU shutdown sequence

2020-01-23 Thread Jordan Crouse
Commit e812744c5f95 ("drm: msm: a6xx: Add support for A618") missed updating the VBIF flush in a6xx_gmu_shutdown and instead inserted the new sequence into a6xx_pm_suspend along with a redundant GMU idle. Move a6xx_bus_clear_pending_transactions to a6xx_gmu.c and use it in the appropriate place

Re: [Freedreno] [PATCH v2 1/3] drm: msm: Add 618 gpu to the adreno gpu list

2020-01-23 Thread Jordan Crouse
On Thu, Jan 23, 2020 at 12:49:03PM +0530, Sharat Masetty wrote: > This patch adds Adreno 618 entry and its associated properties > to the gpulist entries. > > Signed-off-by: Sharat Masetty I'm extremely confused - these have been in linux-next for weeks. Why are you sending them out again?

[Freedreno] [PATCH v4 21/22] drm: Clean-up VBLANK-related callbacks in struct drm_driver

2020-01-23 Thread Thomas Zimmermann
All non-legacy users of VBLANK functions in struct drm_driver have been converted to use the respective interfaces in struct drm_crtc_funcs. The remaining users of VBLANK callbacks in struct drm_driver are legacy drivers with userspace modesetting. All users of struct

[Freedreno] [PATCH v4 14/22] drm/stm: Convert to struct drm_crtc_helper_funcs.get_scanout_position()

2020-01-23 Thread Thomas Zimmermann
The callback struct drm_driver.get_scanout_position() is deprecated in favor of struct drm_crtc_helper_funcs.get_scanout_position(). Convert stm over. Signed-off-by: Thomas Zimmermann Tested-by: Yannick Fertré --- drivers/gpu/drm/stm/drv.c | 1 - drivers/gpu/drm/stm/ltdc.c | 65

[Freedreno] [PATCH v4 19/22] drm/vkms: Convert to CRTC VBLANK callbacks

2020-01-23 Thread Thomas Zimmermann
VBLANK callbacks in struct drm_driver are deprecated in favor of their equivalents in struct drm_crtc_funcs. Convert vkms over. Signed-off-by: Thomas Zimmermann Reviewed-by: Rodrigo Siqueira Tested-by: Rodrigo Siqueira --- drivers/gpu/drm/vkms/vkms_crtc.c | 9 ++---

[Freedreno] [PATCH v4 09/22] drm/nouveau: Convert to CRTC VBLANK callbacks

2020-01-23 Thread Thomas Zimmermann
VBLANK callbacks in struct drm_driver are deprecated in favor of their equivalents in struct drm_crtc_funcs. Convert nouvean over. v4: * add argument names in function declaration Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/nouveau/dispnv04/crtc.c | 3 +++

[Freedreno] [v2] arm64: dts: sc7180: add display dt nodes

2020-01-23 Thread Harigovindan P
Add display, DSI hardware DT nodes for sc7180. Changes in v1: -Added display DT nodes for sc7180 Changes in v2: -Renamed node names -Corrected code alignments -Removed extra new line -Added DISP AHB clock for register access under display_subsystem

[Freedreno] [PATCH v4 18/22] drm/vc4: Convert to CRTC VBLANK callbacks

2020-01-23 Thread Thomas Zimmermann
VBLANK callbacks in struct drm_driver are deprecated in favor of their equivalents in struct drm_crtc_funcs. Convert vc4 over. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/vc4/vc4_crtc.c | 1 + drivers/gpu/drm/vc4/vc4_drv.c | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff

[Freedreno] [PATCH v4 15/22] drm/stm: Convert to CRTC VBLANK callbacks

2020-01-23 Thread Thomas Zimmermann
VBLANK callbacks in struct drm_driver are deprecated in favor of their equivalents in struct drm_crtc_funcs. Convert stm over. Signed-off-by: Thomas Zimmermann Tested-by: Yannick Fertré --- drivers/gpu/drm/stm/drv.c | 1 - drivers/gpu/drm/stm/ltdc.c | 1 + 2 files changed, 1 insertion(+), 1

[Freedreno] [PATCH v4 20/22] drm/vmwgfx: Convert to CRTC VBLANK callbacks

2020-01-23 Thread Thomas Zimmermann
VBLANK callbacks in struct drm_driver are deprecated in favor of their equivalents in struct drm_crtc_funcs. Convert vmwgfx over. v2: * remove accidental whitespace fixes Signed-off-by: Thomas Zimmermann Acked-by: Thomas Hellstrom --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 3 ---

[Freedreno] [PATCH v4 22/22] drm: Remove legacy version of get_scanout_position()

2020-01-23 Thread Thomas Zimmermann
The legacy version of get_scanout_position() was only useful while drivers still used drm_driver.get_scanout_position(). With no such drivers left, the related typedef and code can be removed Signed-off-by: Thomas Zimmermann Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/drm_vblank.c| 27

[Freedreno] [PATCH v4 00/22] drm: Clean up VBLANK callbacks in struct drm_driver

2020-01-23 Thread Thomas Zimmermann
VBLANK handlers in struct drm_driver are deprecated. Only legacy, non-KMS drivers are supposed to used them. DRM drivers with kernel modesetting are supposed to use VBLANK callbacks of the CRTC infrastructure. This patchset converts all DRM drivers to CRTC VBLANK callbacks and cleans up struct

[Freedreno] [PATCH v4 07/22] drm/i915: Convert to CRTC VBLANK callbacks

2020-01-23 Thread Thomas Zimmermann
VBLANK callbacks in struct drm_driver are deprecated in favor of their equivalents in struct drm_crtc_funcs. Convert i915 over. The callback struct drm_driver.get_scanout_position() is deprecated in favor of struct drm_crtc_helper_funcs.get_scanout_position(). i915 doesn't use CRTC helpers.

[Freedreno] [PATCH v4 16/22] drm/sti: Convert to CRTC VBLANK callbacks

2020-01-23 Thread Thomas Zimmermann
VBLANK callbacks in struct drm_driver are deprecated in favor of their equivalents in struct drm_crtc_funcs. Convert sti over. v2: * remove unnecessary include of sti_crtc.h from sti_drv.c Signed-off-by: Thomas Zimmermann Acked-by: Benjamin Gaignard --- drivers/gpu/drm/sti/sti_crtc.c

[Freedreno] [PATCH v4 12/22] drm/msm: Convert to struct drm_crtc_helper_funcs.get_scanout_position()

2020-01-23 Thread Thomas Zimmermann
The callback struct drm_driver.get_scanout_position() is deprecated in favor of struct drm_crtc_helper_funcs.get_scanout_position(). Convert mem over. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c | 67 +++

[Freedreno] [PATCH v4 17/22] drm/vc4: Convert to struct drm_crtc_helper_funcs.get_scanout_position()

2020-01-23 Thread Thomas Zimmermann
The callback struct drm_driver.get_scanout_position() is deprecated in favor of struct drm_crtc_helper_funcs.get_scanout_position(). Convert vc4 over. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/vc4/vc4_crtc.c | 12 +++- drivers/gpu/drm/vc4/vc4_drv.c | 1 -

[Freedreno] [PATCH v4 02/22] drm: Add get_scanout_position() to struct drm_crtc_helper_funcs

2020-01-23 Thread Thomas Zimmermann
The new callback get_scanout_position() reads the current location of the scanout process. The operation is currently located in struct drm_driver, but really belongs to the CRTC. Drivers will be converted in separate patches. To help with the conversion, the timestamp calculation has been moved

[Freedreno] [PATCH v4 06/22] drm/gma500: Convert to CRTC VBLANK callbacks

2020-01-23 Thread Thomas Zimmermann
VBLANK callbacks in struct drm_driver are deprecated in favor of their equivalents in struct drm_crtc_funcs. Convert gma500 over. Signed-off-by: Thomas Zimmermann Acked-by: Patrik Jakobsson --- drivers/gpu/drm/gma500/cdv_intel_display.c | 3 +++ drivers/gpu/drm/gma500/psb_drv.c | 4

[Freedreno] [PATCH v4 11/22] drm/radeon: Convert to CRTC VBLANK callbacks

2020-01-23 Thread Thomas Zimmermann
VBLANK callbacks in struct drm_driver are deprecated in favor of their equivalents in struct drm_crtc_funcs. Convert radeon over. Signed-off-by: Thomas Zimmermann Reviewed-by: Alex Deucher --- drivers/gpu/drm/radeon/radeon_display.c | 12 -- drivers/gpu/drm/radeon/radeon_drv.c | 7

[Freedreno] [PATCH v4 03/22] drm: Add get_vblank_timestamp() to struct drm_crtc_funcs

2020-01-23 Thread Thomas Zimmermann
The callback get_vblank_timestamp() is currently located in struct drm_driver, but really belongs into struct drm_crtc_funcs. Add an equivalent there. Driver will be converted in separate patches. The default implementation is drm_calc_vbltimestamp_from_scanoutpos(). The patch adds

[Freedreno] [PATCH v4 10/22] drm/radeon: Convert to struct drm_crtc_helper_funcs.get_scanout_position()

2020-01-23 Thread Thomas Zimmermann
The callback struct drm_driver.get_scanout_position() is deprecated in favor of struct drm_crtc_helper_funcs.get_scanout_position(). Convert radeon over. v4: * 80-character line fixes Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/radeon/atombios_crtc.c | 1 +

[Freedreno] [PATCH v4 08/22] drm/nouveau: Convert to struct drm_crtc_helper_funcs.get_scanout_position()

2020-01-23 Thread Thomas Zimmermann
The callback struct drm_driver.get_scanout_position() is deprecated in favor of struct drm_crtc_helper_funcs.get_scanout_position(). Convert nouveau over. v4: * add argument names in function declaration Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/nouveau/dispnv04/crtc.c |

[Freedreno] [PATCH v4 01/22] drm: Remove internal setup of struct drm_device.vblank_disable_immediate

2020-01-23 Thread Thomas Zimmermann
VBLANK interrupts can be disabled immediately or with a delay, where the latter is the default. The former option can be selected by setting get_vblank_timestamp and enabling vblank_disable_immediate in struct drm_device. Simplify the code in preparation of the removal of struct

[Freedreno] [PATCH v4 05/22] drm/amdgpu: Convert to CRTC VBLANK callbacks

2020-01-23 Thread Thomas Zimmermann
VBLANK callbacks in struct drm_driver are deprecated in favor of their equivalents in struct drm_crtc_funcs. Convert amdgpu over. v2: * don't wrap existing functions; change signature instead Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 6 +++---

[Freedreno] [v2] arm64: dts: sc7180: add display dt nodes

2020-01-23 Thread Harigovindan P
Add display, DSI hardware DT nodes for sc7180. Changes in v1: -Added display DT nodes for sc7180 Changes in v2: -Renamed node names -Corrected code alignments -Removed extra new line Signed-off-by: Harigovindan P --- arch/arm64/boot/dts/qcom/sc7180-idp.dts | 57

[Freedreno] [PATCH] msm:disp:dpu1: add UBWC support for display on SC7180

2020-01-23 Thread Kalyan Thota
Add UBWC global configuration for display on SC7180 target. Signed-off-by: Kalyan Thota --- drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c | 58 +++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c