[Freedreno] [PATCH] drm/msm: fix an error code in the ioctl

2019-02-13 Thread Dan Carpenter
The copy_to/from_user() functions return the number of bytes remaining to be copied but we should return -EFAULT to the user. Fixes: f05c83e77460 ("drm/msm: add uapi to get/set debug name") Signed-off-by: Dan Carpenter --- If I were reviewing this patch, I would be suspicous that we don't return

[Freedreno] [PATCH v2 0/4] reserve RM resources in private obj state

2019-02-13 Thread Jeykumar Sankaran
v2 patches for [1]. changes in v2: - Reserve and track hw resources allocated per display in subclassed drm private object states. - Private objects are created per CRTC. [1] https://patchwork.freedesktop.org/series/50722/ Follow up series will be submitted to clean u

[Freedreno] [PATCH v2 2/4] drm/msm/dpu: track HW resources using private object state

2019-02-13 Thread Jeykumar Sankaran
DPU maintained reservation lists to cache assigned HW blocks for the display and a retrieval mechanism for the individual DRM components to query their respective HW blocks. This patch uses the sub-classed private object state to store and track HW blocks assigned for different components of the d

[Freedreno] [PATCH v2 3/4] drm/msm/dpu: remove reserve in encoder mode_set

2019-02-13 Thread Jeykumar Sankaran
Now that we have dpu private state tracking the reserved HW resources, we have access to them after atomic swap. So avoid reserving the resources in mode_set. changes in v2: - removal applied on private object based reservation Signed-off-by: Jeykumar Sankaran Reviewed-by: Sean Paul ---

[Freedreno] [PATCH v2 4/4] drm/msm/dpu: remove mode_set_complete

2019-02-13 Thread Jeykumar Sankaran
This flag was introduced as a fix to notify modeset complete when hw reservations were happening in both atomic_check and atomic_commit paths. Now that we are reserving only in atomic_check, we can get rid of this flag. changes in v2: - none Signed-off-by: Jeykumar Sankaran Reviewed-by:

[Freedreno] [PATCH v2 1/4] drm/msm/dpu: add atomic private object to dpu crtc

2019-02-13 Thread Jeykumar Sankaran
Subclass drm private object state for DPU for handling driver specific data. Adds atomic private object to dpu crtc to track hw resources per display. Provide helper function to retrieve DPU private data from current atomic state before atomic swap. changes in v2: - private objects are mai

Re: [Freedreno] [PATCH v2 0/7] move dpu resource parsing to encoder modeset

2019-02-13 Thread Jeykumar Sankaran
On 2019-02-13 17:19, Jeykumar Sankaran wrote: Fixing some of the low hanging fruits by moving the hw resource parsing and assignment to encoder modeset. This series prepares DPU resource management to switch to state based resource tracking which is implemented in the next incoming changes. Be

[Freedreno] [PATCH v2 4/7] drm/msm/dpu: dont use encoder->crtc in atomic path

2019-02-13 Thread Jeykumar Sankaran
encoder->crtc is not really meaningful for atomic path. Use crtc->encoder_mask to identify the crtc attached with an encoder. Signed-off-by: Jeykumar Sankaran --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm

[Freedreno] [PATCH v2 2/7] drm/msm/dpu: remove phys_vid subclass

2019-02-13 Thread Jeykumar Sankaran
Not holding any video encoder specific data. Get rid of it. Signed-off-by: Jeykumar Sankaran --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h | 11 --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 18 -- 2 files changed, 4 insertions(+), 25 deletions(-)

[Freedreno] [PATCH v2 0/7] move dpu resource parsing to encoder modeset

2019-02-13 Thread Jeykumar Sankaran
Fixing some of the low hanging fruits by moving the hw resource parsing and assignment to encoder modeset. This series prepares DPU resource management to switch to state based resource tracking which is implemented in the next incoming changes. Thanks. Jeykumar Sankaran (7): drm/msm/dpu: move

[Freedreno] [PATCH v2 6/7] drm/msm/dpu: assign intf to encoder in mode_set

2019-02-13 Thread Jeykumar Sankaran
Iterate and assign HW intf block to physical encoders in encoder modeset. Moving all the HW block assignments to encoder modeset to allow easy switching to state based resource management. Signed-off-by: Jeykumar Sankaran --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c| 22 ++

[Freedreno] [PATCH v2 7/7] drm/msm/dpu: check split role for single flush

2019-02-13 Thread Jeykumar Sankaran
Removing unwanted access of crtc_state for finding this information. Use split role information to know whether we have slave ctl. Signed-off-by: Jeykumar Sankaran --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) diff

[Freedreno] [PATCH v2 3/7] drm/msm/dpu: release resources on modeset failure

2019-02-13 Thread Jeykumar Sankaran
release resources allocated in mode_set if any of the hw check fails. Most of these checks are not necessary and they will be removed in the follow up patches with state based resource allocations. Signed-off-by: Jeykumar Sankaran --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 7 +-- 1 fi

[Freedreno] [PATCH v2 1/7] drm/msm/dpu: move hw_inf encoder baseclass

2019-02-13 Thread Jeykumar Sankaran
Both video and command physical encoders will have a hw interface assigned to it. So there is really no need to track the hw block in specific encoder subclass. Signed-off-by: Jeykumar Sankaran --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h | 4 +- .../gpu/drm/msm/disp/dpu1/dpu_encoder

[Freedreno] [PATCH v2 5/7] drm/msm/dpu: map mixer/ctl hw blocks in encoder modeset

2019-02-13 Thread Jeykumar Sankaran
After resource allocation, iterate and populate mixer/ctl hw blocks in encoder modeset thereby centralizing all the resource mapping to the CRTC. This change is made for easy switching to state based allocation using private objects later in this series. Signed-off-by: Jeykumar Sankaran --- driv

Re: [Freedreno] [PATCH v2 3/5] drm: msm: Switch to use drm_gem_object reservation_object

2019-02-13 Thread Rob Clark
On Sat, Feb 2, 2019 at 10:42 AM Rob Herring wrote: > > Now that the base struct drm_gem_object has a reservation_object, use it > and remove the private BO one. > > We can't use the drm_gem_reservation_object_wait() helper for MSM > because (in theory) msm_gem_cpu_prep() will also do some cache >

Re: [Freedreno] [PATCH] drm/msm/a6xx: Add support for an interconnect path

2019-02-13 Thread Georgi Djakov
Hi, On 2/12/19 16:35, Greg KH wrote: > On Tue, Feb 12, 2019 at 04:07:35PM +0200, Georgi Djakov wrote: >> Hi Greg, >> >> On 2/12/19 12:16, Greg KH wrote: >>> On Tue, Feb 12, 2019 at 11:52:38AM +0200, Georgi Djakov wrote: From: Jordan Crouse Try to get the interconnect path for the G