All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/3] Tegra DRM and Host1x driver fixes
@ 2021-08-17  2:01 Dmitry Osipenko
  2021-08-17  2:01 ` [PATCH v1 1/3] drm/tegra: dc: Remove unused variables Dmitry Osipenko
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Dmitry Osipenko @ 2021-08-17  2:01 UTC (permalink / raw)
  To: Thierry Reding, Jonathan Hunter, Mikko Perttunen; +Cc: dri-devel, linux-tegra

Fix troubles introduced by recent commits.

Dmitry Osipenko (3):
  drm/tegra: dc: Remove unused variables
  drm/tegra: uapi: Fix wrong mapping end address in case of disabled
    IOMMU
  gpu/host1x: fence: Make spinlock static

 drivers/gpu/drm/tegra/dc.c   | 3 ---
 drivers/gpu/drm/tegra/dc.h   | 6 ------
 drivers/gpu/drm/tegra/uapi.c | 2 +-
 drivers/gpu/host1x/fence.c   | 2 +-
 4 files changed, 2 insertions(+), 11 deletions(-)

-- 
2.32.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v1 1/3] drm/tegra: dc: Remove unused variables
  2021-08-17  2:01 [PATCH v1 0/3] Tegra DRM and Host1x driver fixes Dmitry Osipenko
@ 2021-08-17  2:01 ` Dmitry Osipenko
  2021-08-17  2:01 ` [PATCH v1 2/3] drm/tegra: uapi: Fix wrong mapping end address in case of disabled IOMMU Dmitry Osipenko
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Dmitry Osipenko @ 2021-08-17  2:01 UTC (permalink / raw)
  To: Thierry Reding, Jonathan Hunter, Mikko Perttunen; +Cc: dri-devel, linux-tegra

Remove unused variables from tegra_crtc_update_memory_bandwidth().

Fixes: 04d5d5df9df7 ("drm/tegra: dc: Support memory bandwidth management")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 drivers/gpu/drm/tegra/dc.c | 3 ---
 drivers/gpu/drm/tegra/dc.h | 6 ------
 2 files changed, 9 deletions(-)

diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
index 16c7aabb94d3..a29d64f87563 100644
--- a/drivers/gpu/drm/tegra/dc.c
+++ b/drivers/gpu/drm/tegra/dc.c
@@ -1845,7 +1845,6 @@ tegra_crtc_update_memory_bandwidth(struct drm_crtc *crtc,
 				   bool prepare_bandwidth_transition)
 {
 	const struct tegra_plane_state *old_tegra_state, *new_tegra_state;
-	const struct tegra_dc_state *old_dc_state, *new_dc_state;
 	u32 i, new_avg_bw, old_avg_bw, new_peak_bw, old_peak_bw;
 	const struct drm_plane_state *old_plane_state;
 	const struct drm_crtc_state *old_crtc_state;
@@ -1858,8 +1857,6 @@ tegra_crtc_update_memory_bandwidth(struct drm_crtc *crtc,
 		return;
 
 	old_crtc_state = drm_atomic_get_old_crtc_state(state, crtc);
-	old_dc_state = to_const_dc_state(old_crtc_state);
-	new_dc_state = to_const_dc_state(crtc->state);
 
 	if (!crtc->state->active) {
 		if (!old_crtc_state->active)
diff --git a/drivers/gpu/drm/tegra/dc.h b/drivers/gpu/drm/tegra/dc.h
index f0cb691852a1..40378308d527 100644
--- a/drivers/gpu/drm/tegra/dc.h
+++ b/drivers/gpu/drm/tegra/dc.h
@@ -35,12 +35,6 @@ static inline struct tegra_dc_state *to_dc_state(struct drm_crtc_state *state)
 	return NULL;
 }
 
-static inline const struct tegra_dc_state *
-to_const_dc_state(const struct drm_crtc_state *state)
-{
-	return to_dc_state((struct drm_crtc_state *)state);
-}
-
 struct tegra_dc_stats {
 	unsigned long frames;
 	unsigned long vblank;
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v1 2/3] drm/tegra: uapi: Fix wrong mapping end address in case of disabled IOMMU
  2021-08-17  2:01 [PATCH v1 0/3] Tegra DRM and Host1x driver fixes Dmitry Osipenko
  2021-08-17  2:01 ` [PATCH v1 1/3] drm/tegra: dc: Remove unused variables Dmitry Osipenko
@ 2021-08-17  2:01 ` Dmitry Osipenko
  2021-08-17  2:01 ` [PATCH v1 3/3] gpu/host1x: fence: Make spinlock static Dmitry Osipenko
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Dmitry Osipenko @ 2021-08-17  2:01 UTC (permalink / raw)
  To: Thierry Reding, Jonathan Hunter, Mikko Perttunen; +Cc: dri-devel, linux-tegra

All jobs are failing on Tegra20 because it doesn't use IOMMU and mapping
function uses size of mapping that is zero instead of BO size, fix it.

Fixes: d7c591bc1a3f ("drm/tegra: Implement new UAPI")
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 drivers/gpu/drm/tegra/uapi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/tegra/uapi.c b/drivers/gpu/drm/tegra/uapi.c
index dc16a24f4dbe..690a339c52ec 100644
--- a/drivers/gpu/drm/tegra/uapi.c
+++ b/drivers/gpu/drm/tegra/uapi.c
@@ -222,7 +222,7 @@ int tegra_drm_ioctl_channel_map(struct drm_device *drm, void *data, struct drm_f
 		mapping->iova = sg_dma_address(mapping->sgt->sgl);
 	}
 
-	mapping->iova_end = mapping->iova + host1x_to_tegra_bo(mapping->bo)->size;
+	mapping->iova_end = mapping->iova + host1x_to_tegra_bo(mapping->bo)->gem.size;
 
 	err = xa_alloc(&context->mappings, &args->mapping, mapping, XA_LIMIT(1, U32_MAX),
 		       GFP_KERNEL);
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v1 3/3] gpu/host1x: fence: Make spinlock static
  2021-08-17  2:01 [PATCH v1 0/3] Tegra DRM and Host1x driver fixes Dmitry Osipenko
  2021-08-17  2:01 ` [PATCH v1 1/3] drm/tegra: dc: Remove unused variables Dmitry Osipenko
  2021-08-17  2:01 ` [PATCH v1 2/3] drm/tegra: uapi: Fix wrong mapping end address in case of disabled IOMMU Dmitry Osipenko
@ 2021-08-17  2:01 ` Dmitry Osipenko
  2021-08-17  8:20 ` [PATCH v1 0/3] Tegra DRM and Host1x driver fixes Mikko Perttunen
  2021-08-17 14:17 ` Thierry Reding
  4 siblings, 0 replies; 6+ messages in thread
From: Dmitry Osipenko @ 2021-08-17  2:01 UTC (permalink / raw)
  To: Thierry Reding, Jonathan Hunter, Mikko Perttunen; +Cc: dri-devel, linux-tegra

The DEFINE_SPINLOCK macro creates a global spinlock symbol that is visible
to the whole kernel. This is unintended in the code, fix it.

Fixes: 687db2207b1b ("gpu: host1x: Add DMA fence implementation")
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 drivers/gpu/host1x/fence.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/host1x/fence.c b/drivers/gpu/host1x/fence.c
index 6941add95d0f..e49083b0b09e 100644
--- a/drivers/gpu/host1x/fence.c
+++ b/drivers/gpu/host1x/fence.c
@@ -15,7 +15,7 @@
 #include "intr.h"
 #include "syncpt.h"
 
-DEFINE_SPINLOCK(lock);
+static DEFINE_SPINLOCK(lock);
 
 struct host1x_syncpt_fence {
 	struct dma_fence base;
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v1 0/3] Tegra DRM and Host1x driver fixes
  2021-08-17  2:01 [PATCH v1 0/3] Tegra DRM and Host1x driver fixes Dmitry Osipenko
                   ` (2 preceding siblings ...)
  2021-08-17  2:01 ` [PATCH v1 3/3] gpu/host1x: fence: Make spinlock static Dmitry Osipenko
@ 2021-08-17  8:20 ` Mikko Perttunen
  2021-08-17 14:17 ` Thierry Reding
  4 siblings, 0 replies; 6+ messages in thread
From: Mikko Perttunen @ 2021-08-17  8:20 UTC (permalink / raw)
  To: Dmitry Osipenko, Thierry Reding, Jonathan Hunter; +Cc: dri-devel, linux-tegra

On 8/17/21 5:01 AM, Dmitry Osipenko wrote:
> Fix troubles introduced by recent commits.
> 
> Dmitry Osipenko (3):
>    drm/tegra: dc: Remove unused variables
>    drm/tegra: uapi: Fix wrong mapping end address in case of disabled
>      IOMMU
>    gpu/host1x: fence: Make spinlock static
> 
>   drivers/gpu/drm/tegra/dc.c   | 3 ---
>   drivers/gpu/drm/tegra/dc.h   | 6 ------
>   drivers/gpu/drm/tegra/uapi.c | 2 +-
>   drivers/gpu/host1x/fence.c   | 2 +-
>   4 files changed, 2 insertions(+), 11 deletions(-)
> 

Series

Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>

I went through the changes between v6 and v7 and from what I can tell 
the end address change above is the only one of those missing in what 
was merged.

Thanks,
Mikko

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1 0/3] Tegra DRM and Host1x driver fixes
  2021-08-17  2:01 [PATCH v1 0/3] Tegra DRM and Host1x driver fixes Dmitry Osipenko
                   ` (3 preceding siblings ...)
  2021-08-17  8:20 ` [PATCH v1 0/3] Tegra DRM and Host1x driver fixes Mikko Perttunen
@ 2021-08-17 14:17 ` Thierry Reding
  4 siblings, 0 replies; 6+ messages in thread
From: Thierry Reding @ 2021-08-17 14:17 UTC (permalink / raw)
  To: Dmitry Osipenko; +Cc: Jonathan Hunter, Mikko Perttunen, dri-devel, linux-tegra

[-- Attachment #1: Type: text/plain, Size: 586 bytes --]

On Tue, Aug 17, 2021 at 05:01:50AM +0300, Dmitry Osipenko wrote:
> Fix troubles introduced by recent commits.
> 
> Dmitry Osipenko (3):
>   drm/tegra: dc: Remove unused variables
>   drm/tegra: uapi: Fix wrong mapping end address in case of disabled
>     IOMMU
>   gpu/host1x: fence: Make spinlock static
> 
>  drivers/gpu/drm/tegra/dc.c   | 3 ---
>  drivers/gpu/drm/tegra/dc.h   | 6 ------
>  drivers/gpu/drm/tegra/uapi.c | 2 +-
>  drivers/gpu/host1x/fence.c   | 2 +-
>  4 files changed, 2 insertions(+), 11 deletions(-)

All three patches applied, thanks.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-08-17 14:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-17  2:01 [PATCH v1 0/3] Tegra DRM and Host1x driver fixes Dmitry Osipenko
2021-08-17  2:01 ` [PATCH v1 1/3] drm/tegra: dc: Remove unused variables Dmitry Osipenko
2021-08-17  2:01 ` [PATCH v1 2/3] drm/tegra: uapi: Fix wrong mapping end address in case of disabled IOMMU Dmitry Osipenko
2021-08-17  2:01 ` [PATCH v1 3/3] gpu/host1x: fence: Make spinlock static Dmitry Osipenko
2021-08-17  8:20 ` [PATCH v1 0/3] Tegra DRM and Host1x driver fixes Mikko Perttunen
2021-08-17 14:17 ` Thierry Reding

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.