Skip to contentSkip to conversation

Free the writeback_job when it with an empty fb

PATCH In review Lowry Li (Arm Technology China) 10 participants 29 messages Jul 31, 2019 – Dec 9, 2019 2 messages not in the archive

Subsystems (8)
lore
Share & tools
lore
#0 lore raw

cover Free the writeback_job when it with an empty fb

Hi,

This serie aims at adding the check and free the writeback_job when it with an empty fb in drm_atomic_connector_check().

Also did some refine in drm_writeback_signal_completion() to clear the fence pointer when writeback job signaled.

This patchset is based at the drm-misc-fixes branch.

Lowry Li (Arm Technology China) (2):
drm: Free the writeback_job when it with an empty fb
drm: Clear the fence pointer when writeback job signaled

 .../drm/arm/display/komeda/komeda_wb_connector.c   |  3 +--
 drivers/gpu/drm/arm/malidp_mw.c                    |  4 ++--
 drivers/gpu/drm/drm_atomic.c                       | 13 ++++++++----
 drivers/gpu/drm/drm_writeback.c                    | 23 ++++++++++++++--------
 drivers/gpu/drm/rcar-du/rcar_du_writeback.c        |  4 ++--
 drivers/gpu/drm/vc4/vc4_txp.c                      |  5 ++---
 6 files changed, 31 insertions(+), 21 deletions(-)
Signature · 6 lines
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

PATCH 1/2 drm: Free the writeback_job when it with an empty fb

From: "Lowry Li (Arm Technology China)" <[email protected]>

Adds the check if the writeback_job with an empty fb, then it should be freed in atomic_check phase.

With this change, the driver users will not check empty fb case any more. So refined accordingly.

---
 drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c |  3 +--
 drivers/gpu/drm/arm/malidp_mw.c                          |  4 ++--
 drivers/gpu/drm/drm_atomic.c                             | 13 +++++++++----
 drivers/gpu/drm/rcar-du/rcar_du_writeback.c              |  4 ++--
 drivers/gpu/drm/vc4/vc4_txp.c                            |  5 ++---
 5 files changed, 16 insertions(+), 13 deletions(-)
drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c +1 -2
index 617e1f7..d6103dd 100644
@@ -43,9 +43,8 @@
 	struct komeda_data_flow_cfg dflow;
 	int err;
 
-	if (!writeback_job || !writeback_job->fb) {
+	if (!writeback_job)
 		return 0;
-	}
 
 	if (!crtc_st->active) {
 		DRM_DEBUG_ATOMIC("Cannot write the composition result out on a inactive CRTC.\n");
drivers/gpu/drm/arm/malidp_mw.c +2 -2
index 2e81252..a59227b 100644
@@ -130,7 +130,7 @@ static void malidp_mw_connector_destroy(struct drm_connector *connector)
 	struct drm_framebuffer *fb;
 	int i, n_planes;
 
-	if (!conn_state->writeback_job || !conn_state->writeback_job->fb)
+	if (!conn_state->writeback_job)
 		return 0;
 
 	fb = conn_state->writeback_job->fb;
@@ -247,7 +247,7 @@ void malidp_mw_atomic_commit(struct drm_device *drm,
 
 	mw_state = to_mw_state(conn_state);
 
-	if (conn_state->writeback_job && conn_state->writeback_job->fb) {
+	if (conn_state->writeback_job) {
 		struct drm_framebuffer *fb = conn_state->writeback_job->fb;
 
 		DRM_DEV_DEBUG_DRIVER(drm->dev,
drivers/gpu/drm/drm_atomic.c +9 -4
index 419381a..14aeaf7 100644
@@ -430,10 +430,15 @@ static int drm_atomic_connector_check(struct drm_connector *connector,
 		return -EINVAL;
 	}
 
-	if (writeback_job->out_fence && !writeback_job->fb) {
-		DRM_DEBUG_ATOMIC("[CONNECTOR:%d:%s] requesting out-fence without framebuffer\n",
-				 connector->base.id, connector->name);
-		return -EINVAL;
+	if (!writeback_job->fb) {
+		if (writeback_job->out_fence) {
+			DRM_DEBUG_ATOMIC("[CONNECTOR:%d:%s] requesting out-fence without framebuffer\n",
+					 connector->base.id, connector->name);
+			return -EINVAL;
+		}
+
+		drm_writeback_cleanup_job(writeback_job);
+		state->writeback_job = NULL;
 	}
 
 	return 0;
drivers/gpu/drm/rcar-du/rcar_du_writeback.c +2 -2
index ae07290..04efa78d 100644
@@ -147,7 +147,7 @@ static int rcar_du_wb_enc_atomic_check(struct drm_encoder *encoder,
 	struct drm_device *dev = encoder->dev;
 	struct drm_framebuffer *fb;
 
-	if (!conn_state->writeback_job || !conn_state->writeback_job->fb)
+	if (!conn_state->writeback_job)
 		return 0;
 
 	fb = conn_state->writeback_job->fb;
@@ -221,7 +221,7 @@ void rcar_du_writeback_setup(struct rcar_du_crtc *rcrtc,
 	unsigned int i;
 
 	state = rcrtc->writeback.base.state;
-	if (!state || !state->writeback_job || !state->writeback_job->fb)
+	if (!state || !state->writeback_job)
 		return;
 
 	fb = state->writeback_job->fb;
drivers/gpu/drm/vc4/vc4_txp.c +2 -3
index 96f91c1..e92fa12 100644
@@ -229,7 +229,7 @@ static int vc4_txp_connector_atomic_check(struct drm_connector *conn,
 	int i;
 
 	conn_state = drm_atomic_get_new_connector_state(state, conn);
-	if (!conn_state->writeback_job || !conn_state->writeback_job->fb)
+	if (!conn_state->writeback_job)
 		return 0;
 
 	crtc_state = drm_atomic_get_new_crtc_state(state, conn_state->crtc);
@@ -269,8 +269,7 @@ static void vc4_txp_connector_atomic_commit(struct drm_connector *conn,
 	u32 ctrl;
 	int i;
 
-	if (WARN_ON(!conn_state->writeback_job ||
-		    !conn_state->writeback_job->fb))
+	if (WARN_ON(!conn_state->writeback_job))
 		return;
 
 	mode = &conn_state->crtc->state->adjusted_mode;
Signature · 6 lines
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#4 lore raw

PATCH 2/2 drm: Clear the fence pointer when writeback job signaled

In reply to Lowry Li (Arm Technology China)

During it signals the completion of a writeback job, after releasing the out_fence, we'd clear the pointer.

Check if fence left over in drm_writeback_cleanup_job(), release it.

---
 drivers/gpu/drm/drm_writeback.c | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)
drivers/gpu/drm/drm_writeback.c +15 -8
index ff138b6..43d9e3b 100644
@@ -324,6 +324,9 @@ void drm_writeback_cleanup_job(struct drm_writeback_job *job)
 	if (job->fb)
 		drm_framebuffer_put(job->fb);
 
+	if (job->out_fence)
+		dma_fence_put(job->out_fence);
+
 	kfree(job);
 }
 EXPORT_SYMBOL(drm_writeback_cleanup_job);
@@ -366,25 +369,29 @@ static void cleanup_work(struct work_struct *work)
 {
 	unsigned long flags;
 	struct drm_writeback_job *job;
+	struct dma_fence *out_fence;
 
 	spin_lock_irqsave(&wb_connector->job_lock, flags);
 	job = list_first_entry_or_null(&wb_connector->job_queue,
 				       struct drm_writeback_job,
 				       list_entry);
-	if (job) {
+	if (job)
 		list_del(&job->list_entry);
-		if (job->out_fence) {
-			if (status)
-				dma_fence_set_error(job->out_fence, status);
-			dma_fence_signal(job->out_fence);
-			dma_fence_put(job->out_fence);
-		}
-	}
+
 	spin_unlock_irqrestore(&wb_connector->job_lock, flags);
 
 	if (WARN_ON(!job))
 		return;
 
+	out_fence = job->out_fence;
+	if (out_fence) {
+		if (status)
+			dma_fence_set_error(out_fence, status);
+		dma_fence_signal(out_fence);
+		dma_fence_put(out_fence);
+		job->out_fence = NULL;
+	}
+
 	INIT_WORK(&job->cleanup_work, cleanup_work);
 	queue_work(system_long_wq, &job->cleanup_work);
 }
Signature · 6 lines
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
maintainer Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH v1 1/2] drm: Free the writeback_job when it with an empty fb

In reply to Lowry Li (Arm Technology China)
Quoted 9 lines · Lowry Li (Arm Technology China)

From: "Lowry Li (Arm Technology China)" <[email protected]>

Adds the check if the writeback_job with an empty fb, then it should be freed in atomic_check phase.

With this change, the driver users will not check empty fb case any more. So refined accordingly.

Quoted 117 lines
---
 drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c |  3 +--
 drivers/gpu/drm/arm/malidp_mw.c                          |  4 ++--
 drivers/gpu/drm/drm_atomic.c                             | 13 +++++++++----
 drivers/gpu/drm/rcar-du/rcar_du_writeback.c              |  4 ++--
 drivers/gpu/drm/vc4/vc4_txp.c                            |  5 ++---
 5 files changed, 16 insertions(+), 13 deletions(-)
drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c +1 -2
index 617e1f7..d6103dd 100644
@@ -43,9 +43,8 @@
 	struct komeda_data_flow_cfg dflow;
 	int err;
 
-	if (!writeback_job || !writeback_job->fb) {
+	if (!writeback_job)
 		return 0;
-	}
 
 	if (!crtc_st->active) {
 		DRM_DEBUG_ATOMIC("Cannot write the composition result out on a inactive CRTC.\n");
drivers/gpu/drm/arm/malidp_mw.c +2 -2
index 2e81252..a59227b 100644
@@ -130,7 +130,7 @@ static void malidp_mw_connector_destroy(struct drm_connector *connector)
 	struct drm_framebuffer *fb;
 	int i, n_planes;
 
-	if (!conn_state->writeback_job || !conn_state->writeback_job->fb)
+	if (!conn_state->writeback_job)
 		return 0;
 
 	fb = conn_state->writeback_job->fb;
@@ -247,7 +247,7 @@ void malidp_mw_atomic_commit(struct drm_device *drm,
 
 	mw_state = to_mw_state(conn_state);
 
-	if (conn_state->writeback_job && conn_state->writeback_job->fb) {
+	if (conn_state->writeback_job) {
 		struct drm_framebuffer *fb = conn_state->writeback_job->fb;
 
 		DRM_DEV_DEBUG_DRIVER(drm->dev,
drivers/gpu/drm/drm_atomic.c +9 -4
index 419381a..14aeaf7 100644
@@ -430,10 +430,15 @@ static int drm_atomic_connector_check(struct drm_connector *connector,
 		return -EINVAL;
 	}
 
-	if (writeback_job->out_fence && !writeback_job->fb) {
-		DRM_DEBUG_ATOMIC("[CONNECTOR:%d:%s] requesting out-fence without framebuffer\n",
-				 connector->base.id, connector->name);
-		return -EINVAL;
+	if (!writeback_job->fb) {
+		if (writeback_job->out_fence) {
+			DRM_DEBUG_ATOMIC("[CONNECTOR:%d:%s] requesting out-fence without framebuffer\n",
+					 connector->base.id, connector->name);
+			return -EINVAL;
+		}
+
+		drm_writeback_cleanup_job(writeback_job);
+		state->writeback_job = NULL;
 	}
 
 	return 0;
drivers/gpu/drm/rcar-du/rcar_du_writeback.c +2 -2
index ae07290..04efa78d 100644
@@ -147,7 +147,7 @@ static int rcar_du_wb_enc_atomic_check(struct drm_encoder *encoder,
 	struct drm_device *dev = encoder->dev;
 	struct drm_framebuffer *fb;
 
-	if (!conn_state->writeback_job || !conn_state->writeback_job->fb)
+	if (!conn_state->writeback_job)
 		return 0;
 
 	fb = conn_state->writeback_job->fb;
@@ -221,7 +221,7 @@ void rcar_du_writeback_setup(struct rcar_du_crtc *rcrtc,
 	unsigned int i;
 
 	state = rcrtc->writeback.base.state;
-	if (!state || !state->writeback_job || !state->writeback_job->fb)
+	if (!state || !state->writeback_job)
 		return;
 
 	fb = state->writeback_job->fb;
drivers/gpu/drm/vc4/vc4_txp.c +2 -3
index 96f91c1..e92fa12 100644
@@ -229,7 +229,7 @@ static int vc4_txp_connector_atomic_check(struct drm_connector *conn,
 	int i;
 
 	conn_state = drm_atomic_get_new_connector_state(state, conn);
-	if (!conn_state->writeback_job || !conn_state->writeback_job->fb)
+	if (!conn_state->writeback_job)
 		return 0;
 
 	crtc_state = drm_atomic_get_new_crtc_state(state, conn_state->crtc);
@@ -269,8 +269,7 @@ static void vc4_txp_connector_atomic_commit(struct drm_connector *conn,
 	u32 ctrl;
 	int i;
 
-	if (WARN_ON(!conn_state->writeback_job ||
-		    !conn_state->writeback_job->fb))
+	if (WARN_ON(!conn_state->writeback_job))
 		return;
 
 	mode = &conn_state->crtc->state->adjusted_mode;
Signature · 1 line
1.9.1
Signature · 8 lines
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯
maintainer
#5 lore raw

Re: [PATCH v1 2/2] drm: Clear the fence pointer when writeback job signaled

In reply to Lowry Li (Arm Technology China)

Hi Lowry,

Quoted 15 lines · Lowry Li (Arm Technology China)

During it signals the completion of a writeback job, after releasing the out_fence, we'd clear the pointer.

Check if fence left over in drm_writeback_cleanup_job(), release it.

---
 drivers/gpu/drm/drm_writeback.c | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)
drivers/gpu/drm/drm_writeback.c +0 -0
index ff138b6..43d9e3b 100644

drivers/gpu/drm/drm_writeback.c void drm_writeback_cleanup_job(struct drm_writeback_job *job) · line 331

Quoted 8 lines
drivers/gpu/drm/drm_writeback.c +3 -0
@@ -324,6 +324,9 @@ void drm_writeback_cleanup_job(struct drm_writeback_job *job)
 	if (job->fb)
 		drm_framebuffer_put(job->fb);
 
+	if (job->out_fence)
+		dma_fence_put(job->out_fence);
+
 	kfree(job);
 }

This change looks good.

Quoted 9 lines
drivers/gpu/drm/drm_writeback.c +1 -0
 EXPORT_SYMBOL(drm_writeback_cleanup_job);
@@ -366,25 +369,29 @@ static void cleanup_work(struct work_struct *work)
 {
 	unsigned long flags;
 	struct drm_writeback_job *job;
+	struct dma_fence *out_fence;
 
 	spin_lock_irqsave(&wb_connector->job_lock, flags);
 	job = list_first_entry_or_null(&wb_connector->job_queue,

drivers/gpu/drm/drm_writeback.c static void cleanup_work(struct work_struct *work) · line 380

Quoted 10 lines
drivers/gpu/drm/drm_writeback.c +1 -6
 				       struct drm_writeback_job,
 				       list_entry);
-	if (job) {
+	if (job)
 		list_del(&job->list_entry);
-		if (job->out_fence) {
-			if (status)
-				dma_fence_set_error(job->out_fence, status);
-			dma_fence_signal(job->out_fence);
-			dma_fence_put(job->out_fence);

*Here*

Quoted 7 lines
drivers/gpu/drm/drm_writeback.c +1 -2
-		}
-	}
+
 	spin_unlock_irqrestore(&wb_connector->job_lock, flags);
 
 	if (WARN_ON(!job))
 		return;

drivers/gpu/drm/drm_writeback.c static void cleanup_work(struct work_struct *work) · line 394

Quoted 10 lines
drivers/gpu/drm/drm_writeback.c +9 -0
 
+	out_fence = job->out_fence;
+	if (out_fence) {
+		if (status)
+			dma_fence_set_error(out_fence, status);
+		dma_fence_signal(out_fence);
+		dma_fence_put(out_fence);
+		job->out_fence = NULL;
+	}
+

I don't get the point of this change. Why not just add job->out_fence = NULL where *Here* is?

Best regards,
Liviu

Quoted 6 lines
drivers/gpu/drm/drm_writeback.c +0 -0
 	INIT_WORK(&job->cleanup_work, cleanup_work);
 	queue_work(system_long_wq, &job->cleanup_work);
 }
Signature · 1 line
1.9.1
Signature · 12 lines
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#9 lore raw

Re: [PATCH v1 2/2] drm: Clear the fence pointer when writeback job signaled

In reply to Lowry Li (Arm Technology China)

Hi Lowry,

Thanks for this cleanup.

Quoted 15 lines · Lowry Li (Arm Technology China)

During it signals the completion of a writeback job, after releasing the out_fence, we'd clear the pointer.

Check if fence left over in drm_writeback_cleanup_job(), release it.

---
 drivers/gpu/drm/drm_writeback.c | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)
drivers/gpu/drm/drm_writeback.c +0 -0
index ff138b6..43d9e3b 100644

drivers/gpu/drm/drm_writeback.c void drm_writeback_cleanup_job(struct drm_writeback_job *job) · line 327

Quoted 4 lines
drivers/gpu/drm/drm_writeback.c +1 -0
@@ -324,6 +324,9 @@ void drm_writeback_cleanup_job(struct drm_writeback_job *job)
 	if (job->fb)
 		drm_framebuffer_put(job->fb);
 
+	if (job->out_fence)

I'm thinking it might be a good idea to signal the fence with an error here, if it's not already signaled. Otherwise, if there's someone waiting (which there shouldn't be), they're going to be waiting a very long time :-)

Thanks,
-Brian

Quoted 4 lines
drivers/gpu/drm/drm_writeback.c +2 -0
+		dma_fence_put(job->out_fence);
+
 	kfree(job);
 }
#6 lore raw

Re: [PATCH v1 2/2] drm: Clear the fence pointer when writeback job signaled

In reply to Liviu Dudau

Hi Liviu,

Quoted 72 lines · Liviu Dudau

Hi Lowry,

Quoted 15 lines · Lowry Li (Arm Technology China)

During it signals the completion of a writeback job, after releasing the out_fence, we'd clear the pointer.

Check if fence left over in drm_writeback_cleanup_job(), release it.

---
 drivers/gpu/drm/drm_writeback.c | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)
drivers/gpu/drm/drm_writeback.c +0 -0
index ff138b6..43d9e3b 100644

drivers/gpu/drm/drm_writeback.c void drm_writeback_cleanup_job(struct drm_writeback_job *job) · line 331

Quoted 8 lines
drivers/gpu/drm/drm_writeback.c +3 -0
@@ -324,6 +324,9 @@ void drm_writeback_cleanup_job(struct drm_writeback_job *job)
 	if (job->fb)
 		drm_framebuffer_put(job->fb);
 
+	if (job->out_fence)
+		dma_fence_put(job->out_fence);
+
 	kfree(job);
 }

This change looks good.

Quoted 9 lines
drivers/gpu/drm/drm_writeback.c +1 -0
 EXPORT_SYMBOL(drm_writeback_cleanup_job);
@@ -366,25 +369,29 @@ static void cleanup_work(struct work_struct *work)
 {
 	unsigned long flags;
 	struct drm_writeback_job *job;
+	struct dma_fence *out_fence;
 
 	spin_lock_irqsave(&wb_connector->job_lock, flags);
 	job = list_first_entry_or_null(&wb_connector->job_queue,

drivers/gpu/drm/drm_writeback.c static void cleanup_work(struct work_struct *work) · line 380

Quoted 10 lines
drivers/gpu/drm/drm_writeback.c +1 -6
 				       struct drm_writeback_job,
 				       list_entry);
-	if (job) {
+	if (job)
 		list_del(&job->list_entry);
-		if (job->out_fence) {
-			if (status)
-				dma_fence_set_error(job->out_fence, status);
-			dma_fence_signal(job->out_fence);
-			dma_fence_put(job->out_fence);

*Here*

Quoted 7 lines
drivers/gpu/drm/drm_writeback.c +1 -2
-		}
-	}
+
 	spin_unlock_irqrestore(&wb_connector->job_lock, flags);
 
 	if (WARN_ON(!job))
 		return;

drivers/gpu/drm/drm_writeback.c static void cleanup_work(struct work_struct *work) · line 394

Quoted 10 lines
drivers/gpu/drm/drm_writeback.c +9 -0
 
+	out_fence = job->out_fence;
+	if (out_fence) {
+		if (status)
+			dma_fence_set_error(out_fence, status);
+		dma_fence_signal(out_fence);
+		dma_fence_put(out_fence);
+		job->out_fence = NULL;
+	}
+

I don't get the point of this change. Why not just add job->out_fence = NULL where *Here* is?

Quoted 2 lines

Best regards,
Liviu

Besides setting NULL, also did a refine by moving the fence operation out of the lock block.

Best regards,
Lowry

Quoted 16 lines
Quoted 6 lines
drivers/gpu/drm/drm_writeback.c +0 -0
 	INIT_WORK(&job->cleanup_work, cleanup_work);
 	queue_work(system_long_wq, &job->cleanup_work);
 }
Signature · 1 line
1.9.1
Signature · 8 lines
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯
Signature · 6 lines
Regards,
Lowry
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#10 lore raw

Re: [PATCH v1 2/2] drm: Clear the fence pointer when writeback job signaled

In reply to Brian Starkey

Hi Brian,

Quoted 30 lines · Brian Starkey

Hi Lowry,

Thanks for this cleanup.

Quoted 15 lines · Lowry Li (Arm Technology China)

During it signals the completion of a writeback job, after releasing the out_fence, we'd clear the pointer.

Check if fence left over in drm_writeback_cleanup_job(), release it.

---
 drivers/gpu/drm/drm_writeback.c | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)
drivers/gpu/drm/drm_writeback.c +0 -0
index ff138b6..43d9e3b 100644

drivers/gpu/drm/drm_writeback.c void drm_writeback_cleanup_job(struct drm_writeback_job *job) · line 327

Quoted 4 lines
drivers/gpu/drm/drm_writeback.c +1 -0
@@ -324,6 +324,9 @@ void drm_writeback_cleanup_job(struct drm_writeback_job *job)
 	if (job->fb)
 		drm_framebuffer_put(job->fb);
 
+	if (job->out_fence)

I'm thinking it might be a good idea to signal the fence with an error here, if it's not already signaled. Otherwise, if there's someone waiting (which there shouldn't be), they're going to be waiting a very long time :-)

Quoted 3 lines

Thanks,
-Brian

Here it happened at atomic_check failed and test only commit. For both cases, the commit has been dropped and it's only a clean up. So here better not be treated as an error case:)

Since for userspace, it should have been failed or a test only case, so writebace fence should not be signaled.

Best regards,
Lowry

Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/drm_writeback.c +2 -0
+		dma_fence_put(job->out_fence);
+
 	kfree(job);
 }
Signature · 6 lines
Regards,
Lowry
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
maintainer
#8 lore raw

Re: [PATCH v1 2/2] drm: Clear the fence pointer when writeback job signaled

In reply to a message not in the archive
Quoted 75 lines · Lowry Li (Arm Technology China)

Hi Liviu,

Quoted 72 lines · Liviu Dudau

Hi Lowry,

Quoted 15 lines · Lowry Li (Arm Technology China)

During it signals the completion of a writeback job, after releasing the out_fence, we'd clear the pointer.

Check if fence left over in drm_writeback_cleanup_job(), release it.

---
 drivers/gpu/drm/drm_writeback.c | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)
drivers/gpu/drm/drm_writeback.c +0 -0
index ff138b6..43d9e3b 100644

drivers/gpu/drm/drm_writeback.c void drm_writeback_cleanup_job(struct drm_writeback_job *job) · line 331

Quoted 8 lines
drivers/gpu/drm/drm_writeback.c +3 -0
@@ -324,6 +324,9 @@ void drm_writeback_cleanup_job(struct drm_writeback_job *job)
 	if (job->fb)
 		drm_framebuffer_put(job->fb);
 
+	if (job->out_fence)
+		dma_fence_put(job->out_fence);
+
 	kfree(job);
 }

This change looks good.

Quoted 9 lines
drivers/gpu/drm/drm_writeback.c +1 -0
 EXPORT_SYMBOL(drm_writeback_cleanup_job);
@@ -366,25 +369,29 @@ static void cleanup_work(struct work_struct *work)
 {
 	unsigned long flags;
 	struct drm_writeback_job *job;
+	struct dma_fence *out_fence;
 
 	spin_lock_irqsave(&wb_connector->job_lock, flags);
 	job = list_first_entry_or_null(&wb_connector->job_queue,

drivers/gpu/drm/drm_writeback.c static void cleanup_work(struct work_struct *work) · line 380

Quoted 10 lines
drivers/gpu/drm/drm_writeback.c +1 -6
 				       struct drm_writeback_job,
 				       list_entry);
-	if (job) {
+	if (job)
 		list_del(&job->list_entry);
-		if (job->out_fence) {
-			if (status)
-				dma_fence_set_error(job->out_fence, status);
-			dma_fence_signal(job->out_fence);
-			dma_fence_put(job->out_fence);

*Here*

Quoted 7 lines
drivers/gpu/drm/drm_writeback.c +1 -2
-		}
-	}
+
 	spin_unlock_irqrestore(&wb_connector->job_lock, flags);
 
 	if (WARN_ON(!job))
 		return;

drivers/gpu/drm/drm_writeback.c static void cleanup_work(struct work_struct *work) · line 394

Quoted 10 lines
drivers/gpu/drm/drm_writeback.c +9 -0
 
+	out_fence = job->out_fence;
+	if (out_fence) {
+		if (status)
+			dma_fence_set_error(out_fence, status);
+		dma_fence_signal(out_fence);
+		dma_fence_put(out_fence);
+		job->out_fence = NULL;
+	}
+

I don't get the point of this change. Why not just add job->out_fence = NULL where *Here* is?

Quoted 4 lines
Quoted 2 lines

Best regards,
Liviu

Besides setting NULL, also did a refine by moving the fence operation out of the lock block.

OK, now it makes sense. May I suggest you add that to the commit message?

Otherwise, Acked-by: Liviu Dudau <[email protected]>

Best regards,
Liviu

Quoted 23 lines

Best regards,
Lowry

Quoted 16 lines
Quoted 6 lines
drivers/gpu/drm/drm_writeback.c +0 -0
 	INIT_WORK(&job->cleanup_work, cleanup_work);
 	queue_work(system_long_wq, &job->cleanup_work);
 }
Signature · 1 line
1.9.1
Signature · 8 lines
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯
Signature · 2 lines
Regards,
Lowry
Signature · 8 lines
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯
#12 lore raw

Re: [PATCH v1 2/2] drm: Clear the fence pointer when writeback job signaled

In reply to a message not in the archive

Hi Lowry,

Quoted 33 lines · Lowry Li (Arm Technology China)

Hi Brian,

Quoted 30 lines · Brian Starkey

Hi Lowry,

Thanks for this cleanup.

Quoted 15 lines · Lowry Li (Arm Technology China)

During it signals the completion of a writeback job, after releasing the out_fence, we'd clear the pointer.

Check if fence left over in drm_writeback_cleanup_job(), release it.

---
 drivers/gpu/drm/drm_writeback.c | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)
drivers/gpu/drm/drm_writeback.c +0 -0
index ff138b6..43d9e3b 100644

drivers/gpu/drm/drm_writeback.c void drm_writeback_cleanup_job(struct drm_writeback_job *job) · line 327

Quoted 4 lines
drivers/gpu/drm/drm_writeback.c +1 -0
@@ -324,6 +324,9 @@ void drm_writeback_cleanup_job(struct drm_writeback_job *job)
 	if (job->fb)
 		drm_framebuffer_put(job->fb);
 
+	if (job->out_fence)

I'm thinking it might be a good idea to signal the fence with an error here, if it's not already signaled. Otherwise, if there's someone waiting (which there shouldn't be), they're going to be waiting a very long time :-)

Quoted 6 lines
Quoted 3 lines

Thanks,
-Brian

Here it happened at atomic_check failed and test only commit. For both cases, the commit has been dropped and it's only a clean up. So here better not be treated as an error case:)

If anyone else has a reference on the fence, then IMO it absolutely is an error to reach this point without the fence being signaled - because it means that the fence will never be signaled.

I don't think the API gives you a way to check if this is the last reference, so it's safest to just make sure the fence is signalled before dropping the reference.

It just feels wrong to me to have the possibility of a dangling fence which is never going to get signalled; and it's an easy defensive step to make sure it can never happen.

I know it _shouldn't_ happen, but we often put in handling for cases which shouldn't happen, because they frequently do happen :-)

Quoted 3 lines

Since for userspace, it should have been failed or a test only case, so writebace fence should not be signaled.

It's not only userspace that can wait on fences (and in fact this fence will never even reach userspace if the commit fails), the driver may have taken a copy to use for "something".

Cheers,
-Brian

Quoted 11 lines

Best regards,
Lowry

Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/drm_writeback.c +2 -0
+		dma_fence_put(job->out_fence);
+
 	kfree(job);
 }
Signature · 2 lines
Regards,
Lowry
#13 lore raw

Re: [PATCH v1 2/2] drm: Clear the fence pointer when writeback job signaled

Quoted 52 lines · Brian Starkey

Hi Lowry,

Quoted 33 lines · Lowry Li (Arm Technology China)

Hi Brian,

Quoted 30 lines · Brian Starkey

Hi Lowry,

Thanks for this cleanup.

Quoted 15 lines · Lowry Li (Arm Technology China)

During it signals the completion of a writeback job, after releasing the out_fence, we'd clear the pointer.

Check if fence left over in drm_writeback_cleanup_job(), release it.

---
 drivers/gpu/drm/drm_writeback.c | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)
drivers/gpu/drm/drm_writeback.c +0 -0
index ff138b6..43d9e3b 100644

drivers/gpu/drm/drm_writeback.c void drm_writeback_cleanup_job(struct drm_writeback_job *job) · line 327

Quoted 4 lines
drivers/gpu/drm/drm_writeback.c +1 -0
@@ -324,6 +324,9 @@ void drm_writeback_cleanup_job(struct drm_writeback_job *job)
  if (job->fb)
          drm_framebuffer_put(job->fb);
 
+ if (job->out_fence)

I'm thinking it might be a good idea to signal the fence with an error here, if it's not already signaled. Otherwise, if there's someone waiting (which there shouldn't be), they're going to be waiting a very long time :-)

Quoted 6 lines
Quoted 3 lines

Thanks,
-Brian

Here it happened at atomic_check failed and test only commit. For both cases, the commit has been dropped and it's only a clean up. So here better not be treated as an error case:)

If anyone else has a reference on the fence, then IMO it absolutely is an error to reach this point without the fence being signaled - because it means that the fence will never be signaled.

I don't think the API gives you a way to check if this is the last reference, so it's safest to just make sure the fence is signalled before dropping the reference.

Quoted 6 lines

It just feels wrong to me to have the possibility of a dangling fence which is never going to get signalled; and it's an easy defensive step to make sure it can never happen.

I know it _shouldn't_ happen, but we often put in handling for cases which shouldn't happen, because they frequently do happen :-)

We're not as paranoid with the vblank fences either, so not sure why we need to be this paranoid with writeback fences. If your driver grabs anything from the atomic state in ->atomic_check it's buggy anyway.

If you want to fix this properly I think we need to move the call to prepare_signalling() in between atomic_check and atomic_commit. Then I think it makes sense to also force-complete the fence on error ... -Daniel

Quoted 21 lines
Quoted 2 lines

Since for userspace, it should have been failed or a test only case, so writebace fence should not be signaled.

It's not only userspace that can wait on fences (and in fact this fence will never even reach userspace if the commit fails), the driver may have taken a copy to use for "something".

Cheers,
-Brian

Quoted 11 lines

Best regards,
Lowry

Quoted 4 lines

drivers/gpu/drm/drm_writeback.c void drm_writeback_cleanup_job(struct drm_writeback_job *job) · line 331

Quoted 4 lines
drivers/gpu/drm/drm_writeback.c +2 -0
+         dma_fence_put(job->out_fence);
+
  kfree(job);
 }

--
Regards,
Lowry

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#14 lore raw

Re: [PATCH v1 2/2] drm: Clear the fence pointer when writeback job signaled

Quoted 61 lines · Daniel Vetter
Quoted 52 lines · Brian Starkey

Hi Lowry,

Quoted 33 lines · Lowry Li (Arm Technology China)

Hi Brian,

Quoted 30 lines · Brian Starkey

Hi Lowry,

Thanks for this cleanup.

Quoted 15 lines · Lowry Li (Arm Technology China)

During it signals the completion of a writeback job, after releasing the out_fence, we'd clear the pointer.

Check if fence left over in drm_writeback_cleanup_job(), release it.

---
 drivers/gpu/drm/drm_writeback.c | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)
drivers/gpu/drm/drm_writeback.c +0 -0
index ff138b6..43d9e3b 100644

drivers/gpu/drm/drm_writeback.c void drm_writeback_cleanup_job(struct drm_writeback_job *job) · line 327

Quoted 4 lines
drivers/gpu/drm/drm_writeback.c +1 -0
@@ -324,6 +324,9 @@ void drm_writeback_cleanup_job(struct drm_writeback_job *job)
  if (job->fb)
          drm_framebuffer_put(job->fb);
 
+ if (job->out_fence)

I'm thinking it might be a good idea to signal the fence with an error here, if it's not already signaled. Otherwise, if there's someone waiting (which there shouldn't be), they're going to be waiting a very long time :-)

Quoted 6 lines
Quoted 3 lines

Thanks,
-Brian

Here it happened at atomic_check failed and test only commit. For both cases, the commit has been dropped and it's only a clean up. So here better not be treated as an error case:)

If anyone else has a reference on the fence, then IMO it absolutely is an error to reach this point without the fence being signaled - because it means that the fence will never be signaled.

I don't think the API gives you a way to check if this is the last reference, so it's safest to just make sure the fence is signalled before dropping the reference.

Quoted 6 lines

It just feels wrong to me to have the possibility of a dangling fence which is never going to get signalled; and it's an easy defensive step to make sure it can never happen.

I know it _shouldn't_ happen, but we often put in handling for cases which shouldn't happen, because they frequently do happen :-)

Quoted 15 lines

We're not as paranoid with the vblank fences either, so not sure why we need to be this paranoid with writeback fences. If your driver grabs anything from the atomic state in ->atomic_check it's buggy anyway.

If you want to fix this properly I think we need to move the call to prepare_signalling() in between atomic_check and atomic_commit. Then I think it makes sense to also force-complete the fence on error ...

Quoted 6 lines
Quoted 2 lines

Since for userspace, it should have been failed or a test only case, so writebace fence should not be signaled.

It's not only userspace that can wait on fences (and in fact this fence will never even reach userspace if the commit fails), the driver may have taken a copy to use for "something".

I forgot to add: you can check this by looking at the fence reference count. A WARN_ON if that's more than 1 on cleanup (but also for the out fences) could be a nice addition.
-Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#15 lore raw

Re: [PATCH v1 2/2] drm: Clear the fence pointer when writeback job signaled

Hi Daniel,

Quoted 62 lines · Daniel Vetter
Quoted 61 lines · Daniel Vetter
Quoted 58 lines · Brian Starkey

Hi Lowry,

Quoted 33 lines · Lowry Li (Arm Technology China)

Hi Brian,

Quoted 30 lines · Brian Starkey

Hi Lowry,

Thanks for this cleanup.

Quoted 15 lines · Lowry Li (Arm Technology China)

During it signals the completion of a writeback job, after releasing the out_fence, we'd clear the pointer.

Check if fence left over in drm_writeback_cleanup_job(), release it.

---
 drivers/gpu/drm/drm_writeback.c | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)
drivers/gpu/drm/drm_writeback.c +0 -0
index ff138b6..43d9e3b 100644

drivers/gpu/drm/drm_writeback.c void drm_writeback_cleanup_job(struct drm_writeback_job *job) · line 327

Quoted 4 lines
drivers/gpu/drm/drm_writeback.c +1 -0
@@ -324,6 +324,9 @@ void drm_writeback_cleanup_job(struct drm_writeback_job *job)
  if (job->fb)
          drm_framebuffer_put(job->fb);
 
+ if (job->out_fence)

I'm thinking it might be a good idea to signal the fence with an error here, if it's not already signaled. Otherwise, if there's someone waiting (which there shouldn't be), they're going to be waiting a very long time :-)

Quoted 6 lines
Quoted 3 lines

Thanks,
-Brian

Here it happened at atomic_check failed and test only commit. For both cases, the commit has been dropped and it's only a clean up. So here better not be treated as an error case:)

If anyone else has a reference on the fence, then IMO it absolutely is an error to reach this point without the fence being signaled - because it means that the fence will never be signaled.

I don't think the API gives you a way to check if this is the last reference, so it's safest to just make sure the fence is signalled before dropping the reference.

It just feels wrong to me to have the possibility of a dangling fence which is never going to get signalled; and it's an easy defensive step to make sure it can never happen.

I know it _shouldn't_ happen, but we often put in handling for cases which shouldn't happen, because they frequently do happen :-)

Quoted 8 lines
Quoted 8 lines

We're not as paranoid with the vblank fences either, so not sure why we need to be this paranoid with writeback fences. If your driver grabs anything from the atomic state in ->atomic_check it's buggy anyway.

If you want to fix this properly I think we need to move the call to prepare_signalling() in between atomic_check and atomic_commit. Then I think it makes sense to also force-complete the fence on error ...

Well, fair enough. I'm struggling with "that's too paranoid" vs "fix it properly" though? Is it a "problem" worth fixing or not?

It seems natural to me to do the fence cleanup in the cleanup function for the object which owns the fence.

Quoted 11 lines
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines

Since for userspace, it should have been failed or a test only case, so writebace fence should not be signaled.

It's not only userspace that can wait on fences (and in fact this fence will never even reach userspace if the commit fails), the driver may have taken a copy to use for "something".

I forgot to add: you can check this by looking at the fence reference count. A WARN_ON if that's more than 1 on cleanup (but also for the out fences) could be a nice addition.

Do we really want to be looking at the fence internals directly like that?

Cheers,
-Brian

Quoted 5 lines

-Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#17 lore raw

Re: [PATCH v1 2/2] drm: Clear the fence pointer when writeback job signaled

In reply to Brian Starkey
Quoted 59 lines · Brian Starkey

Hi Lowry,

Quoted 33 lines · Lowry Li (Arm Technology China)

Hi Brian,

Quoted 30 lines · Brian Starkey

Hi Lowry,

Thanks for this cleanup.

Quoted 15 lines · Lowry Li (Arm Technology China)

During it signals the completion of a writeback job, after releasing the out_fence, we'd clear the pointer.

Check if fence left over in drm_writeback_cleanup_job(), release it.

---
 drivers/gpu/drm/drm_writeback.c | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)
drivers/gpu/drm/drm_writeback.c +0 -0
index ff138b6..43d9e3b 100644

drivers/gpu/drm/drm_writeback.c void drm_writeback_cleanup_job(struct drm_writeback_job *job) · line 327

Quoted 4 lines
drivers/gpu/drm/drm_writeback.c +1 -0
@@ -324,6 +324,9 @@ void drm_writeback_cleanup_job(struct drm_writeback_job *job)
 	if (job->fb)
 		drm_framebuffer_put(job->fb);
 
+	if (job->out_fence)

I'm thinking it might be a good idea to signal the fence with an error here, if it's not already signaled. Otherwise, if there's someone waiting (which there shouldn't be), they're going to be waiting a very long time :-)

Quoted 6 lines
Quoted 3 lines

Thanks,
-Brian

Here it happened at atomic_check failed and test only commit. For both cases, the commit has been dropped and it's only a clean up. So here better not be treated as an error case:)

If anyone else has a reference on the fence, then IMO it absolutely is an error to reach this point without the fence being signaled - because it means that the fence will never be signaled.

I don't think the API gives you a way to check if this is the last reference, so it's safest to just make sure the fence is signalled before dropping the reference.

It just feels wrong to me to have the possibility of a dangling fence which is never going to get signalled; and it's an easy defensive step to make sure it can never happen.

I know it _shouldn't_ happen, but we often put in handling for cases which shouldn't happen, because they frequently do happen :-)

Quoted 1 line
Quoted 7 lines
Quoted 2 lines

Since for userspace, it should have been failed or a test only case, so writebace fence should not be signaled.

It's not only userspace that can wait on fences (and in fact this fence will never even reach userspace if the commit fails), the driver may have taken a copy to use for "something".

Maybe we can add a wb_fence canceling into complete_signaling() for the atomic_check failed cleanup like the crtc->out_fence.

Then if in this place we still can got a fence here, that must be a error we signal and WARN it

Thanks
James

Quoted 14 lines

Cheers,
-Brian

Quoted 11 lines

Best regards,
Lowry

Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/drm_writeback.c +2 -0
+		dma_fence_put(job->out_fence);
+
 	kfree(job);
 }
Signature · 2 lines
Regards
Lowry
#16 lore raw

Re: [PATCH v1 2/2] drm: Clear the fence pointer when writeback job signaled

In reply to Brian Starkey
Quoted 70 lines · Brian Starkey

Hi Daniel,

Quoted 67 lines · Daniel Vetter
Quoted 66 lines · Daniel Vetter
Quoted 52 lines · Brian Starkey

Hi Lowry,

Quoted 33 lines · Lowry Li (Arm Technology China)

Hi Brian,

Quoted 30 lines · Brian Starkey

Hi Lowry,

Thanks for this cleanup.

Quoted 15 lines · Lowry Li (Arm Technology China)

During it signals the completion of a writeback job, after releasing the out_fence, we'd clear the pointer.

Check if fence left over in drm_writeback_cleanup_job(), release it.

---
 drivers/gpu/drm/drm_writeback.c | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)
drivers/gpu/drm/drm_writeback.c +0 -0
index ff138b6..43d9e3b 100644

drivers/gpu/drm/drm_writeback.c void drm_writeback_cleanup_job(struct drm_writeback_job *job) · line 327

Quoted 4 lines
drivers/gpu/drm/drm_writeback.c +1 -0
@@ -324,6 +324,9 @@ void drm_writeback_cleanup_job(struct drm_writeback_job *job)
  if (job->fb)
          drm_framebuffer_put(job->fb);
 
+ if (job->out_fence)

I'm thinking it might be a good idea to signal the fence with an error here, if it's not already signaled. Otherwise, if there's someone waiting (which there shouldn't be), they're going to be waiting a very long time :-)

Quoted 6 lines
Quoted 3 lines

Thanks,
-Brian

Here it happened at atomic_check failed and test only commit. For both cases, the commit has been dropped and it's only a clean up. So here better not be treated as an error case:)

If anyone else has a reference on the fence, then IMO it absolutely is an error to reach this point without the fence being signaled - because it means that the fence will never be signaled.

I don't think the API gives you a way to check if this is the last reference, so it's safest to just make sure the fence is signalled before dropping the reference.

Quoted 6 lines

It just feels wrong to me to have the possibility of a dangling fence which is never going to get signalled; and it's an easy defensive step to make sure it can never happen.

I know it _shouldn't_ happen, but we often put in handling for cases which shouldn't happen, because they frequently do happen :-)

We're not as paranoid with the vblank fences either, so not sure why we need to be this paranoid with writeback fences. If your driver grabs anything from the atomic state in ->atomic_check it's buggy anyway.

Quoted 6 lines
Quoted 3 lines
Quoted 3 lines

If you want to fix this properly I think we need to move the call to prepare_signalling() in between atomic_check and atomic_commit. Then I think it makes sense to also force-complete the fence on error ...

Well, fair enough. I'm struggling with "that's too paranoid" vs "fix it properly" though? Is it a "problem" worth fixing or not?

Up to you to decide that.

Quoted 11 lines

It seems natural to me to do the fence cleanup in the cleanup function for the object which owns the fence.

Quoted 8 lines
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines

Since for userspace, it should have been failed or a test only case, so writebace fence should not be signaled.

It's not only userspace that can wait on fences (and in fact this fence will never even reach userspace if the commit fails), the driver may have taken a copy to use for "something".

Quoted 6 lines
Quoted 3 lines

I forgot to add: you can check this by looking at the fence reference count. A WARN_ON if that's more than 1 on cleanup (but also for the out fences) could be a nice addition.

Do we really want to be looking at the fence internals directly like that?

Wrap it up in a helper like dma_fence_release_private or whatever, which combines the check and (hopefully final) _put(). Might need a better name. -Daniel

Quoted 9 lines

Cheers,
-Brian

Quoted 5 lines

-Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
Reviewed-by on v1 2/2
#18 lore raw

Re: [PATCH v1 2/2] drm: Clear the fence pointer when writeback job signaled

In reply to Lowry Li (Arm Technology China)

Hi Lowry,

Based on Daniel's input, this patch looks fine:

I think there's some opportunity for improvement around prepare_signaling/complete_signaling, but that can be treated as separate from fixing this bug.

Thanks,
-Brian

Quoted 65 lines · Lowry Li (Arm Technology China)

During it signals the completion of a writeback job, after releasing the out_fence, we'd clear the pointer.

Check if fence left over in drm_writeback_cleanup_job(), release it.

---
 drivers/gpu/drm/drm_writeback.c | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)
drivers/gpu/drm/drm_writeback.c +15 -8
index ff138b6..43d9e3b 100644
@@ -324,6 +324,9 @@ void drm_writeback_cleanup_job(struct drm_writeback_job *job)
 	if (job->fb)
 		drm_framebuffer_put(job->fb);
 
+	if (job->out_fence)
+		dma_fence_put(job->out_fence);
+
 	kfree(job);
 }
 EXPORT_SYMBOL(drm_writeback_cleanup_job);
@@ -366,25 +369,29 @@ static void cleanup_work(struct work_struct *work)
 {
 	unsigned long flags;
 	struct drm_writeback_job *job;
+	struct dma_fence *out_fence;
 
 	spin_lock_irqsave(&wb_connector->job_lock, flags);
 	job = list_first_entry_or_null(&wb_connector->job_queue,
 				       struct drm_writeback_job,
 				       list_entry);
-	if (job) {
+	if (job)
 		list_del(&job->list_entry);
-		if (job->out_fence) {
-			if (status)
-				dma_fence_set_error(job->out_fence, status);
-			dma_fence_signal(job->out_fence);
-			dma_fence_put(job->out_fence);
-		}
-	}
+
 	spin_unlock_irqrestore(&wb_connector->job_lock, flags);
 
 	if (WARN_ON(!job))
 		return;
 
+	out_fence = job->out_fence;
+	if (out_fence) {
+		if (status)
+			dma_fence_set_error(out_fence, status);
+		dma_fence_signal(out_fence);
+		dma_fence_put(out_fence);
+		job->out_fence = NULL;
+	}
+
 	INIT_WORK(&job->cleanup_work, cleanup_work);
 	queue_work(system_long_wq, &job->cleanup_work);
 }
Signature · 1 line
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw

Re: [v1,1/2] drm: Free the writeback_job when it with an empty fb

In reply to Lowry Li (Arm Technology China)
Quoted 10 lines · Lowry Li (Arm Technology China)

From: "Lowry Li (Arm Technology China)" <[email protected]>

Adds the check if the writeback_job with an empty fb, then it should be freed in atomic_check phase.

With this change, the driver users will not check empty fb case any more. So refined accordingly.

Looks good to me.

And will push it to drm-misc-fixes

James

Quoted 114 lines
---
 drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c |  3 +--
 drivers/gpu/drm/arm/malidp_mw.c                          |  4 ++--
 drivers/gpu/drm/drm_atomic.c                             | 13 +++++++++----
 drivers/gpu/drm/rcar-du/rcar_du_writeback.c              |  4 ++--
 drivers/gpu/drm/vc4/vc4_txp.c                            |  5 ++---
 5 files changed, 16 insertions(+), 13 deletions(-)
drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c +1 -2
index 617e1f7..d6103dd 100644
@@ -43,9 +43,8 @@
 	struct komeda_data_flow_cfg dflow;
 	int err;
 
-	if (!writeback_job || !writeback_job->fb) {
+	if (!writeback_job)
 		return 0;
-	}
 
 	if (!crtc_st->active) {
 		DRM_DEBUG_ATOMIC("Cannot write the composition result out on a inactive CRTC.\n");
drivers/gpu/drm/arm/malidp_mw.c +2 -2
index 2e81252..a59227b 100644
@@ -130,7 +130,7 @@ static void malidp_mw_connector_destroy(struct drm_connector *connector)
 	struct drm_framebuffer *fb;
 	int i, n_planes;
 
-	if (!conn_state->writeback_job || !conn_state->writeback_job->fb)
+	if (!conn_state->writeback_job)
 		return 0;
 
 	fb = conn_state->writeback_job->fb;
@@ -247,7 +247,7 @@ void malidp_mw_atomic_commit(struct drm_device *drm,
 
 	mw_state = to_mw_state(conn_state);
 
-	if (conn_state->writeback_job && conn_state->writeback_job->fb) {
+	if (conn_state->writeback_job) {
 		struct drm_framebuffer *fb = conn_state->writeback_job->fb;
 
 		DRM_DEV_DEBUG_DRIVER(drm->dev,
drivers/gpu/drm/drm_atomic.c +9 -4
index 419381a..14aeaf7 100644
@@ -430,10 +430,15 @@ static int drm_atomic_connector_check(struct drm_connector *connector,
 		return -EINVAL;
 	}
 
-	if (writeback_job->out_fence && !writeback_job->fb) {
-		DRM_DEBUG_ATOMIC("[CONNECTOR:%d:%s] requesting out-fence without framebuffer\n",
-				 connector->base.id, connector->name);
-		return -EINVAL;
+	if (!writeback_job->fb) {
+		if (writeback_job->out_fence) {
+			DRM_DEBUG_ATOMIC("[CONNECTOR:%d:%s] requesting out-fence without framebuffer\n",
+					 connector->base.id, connector->name);
+			return -EINVAL;
+		}
+
+		drm_writeback_cleanup_job(writeback_job);
+		state->writeback_job = NULL;
 	}
 
 	return 0;
drivers/gpu/drm/rcar-du/rcar_du_writeback.c +2 -2
index ae07290..04efa78d 100644
@@ -147,7 +147,7 @@ static int rcar_du_wb_enc_atomic_check(struct drm_encoder *encoder,
 	struct drm_device *dev = encoder->dev;
 	struct drm_framebuffer *fb;
 
-	if (!conn_state->writeback_job || !conn_state->writeback_job->fb)
+	if (!conn_state->writeback_job)
 		return 0;
 
 	fb = conn_state->writeback_job->fb;
@@ -221,7 +221,7 @@ void rcar_du_writeback_setup(struct rcar_du_crtc *rcrtc,
 	unsigned int i;
 
 	state = rcrtc->writeback.base.state;
-	if (!state || !state->writeback_job || !state->writeback_job->fb)
+	if (!state || !state->writeback_job)
 		return;
 
 	fb = state->writeback_job->fb;
drivers/gpu/drm/vc4/vc4_txp.c +2 -3
index 96f91c1..e92fa12 100644
@@ -229,7 +229,7 @@ static int vc4_txp_connector_atomic_check(struct drm_connector *conn,
 	int i;
 
 	conn_state = drm_atomic_get_new_connector_state(state, conn);
-	if (!conn_state->writeback_job || !conn_state->writeback_job->fb)
+	if (!conn_state->writeback_job)
 		return 0;
 
 	crtc_state = drm_atomic_get_new_crtc_state(state, conn_state->crtc);
@@ -269,8 +269,7 @@ static void vc4_txp_connector_atomic_commit(struct drm_connector *conn,
 	u32 ctrl;
 	int i;
 
-	if (WARN_ON(!conn_state->writeback_job ||
-		    !conn_state->writeback_job->fb))
+	if (WARN_ON(!conn_state->writeback_job))
 		return;
 
 	mode = &conn_state->crtc->state->adjusted_mode;
#19 lore raw

Re: [v1,2/2] drm: Clear the fence pointer when writeback job signaled

In reply to Lowry Li (Arm Technology China)
Quoted 7 lines · Lowry Li (Arm Technology China)

During it signals the completion of a writeback job, after releasing the out_fence, we'd clear the pointer.

Check if fence left over in drm_writeback_cleanup_job(), release it.

Looks good to me.

will push it to drm-misc-fixes

James

Quoted 46 lines
---
 drivers/gpu/drm/drm_writeback.c | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)
drivers/gpu/drm/drm_writeback.c +8 -8
index ff138b6..43d9e3b 100644
@@ -324,6 +324,9 @@ void drm_writeback_cleanup_job(struct drm_writeback_job *job)
 	if (job->fb)
 		drm_framebuffer_put(job->fb);
 
+	if (job->out_fence)
+		dma_fence_put(job->out_fence);
+
 	kfree(job);
 }
 EXPORT_SYMBOL(drm_writeback_cleanup_job);
@@ -366,25 +369,29 @@ static void cleanup_work(struct work_struct *work)
 {
 	unsigned long flags;
 	struct drm_writeback_job *job;
+	struct dma_fence *out_fence;
 
 	spin_lock_irqsave(&wb_connector->job_lock, flags);
 	job = list_first_entry_or_null(&wb_connector->job_queue,
 				       struct drm_writeback_job,
 				       list_entry);
-	if (job) {
+	if (job)
 		list_del(&job->list_entry);
-		if (job->out_fence) {
-			if (status)
-				dma_fence_set_error(job->out_fence, status);
-			dma_fence_signal(job->out_fence);
-			dma_fence_put(job->out_fence);
-		}
-	}
+
 	spin_unlock_irqrestore(&wb_connector->job_lock, flags);
 
 	if (WARN_ON(!job))
 		return;
 
+	out_fence = job->out_fence;
+	if (out_fence) {

drivers/gpu/drm/drm_writeback.c static void cleanup_work(struct work_struct *work) · line 397

Quoted 10 lines
drivers/gpu/drm/drm_writeback.c +7 -0
+		if (status)
+			dma_fence_set_error(out_fence, status);
+		dma_fence_signal(out_fence);
+		dma_fence_put(out_fence);
+		job->out_fence = NULL;
+	}
+
 	INIT_WORK(&job->cleanup_work, cleanup_work);
 	queue_work(system_long_wq, &job->cleanup_work);
 }

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#21 lore raw

PATCH 1/1 dt-bindings: timer: renesas: tmu: Document r8a774b1 bindings

Document RZ/G2N (R8A774B1) SoC in the Renesas TMU bindings.

---
 Documentation/devicetree/bindings/timer/renesas,tmu.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/timer/renesas,tmu.txt +1 -0
index 9dff7e5..29159f4 100644
@@ -11,6 +11,7 @@ Required Properties:
   - compatible: must contain one or more of the following:
     - "renesas,tmu-r8a7740" for the r8a7740 TMU
     - "renesas,tmu-r8a774a1" for the r8a774A1 TMU
+    - "renesas,tmu-r8a774b1" for the r8a774B1 TMU
     - "renesas,tmu-r8a774c0" for the r8a774C0 TMU
     - "renesas,tmu-r8a7778" for the r8a7778 TMU
     - "renesas,tmu-r8a7779" for the r8a7779 TMU
Signature · 1 line
2.7.4
Reviewed-by on v1 1/1
#22 lore raw

Re: [PATCH] dt-bindings: timer: renesas: tmu: Document r8a774b1 bindings

Quoted 3 lines · Biju Das

Document RZ/G2N (R8A774B1) SoC in the Renesas TMU bindings.

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
#24 lore raw

Re: [PATCH] dt-bindings: timer: renesas: tmu: Document r8a774b1 bindings

In reply to Biju Das
Quoted 13 lines · Biju Das

Document RZ/G2N (R8A774B1) SoC in the Renesas TMU bindings.

---
 Documentation/devicetree/bindings/timer/renesas,tmu.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/timer/renesas,tmu.txt +0 -0
index 9dff7e5..29159f4 100644

Documentation/devicetree/bindings/timer/renesas,tmu.txt Required Properties: · line 17

Quoted 7 lines
Documentation/devicetree/bindings/timer/renesas,tmu.txt +1 -0
@@ -11,6 +11,7 @@ Required Properties:
   - compatible: must contain one or more of the following:
     - "renesas,tmu-r8a7740" for the r8a7740 TMU
     - "renesas,tmu-r8a774a1" for the r8a774A1 TMU
+    - "renesas,tmu-r8a774b1" for the r8a774B1 TMU
     - "renesas,tmu-r8a774c0" for the r8a774C0 TMU
     - "renesas,tmu-r8a7778" for the r8a7778 TMU
     - "renesas,tmu-r8a7779" for the r8a7779 TMU

The patch does not apply on tip/timers

Signature · 5 lines
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
#25 lore raw

RE: [PATCH] dt-bindings: timer: renesas: tmu: Document r8a774b1 bindings

Hi Daniel,

Thanks for the feedback.

Quoted 11 lines

Subject: Re: [PATCH] dt-bindings: timer: renesas: tmu: Document r8a774b1 bindings

Quoted 7 lines · Biju Das

Document RZ/G2N (R8A774B1) SoC in the Renesas TMU bindings.

---
 Documentation/devicetree/bindings/timer/renesas,tmu.txt | 1 +
 1 file changed, 1 insertion(+)
Quoted 16 lines
Quoted 7 lines
Documentation/devicetree/bindings/timer/renesas,tmu.txt +0 -0
index 9dff7e5..29159f4 100644

Documentation/devicetree/bindings/timer/renesas,tmu.txt Required Properties: · line 17

Quoted 7 lines
Documentation/devicetree/bindings/timer/renesas,tmu.txt +1 -0
@@ -11,6 +11,7 @@ Required Properties:
   - compatible: must contain one or more of the following:
     - "renesas,tmu-r8a7740" for the r8a7740 TMU
     - "renesas,tmu-r8a774a1" for the r8a774A1 TMU
+    - "renesas,tmu-r8a774b1" for the r8a774B1 TMU
     - "renesas,tmu-r8a774c0" for the r8a774C0 TMU
     - "renesas,tmu-r8a7778" for the r8a7778 TMU
     - "renesas,tmu-r8a7779" for the r8a7779 TMU

The patch does not apply on tip/timers

OK. I will rebase on top of tip/timers and will send V2.

Regards,
Biju

#26 lore raw

Re: [PATCH] dt-bindings: timer: renesas: tmu: Document r8a774b1 bindings

Quoted 32 lines · Biju Das

Hi Daniel,

Thanks for the feedback.

Quoted 11 lines

Subject: Re: [PATCH] dt-bindings: timer: renesas: tmu: Document r8a774b1 bindings

Quoted 7 lines · Biju Das

Document RZ/G2N (R8A774B1) SoC in the Renesas TMU bindings.

---
 Documentation/devicetree/bindings/timer/renesas,tmu.txt | 1 +
 1 file changed, 1 insertion(+)
Quoted 16 lines
Quoted 7 lines
Documentation/devicetree/bindings/timer/renesas,tmu.txt +0 -0
index 9dff7e5..29159f4 100644

Documentation/devicetree/bindings/timer/renesas,tmu.txt Required Properties: · line 17

Quoted 7 lines
Documentation/devicetree/bindings/timer/renesas,tmu.txt +1 -0
@@ -11,6 +11,7 @@ Required Properties:
   - compatible: must contain one or more of the following:
     - "renesas,tmu-r8a7740" for the r8a7740 TMU
     - "renesas,tmu-r8a774a1" for the r8a774A1 TMU
+    - "renesas,tmu-r8a774b1" for the r8a774B1 TMU
     - "renesas,tmu-r8a774c0" for the r8a774C0 TMU
     - "renesas,tmu-r8a7778" for the r8a7778 TMU
     - "renesas,tmu-r8a7779" for the r8a7779 TMU

The patch does not apply on tip/timers

Quoted 1 line

OK. I will rebase on top of tip/timers and will send V2.

Great, thanks

Signature · 5 lines
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
#27 lore raw

Re: [PATCH] dt-bindings: timer: renesas: tmu: Document r8a774b1 bindings

In reply to Daniel Lezcano

Hi Daniel,

Quoted 8 lines · Daniel Lezcano
Quoted 7 lines · Biju Das

Document RZ/G2N (R8A774B1) SoC in the Renesas TMU bindings.

---
 Documentation/devicetree/bindings/timer/renesas,tmu.txt | 1 +
 1 file changed, 1 insertion(+)
Quoted 15 lines

Documentation/devicetree/bindings/timer/renesas,tmu.txt Required Properties: · line 17

Quoted 13 lines
Documentation/devicetree/bindings/timer/renesas,tmu.txt +1 -0
index 9dff7e5..29159f4 100644
@@ -11,6 +11,7 @@ Required Properties:
   - compatible: must contain one or more of the following:
     - "renesas,tmu-r8a7740" for the r8a7740 TMU
     - "renesas,tmu-r8a774a1" for the r8a774A1 TMU
+    - "renesas,tmu-r8a774b1" for the r8a774B1 TMU
     - "renesas,tmu-r8a774c0" for the r8a774C0 TMU
     - "renesas,tmu-r8a7778" for the r8a7778 TMU
     - "renesas,tmu-r8a7779" for the r8a7779 TMU

The patch does not apply on tip/timers

That's expected, as I queued the previous change in renesas-dt-bindings-for-v5.5, cfr.
https://lore.kernel.org/linux-renesas-soc/[email protected]/

Do you want me to know this in renesas-dt-bindings-for-v5.5?

Thanks!

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
#28 lore raw

RE: [PATCH] dt-bindings: timer: renesas: tmu: Document r8a774b1 bindings

Hi Geert, Daniel,

Any update on the below binding patch?

Regards,
Biju

Quoted 50 lines

-----Original Message-----
From: Geert Uytterhoeven <[email protected]>
Sent: Thursday, October 3, 2019 7:51 AM
To: Daniel Lezcano <[email protected]>
Cc: Biju Das <[email protected]>; Rob Herring <[email protected]>; Mark Rutland <[email protected]>; Thomas Gleixner <[email protected]>; open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS <[email protected]>; Geert Uytterhoeven <[email protected]>; Simon Horman <[email protected]>; Chris Paterson <[email protected]>; Fabrizio Castro <[email protected]>; Linux-Renesas <linux-renesas- [email protected]>
Subject: Re: [PATCH] dt-bindings: timer: renesas: tmu: Document r8a774b1 bindings

Hi Daniel,

Quoted 8 lines · Daniel Lezcano
Quoted 7 lines · Biju Das

Document RZ/G2N (R8A774B1) SoC in the Renesas TMU bindings.

---
 Documentation/devicetree/bindings/timer/renesas,tmu.txt | 1 +
 1 file changed, 1 insertion(+)
Quoted 16 lines
Quoted 7 lines
Documentation/devicetree/bindings/timer/renesas,tmu.txt +0 -0
index 9dff7e5..29159f4 100644

Documentation/devicetree/bindings/timer/renesas,tmu.txt Required Properties: · line 17

Quoted 7 lines
Documentation/devicetree/bindings/timer/renesas,tmu.txt +1 -0
@@ -11,6 +11,7 @@ Required Properties:
   - compatible: must contain one or more of the following:
     - "renesas,tmu-r8a7740" for the r8a7740 TMU
     - "renesas,tmu-r8a774a1" for the r8a774A1 TMU
+    - "renesas,tmu-r8a774b1" for the r8a774B1 TMU
     - "renesas,tmu-r8a774c0" for the r8a774C0 TMU
     - "renesas,tmu-r8a7778" for the r8a7778 TMU
     - "renesas,tmu-r8a7779" for the r8a7779 TMU

The patch does not apply on tip/timers

That's expected, as I queued the previous change in renesas-dt-bindings-for- v5.5, cfr.
https://lore.kernel.org/linux-renesas-soc/244ca7ac-54d1-d07d-762f-
[email protected]/

Do you want me to know this in renesas-dt-bindings-for-v5.5?

#29 lore raw

Re: [PATCH] dt-bindings: timer: renesas: tmu: Document r8a774b1 bindings

Hi Biju,

Quoted 1 line · Biju Das

Any update on the below binding patch?

If it won't appear in v5.5-rc1, my plan is to queue it in renesas-devel for v5.6.

Quoted 51 lines
Quoted 50 lines

-----Original Message-----
From: Geert Uytterhoeven <[email protected]>
Sent: Thursday, October 3, 2019 7:51 AM
To: Daniel Lezcano <[email protected]>
Cc: Biju Das <[email protected]>; Rob Herring <[email protected]>; Mark Rutland <[email protected]>; Thomas Gleixner <[email protected]>; open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS <[email protected]>; Geert Uytterhoeven <[email protected]>; Simon Horman <[email protected]>; Chris Paterson <[email protected]>; Fabrizio Castro <[email protected]>; Linux-Renesas <linux-renesas- [email protected]>
Subject: Re: [PATCH] dt-bindings: timer: renesas: tmu: Document r8a774b1 bindings

Hi Daniel,

Quoted 8 lines · Daniel Lezcano
Quoted 7 lines · Biju Das

Document RZ/G2N (R8A774B1) SoC in the Renesas TMU bindings.

---
 Documentation/devicetree/bindings/timer/renesas,tmu.txt | 1 +
 1 file changed, 1 insertion(+)
Quoted 16 lines
Quoted 7 lines
Documentation/devicetree/bindings/timer/renesas,tmu.txt +0 -0
index 9dff7e5..29159f4 100644

Documentation/devicetree/bindings/timer/renesas,tmu.txt Required Properties: · line 17

Quoted 7 lines
Documentation/devicetree/bindings/timer/renesas,tmu.txt +1 -0
@@ -11,6 +11,7 @@ Required Properties:
   - compatible: must contain one or more of the following:
     - "renesas,tmu-r8a7740" for the r8a7740 TMU
     - "renesas,tmu-r8a774a1" for the r8a774A1 TMU
+    - "renesas,tmu-r8a774b1" for the r8a774B1 TMU
     - "renesas,tmu-r8a774c0" for the r8a774C0 TMU
     - "renesas,tmu-r8a7778" for the r8a7778 TMU
     - "renesas,tmu-r8a7779" for the r8a7779 TMU

The patch does not apply on tip/timers

That's expected, as I queued the previous change in renesas-dt-bindings-for- v5.5, cfr.
https://lore.kernel.org/linux-renesas-soc/244ca7ac-54d1-d07d-762f-
[email protected]/

Do you want me to know this in renesas-dt-bindings-for-v5.5?

Signature · 10 lines
Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
#30 lore raw

Re: [PATCH] dt-bindings: timer: renesas: tmu: Document r8a774b1 bindings

Quoted 5 lines · Geert Uytterhoeven
Quoted 1 line · Biju Das

Any update on the below binding patch?

If it won't appear in v5.5-rc1, my plan is to queue it in renesas-devel for v5.6.

Queued.

Quoted 44 lines
Quoted 44 lines
Quoted 44 lines

-----Original Message-----
From: Geert Uytterhoeven <[email protected]>
Sent: Thursday, October 3, 2019 7:51 AM
To: Daniel Lezcano <[email protected]>
Cc: Biju Das <[email protected]>; Rob Herring <[email protected]>; Mark Rutland <[email protected]>; Thomas Gleixner <[email protected]>; open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS <[email protected]>; Geert Uytterhoeven <[email protected]>; Simon Horman <[email protected]>; Chris Paterson <[email protected]>; Fabrizio Castro <[email protected]>; Linux-Renesas <linux-renesas- [email protected]>
Subject: Re: [PATCH] dt-bindings: timer: renesas: tmu: Document r8a774b1 bindings

Hi Daniel,

Quoted 24 lines · Daniel Lezcano
Quoted 14 lines · Biju Das

Document RZ/G2N (R8A774B1) SoC in the Renesas TMU bindings.

---
 Documentation/devicetree/bindings/timer/renesas,tmu.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/timer/renesas,tmu.txt +0 -0
index 9dff7e5..29159f4 100644

Documentation/devicetree/bindings/timer/renesas,tmu.txt Required Properties: · line 17

Quoted 7 lines
Documentation/devicetree/bindings/timer/renesas,tmu.txt +1 -0
@@ -11,6 +11,7 @@ Required Properties:
   - compatible: must contain one or more of the following:
     - "renesas,tmu-r8a7740" for the r8a7740 TMU
     - "renesas,tmu-r8a774a1" for the r8a774A1 TMU
+    - "renesas,tmu-r8a774b1" for the r8a774B1 TMU
     - "renesas,tmu-r8a774c0" for the r8a774C0 TMU
     - "renesas,tmu-r8a7778" for the r8a7778 TMU
     - "renesas,tmu-r8a7779" for the r8a7779 TMU

The patch does not apply on tip/timers

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

That's expected, as I queued the previous change in renesas-dt-bindings-for- v5.5, cfr.
https://lore.kernel.org/linux-renesas-soc/244ca7ac-54d1-d07d-762f-
[email protected]/

Do you want me to know this in renesas-dt-bindings-for-v5.5?

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#20 lore raw

Patchwork summary for: linux-renesas-soc

In reply to Lowry Li (Arm Technology China)
The following patches were marked "accepted", because they were applied to geert/renesas-devel (refs/heads/next):

Hello:

The following patches were marked "accepted", because they were applied to geert/renesas-devel (refs/heads/next):

Patch: dt-bindings: timer: renesas: tmu: Document r8a774b1 bindings
Submitter: Biju Das <[email protected]>
Patchwork: https://patchwork.kernel.org/project/linux-renesas-soc/list/?series=177599

Series: Free the writeback_job when it with an empty fb
Submitter: Lowry Li (Arm Technology China) <[email protected]>
Patchwork: https://patchwork.kernel.org/project/linux-renesas-soc/list/?series=153341
Patches: [v1,1/2] drm: Free the writeback_job when it with an empty fb
[v1,2/2] drm: Clear the fence pointer when writeback job signaled

Total patches: 3

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.wiki.kernel.org/userdoc/pwbot