Re: [Freedreno] [v6, 02/21] drm/bridge: adv7511: Register and attach our DSI device at probe

2021-10-28 Thread Marek Szyprowski
Hi,

On 25.10.2021 17:15, Maxime Ripard wrote:
> In order to avoid any probe ordering issue, the best practice is to move
> the secondary MIPI-DSI device registration and attachment to the
> MIPI-DSI host at probe time. Let's do this.
>
> Acked-by: Sam Ravnborg 
> Tested-by: John Stultz 
> Signed-off-by: Maxime Ripard 

This patch landed in linux-next as commit 864c49a31d6b ("drm/bridge: 
adv7511: Register and attach our DSI device at probe"). Sadly it causes 
endless probe-fail-defer loop on DragonBoard 410c board 
(arch/arm64/boot/dts/qcom/apq8016-sbc.dts):

qcom,pm8916-wcd-spmi-codec 200f000.spmi:pmic@1:audio-codec@f000: PMIC 
REV: 1  CODEC Version: 1
qcom,pm8916-wcd-spmi-codec 200f000.spmi:pmic@1:audio-codec@f000: ASoC: 
sink widget PDM_RX1 overwritten
qcom,pm8916-wcd-spmi-codec 200f000.spmi:pmic@1:audio-codec@f000: ASoC: 
source widget PDM_RX1 overwritten
qcom,pm8916-wcd-spmi-codec 200f000.spmi:pmic@1:audio-codec@f000: ASoC: 
source widget PDM_RX1 overwritten
qcom,pm8916-wcd-spmi-codec 200f000.spmi:pmic@1:audio-codec@f000: ASoC: 
sink widget PDM_RX1 overwritten
qcom,pm8916-wcd-spmi-codec 200f000.spmi:pmic@1:audio-codec@f000: ASoC: 
sink widget PDM_RX1 overwritten
qcom,pm8916-wcd-spmi-codec 200f000.spmi:pmic@1:audio-codec@f000: ASoC: 
sink widget ADC1 overwritten
qcom,pm8916-wcd-spmi-codec 200f000.spmi:pmic@1:audio-codec@f000: ASoC: 
sink widget ADC1 overwritten
qcom,pm8916-wcd-spmi-codec 200f000.spmi:pmic@1:audio-codec@f000: ASoC: 
sink widget PDM_RX1 overwritten
qcom,pm8916-wcd-spmi-codec 200f000.spmi:pmic@1:audio-codec@f000: ASoC: 
source widget PDM_RX3 overwritten
debugfs: File 'Capture' in directory 'dapm' already present!
adv7511 3-0039: failed to find dsi host
adv7511 3-0039: supply dvdd not found, using dummy regulator
adv7511 3-0039: supply pvdd not found, using dummy regulator
adv7511 3-0039: supply a2vdd not found, using dummy regulator
debugfs: Directory '7708000.audio-controller' with parent 'DB410c' 
already present!
qcom,pm8916-wcd-spmi-codec 200f000.spmi:pmic@1:audio-codec@f000: PMIC 
REV: 1  CODEC Version: 1
qcom,pm8916-wcd-spmi-codec 200f000.spmi:pmic@1:audio-codec@f000: ASoC: 
sink widget PDM_RX1 overwritten
qcom,pm8916-wcd-spmi-codec 200f000.spmi:pmic@1:audio-codec@f000: ASoC: 
source widget PDM_RX1 overwritten
qcom,pm8916-wcd-spmi-codec 200f000.spmi:pmic@1:audio-codec@f000: ASoC: 
source widget PDM_RX1 overwritten
qcom,pm8916-wcd-spmi-codec 200f000.spmi:pmic@1:audio-codec@f000: ASoC: 
sink widget PDM_RX1 overwritten
qcom,pm8916-wcd-spmi-codec 200f000.spmi:pmic@1:audio-codec@f000: ASoC: 
sink widget PDM_RX1 overwritten
qcom,pm8916-wcd-spmi-codec 200f000.spmi:pmic@1:audio-codec@f000: ASoC: 
sink widget ADC1 overwritten
qcom,pm8916-wcd-spmi-codec 200f000.spmi:pmic@1:audio-codec@f000: ASoC: 
sink widget ADC1 overwritten
qcom,pm8916-wcd-spmi-codec 200f000.spmi:pmic@1:audio-codec@f000: ASoC: 
sink widget PDM_RX1 overwritten
qcom,pm8916-wcd-spmi-codec 200f000.spmi:pmic@1:audio-codec@f000: ASoC: 
source widget PDM_RX3 overwritten
debugfs: File 'Capture' in directory 'dapm' already present!
adv7511 3-0039: failed to find dsi host
adv7511 3-0039: supply dvdd not found, using dummy regulator
adv7511 3-0039: supply pvdd not found, using dummy regulator
adv7511 3-0039: supply a2vdd not found, using dummy regulator
debugfs: Directory '7708000.audio-controller' with parent 'DB410c' 
already present!
qcom,pm8916-wcd-spmi-codec 200f000.spmi:pmic@1:audio-codec@f000: PMIC 
REV: 1  CODEC Version: 1
qcom,pm8916-wcd-spmi-codec 200f000.spmi:pmic@1:audio-codec@f000: ASoC: 
sink widget PDM_RX1 overwritten
qcom,pm8916-wcd-spmi-codec 200f000.spmi:pmic@1:audio-codec@f000: ASoC: 
source widget PDM_RX1 overwritten
qcom,pm8916-wcd-spmi-codec 200f000.spmi:pmic@1:audio-codec@f000: ASoC: 
source widget PDM_RX1 overwritten
qcom,pm8916-wcd-spmi-codec 200f000.spmi:pmic@1:audio-codec@f000: ASoC: 
sink widget PDM_RX1 overwritten
qcom,pm8916-wcd-spmi-codec 200f000.spmi:pmic@1:audio-codec@f000: ASoC: 
sink widget PDM_RX1 overwritten
qcom,pm8916-wcd-spmi-codec 200f000.spmi:pmic@1:audio-codec@f000: ASoC: 
sink widget ADC1 overwritten
qcom,pm8916-wcd-spmi-codec 200f000.spmi:pmic@1:audio-codec@f000: ASoC: 
sink widget ADC1 overwritten
qcom,pm8916-wcd-spmi-codec 200f000.spmi:pmic@1:audio-codec@f000: ASoC: 
sink widget PDM_RX1 overwritten
qcom,pm8916-wcd-spmi-codec 200f000.spmi:pmic@1:audio-codec@f000: ASoC: 
source widget PDM_RX3 overwritten
debugfs: File 'Capture' in directory 'dapm' already present!
adv7511 3-0039: failed to find dsi host
adv7511 3-0039: supply dvdd not found, using dummy regulator
adv7511 3-0039: supply pvdd not found, using dummy regulator
adv7511 3-0039: supply a2vdd not found, using dummy regulator
debugfs: Directory '7708000.audio-controller' with parent 'DB410c' 
already present!

...

Reverting it on top of linux next-20211028 'fi

Re: [Freedreno] [v1] drm/msm/disp/dpu1: set default group ID for CTL.

2021-10-28 Thread Stephen Boyd
Quoting Kalyan Thota (2021-10-28 07:05:01)
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h 
> b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h
> index 4ade44b..57b9be1 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h
> @@ -179,13 +179,16 @@ enum {
>
>  /**
>   * CTL sub-blocks
> - * @DPU_CTL_SPLIT_DISPLAY   CTL supports video mode split display
> + * @DPU_CTL_SPLIT_DISPLAY, CTL supports video mode split display
> + * @DPU_CTL_FETCH_ACTIVE,  Active CTL for fetch HW (SSPPs).
> + * @DPU_CTL_VM_CFG,CTL supports multiple VMs.

Are those commas supposed to be colons? Also the application of the
period/full-stop is not consistent. Please pick one. I see the double
star so it looks like kernel-doc, but probably doesn't parse properly.

>   * @DPU_CTL_MAX
>   */
>  enum {
> DPU_CTL_SPLIT_DISPLAY = 0x1,
> DPU_CTL_ACTIVE_CFG,
> DPU_CTL_FETCH_ACTIVE,
> +   DPU_CTL_VM_CFG,
> DPU_CTL_MAX
>  };
>
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c 
> b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c
> index 64740ddb..455b06a 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c
> @@ -498,6 +498,9 @@ static void dpu_hw_ctl_intf_cfg_v1(struct dpu_hw_ctl *ctx,
> u32 intf_active = 0;
> u32 mode_sel = 0;
>

Can we get a comment here about what's happening?

> +   if ((test_bit(DPU_CTL_VM_CFG, &ctx->caps->features)))

Does it need to be atomic? Sort of doubt it, so probably __test_bit()
would work just as well.

> +   mode_sel = 0xf000;

How about a define for 0xf000? Preferably a name that matches the
register description for this bit pattern.

> +
> if (cfg->intf_mode_sel == DPU_CTL_MODE_SEL_CMD)
> mode_sel |= BIT(17);
>


[Freedreno] [v1] drm/msm/disp/dpu1: set default group ID for CTL.

2021-10-28 Thread Kalyan Thota
From: Kalyan Thota 

New required programming in CTL for SC7280. Group ID informs
HW of which VM owns that CTL. Force this group ID to
default/disabled until virtualization support is enabled in SW.

Signed-off-by: Kalyan Thota 
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 5 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c | 3 +++
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c 
b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
index ce6f32a..283605c 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
@@ -45,7 +45,7 @@
(PINGPONG_SDM845_MASK | BIT(DPU_PINGPONG_TE2))
 
 #define CTL_SC7280_MASK \
-   (BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_FETCH_ACTIVE))
+   (BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_FETCH_ACTIVE) | 
BIT(DPU_CTL_VM_CFG))
 
 #define MERGE_3D_SM8150_MASK (0)
 
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h 
b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h
index 4ade44b..57b9be1 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h
@@ -179,13 +179,16 @@ enum {
 
 /**
  * CTL sub-blocks
- * @DPU_CTL_SPLIT_DISPLAY   CTL supports video mode split display
+ * @DPU_CTL_SPLIT_DISPLAY, CTL supports video mode split display
+ * @DPU_CTL_FETCH_ACTIVE,  Active CTL for fetch HW (SSPPs).
+ * @DPU_CTL_VM_CFG,CTL supports multiple VMs.
  * @DPU_CTL_MAX
  */
 enum {
DPU_CTL_SPLIT_DISPLAY = 0x1,
DPU_CTL_ACTIVE_CFG,
DPU_CTL_FETCH_ACTIVE,
+   DPU_CTL_VM_CFG,
DPU_CTL_MAX
 };
 
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c 
b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c
index 64740ddb..455b06a 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c
@@ -498,6 +498,9 @@ static void dpu_hw_ctl_intf_cfg_v1(struct dpu_hw_ctl *ctx,
u32 intf_active = 0;
u32 mode_sel = 0;
 
+   if ((test_bit(DPU_CTL_VM_CFG, &ctx->caps->features)))
+   mode_sel = 0xf000;
+
if (cfg->intf_mode_sel == DPU_CTL_MODE_SEL_CMD)
mode_sel |= BIT(17);
 
-- 
2.7.4



[Freedreno] [PATCH 2/4] drm/msm: use the new dma_resv_describe

2021-10-28 Thread Christian König
Instead of hand rolling pretty much the same code.

Signed-off-by: Christian König 
Reviewed-by: Rob Clark 
---
 drivers/gpu/drm/msm/msm_gem.c | 20 +---
 1 file changed, 1 insertion(+), 19 deletions(-)

diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c
index 5bd511f07c07..3878b8dc2d59 100644
--- a/drivers/gpu/drm/msm/msm_gem.c
+++ b/drivers/gpu/drm/msm/msm_gem.c
@@ -865,23 +865,11 @@ int msm_gem_cpu_fini(struct drm_gem_object *obj)
 }
 
 #ifdef CONFIG_DEBUG_FS
-static void describe_fence(struct dma_fence *fence, const char *type,
-   struct seq_file *m)
-{
-   if (!dma_fence_is_signaled(fence))
-   seq_printf(m, "\t%9s: %s %s seq %llu\n", type,
-   fence->ops->get_driver_name(fence),
-   fence->ops->get_timeline_name(fence),
-   fence->seqno);
-}
-
 void msm_gem_describe(struct drm_gem_object *obj, struct seq_file *m,
struct msm_gem_stats *stats)
 {
struct msm_gem_object *msm_obj = to_msm_bo(obj);
struct dma_resv *robj = obj->resv;
-   struct dma_resv_iter cursor;
-   struct dma_fence *fence;
struct msm_gem_vma *vma;
uint64_t off = drm_vma_node_start(&obj->vma_node);
const char *madv;
@@ -955,13 +943,7 @@ void msm_gem_describe(struct drm_gem_object *obj, struct 
seq_file *m,
seq_puts(m, "\n");
}
 
-   dma_resv_for_each_fence(&cursor, robj, true, fence) {
-   if (dma_resv_iter_is_exclusive(&cursor))
-   describe_fence(fence, "Exclusive", m);
-   else
-   describe_fence(fence, "Shared", m);
-   }
-
+   dma_resv_describe(robj, m);
msm_gem_unlock(obj);
 }
 
-- 
2.25.1



[Freedreno] [PATCH 4/4] drm/qxl: use iterator instead of dma_resv_shared_list

2021-10-28 Thread Christian König
I'm not sure why it is useful to know the number of fences
in the reservation object, but we try to avoid exposing the
dma_resv_shared_list() function.

So use the iterator instead. If more information is desired
we could use dma_resv_describe() as well.

Signed-off-by: Christian König 
---
 drivers/gpu/drm/qxl/qxl_debugfs.c | 17 ++---
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/qxl/qxl_debugfs.c 
b/drivers/gpu/drm/qxl/qxl_debugfs.c
index 1f9a59601bb1..6a36b0fd845c 100644
--- a/drivers/gpu/drm/qxl/qxl_debugfs.c
+++ b/drivers/gpu/drm/qxl/qxl_debugfs.c
@@ -57,13 +57,16 @@ qxl_debugfs_buffers_info(struct seq_file *m, void *data)
struct qxl_bo *bo;
 
list_for_each_entry(bo, &qdev->gem.objects, list) {
-   struct dma_resv_list *fobj;
-   int rel;
-
-   rcu_read_lock();
-   fobj = dma_resv_shared_list(bo->tbo.base.resv);
-   rel = fobj ? fobj->shared_count : 0;
-   rcu_read_unlock();
+   struct dma_resv_iter cursor;
+   struct dma_fence *fence;
+   int rel = 0;
+
+   dma_resv_iter_begin(&cursor, bo->tbo.base.resv, true);
+   dma_resv_for_each_fence_unlocked(&cursor, fence) {
+   if (dma_resv_iter_is_restarted(&cursor))
+   rel = 0;
+   ++rel;
+   }
 
seq_printf(m, "size %ld, pc %d, num releases %d\n",
   (unsigned long)bo->tbo.base.size,
-- 
2.25.1



[Freedreno] [PATCH 3/4] drm/etnaviv: use dma_resv_describe

2021-10-28 Thread Christian König
Instead of dumping the fence info manually.

Signed-off-by: Christian König 
Reviewed-by: Rob Clark 
---
 drivers/gpu/drm/etnaviv/etnaviv_gem.c | 26 +++---
 1 file changed, 7 insertions(+), 19 deletions(-)

diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem.c 
b/drivers/gpu/drm/etnaviv/etnaviv_gem.c
index b018693e3877..d5314aa28ff7 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gem.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gem.c
@@ -424,36 +424,24 @@ int etnaviv_gem_wait_bo(struct etnaviv_gpu *gpu, struct 
drm_gem_object *obj,
 }
 
 #ifdef CONFIG_DEBUG_FS
-static void etnaviv_gem_describe_fence(struct dma_fence *fence,
-   const char *type, struct seq_file *m)
-{
-   seq_printf(m, "\t%9s: %s %s seq %llu\n", type,
-  fence->ops->get_driver_name(fence),
-  fence->ops->get_timeline_name(fence),
-  fence->seqno);
-}
-
 static void etnaviv_gem_describe(struct drm_gem_object *obj, struct seq_file 
*m)
 {
struct etnaviv_gem_object *etnaviv_obj = to_etnaviv_bo(obj);
struct dma_resv *robj = obj->resv;
-   struct dma_resv_iter cursor;
-   struct dma_fence *fence;
unsigned long off = drm_vma_node_start(&obj->vma_node);
+   int r;
 
seq_printf(m, "%08x: %c %2d (%2d) %08lx %p %zd\n",
etnaviv_obj->flags, is_active(etnaviv_obj) ? 'A' : 'I',
obj->name, kref_read(&obj->refcount),
off, etnaviv_obj->vaddr, obj->size);
 
-   dma_resv_iter_begin(&cursor, robj, true);
-   dma_resv_for_each_fence_unlocked(&cursor, fence) {
-   if (dma_resv_iter_is_exclusive(&cursor))
-   etnaviv_gem_describe_fence(fence, "Exclusive", m);
-   else
-   etnaviv_gem_describe_fence(fence, "Shared", m);
-   }
-   dma_resv_iter_end(&cursor);
+   r = dma_resv_lock(robj, NULL);
+   if (r)
+   return;
+
+   dma_resv_describe(robj, m);
+   dma_resv_unlock(robj);
 }
 
 void etnaviv_gem_describe_objects(struct etnaviv_drm_private *priv,
-- 
2.25.1



[Freedreno] [PATCH 1/4] dma-buf: add dma_fence_describe and dma_resv_describe

2021-10-28 Thread Christian König
Add functions to dump dma_fence and dma_resv objects into a seq_file and
use them for printing the debugfs informations.

Signed-off-by: Christian König 
Reviewed-by: Rob Clark 
---
 drivers/dma-buf/dma-buf.c   | 11 +--
 drivers/dma-buf/dma-fence.c | 16 
 drivers/dma-buf/dma-resv.c  | 23 +++
 include/linux/dma-fence.h   |  1 +
 include/linux/dma-resv.h|  1 +
 5 files changed, 42 insertions(+), 10 deletions(-)

diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
index 7b619998f03a..1d6f6c6a0b09 100644
--- a/drivers/dma-buf/dma-buf.c
+++ b/drivers/dma-buf/dma-buf.c
@@ -1332,8 +1332,6 @@ static int dma_buf_debug_show(struct seq_file *s, void 
*unused)
 {
struct dma_buf *buf_obj;
struct dma_buf_attachment *attach_obj;
-   struct dma_resv_iter cursor;
-   struct dma_fence *fence;
int count = 0, attach_count;
size_t size = 0;
int ret;
@@ -1361,14 +1359,7 @@ static int dma_buf_debug_show(struct seq_file *s, void 
*unused)
file_inode(buf_obj->file)->i_ino,
buf_obj->name ?: "");
 
-   dma_resv_for_each_fence(&cursor, buf_obj->resv, true, fence) {
-   seq_printf(s, "\t%s fence: %s %s %ssignalled\n",
-  dma_resv_iter_is_exclusive(&cursor) ?
-   "Exclusive" : "Shared",
-  fence->ops->get_driver_name(fence),
-  fence->ops->get_timeline_name(fence),
-  dma_fence_is_signaled(fence) ? "" : "un");
-   }
+   dma_resv_describe(buf_obj->resv, s);
 
seq_puts(s, "\tAttached Devices:\n");
attach_count = 0;
diff --git a/drivers/dma-buf/dma-fence.c b/drivers/dma-buf/dma-fence.c
index 1e82ecd443fa..5175adf58644 100644
--- a/drivers/dma-buf/dma-fence.c
+++ b/drivers/dma-buf/dma-fence.c
@@ -907,6 +907,22 @@ dma_fence_wait_any_timeout(struct dma_fence **fences, 
uint32_t count,
 }
 EXPORT_SYMBOL(dma_fence_wait_any_timeout);
 
+/**
+ * dma_fence_describe - Dump fence describtion into seq_file
+ * @fence: the 6fence to describe
+ * @seq: the seq_file to put the textual description into
+ *
+ * Dump a textual description of the fence and it's state into the seq_file.
+ */
+void dma_fence_describe(struct dma_fence *fence, struct seq_file *seq)
+{
+   seq_printf(seq, "%s %s seq %llu %ssignalled\n",
+  fence->ops->get_driver_name(fence),
+  fence->ops->get_timeline_name(fence), fence->seqno,
+  dma_fence_is_signaled(fence) ? "" : "un");
+}
+EXPORT_SYMBOL(dma_fence_describe);
+
 /**
  * dma_fence_init - Initialize a custom fence.
  * @fence: the fence to initialize
diff --git a/drivers/dma-buf/dma-resv.c b/drivers/dma-buf/dma-resv.c
index 9eb2baa387d4..ff3c0558b3b8 100644
--- a/drivers/dma-buf/dma-resv.c
+++ b/drivers/dma-buf/dma-resv.c
@@ -38,6 +38,7 @@
 #include 
 #include 
 #include 
+#include 
 
 /**
  * DOC: Reservation Object Overview
@@ -666,6 +667,28 @@ bool dma_resv_test_signaled(struct dma_resv *obj, bool 
test_all)
 }
 EXPORT_SYMBOL_GPL(dma_resv_test_signaled);
 
+/**
+ * dma_resv_describe - Dump description of the resv object into seq_file
+ * @obj: the reservation object
+ * @seq: the seq_file to dump the description into
+ *
+ * Dump a textual description of the fences inside an dma_resv object into the
+ * seq_file.
+ */
+void dma_resv_describe(struct dma_resv *obj, struct seq_file *seq)
+{
+   struct dma_resv_iter cursor;
+   struct dma_fence *fence;
+
+   dma_resv_for_each_fence(&cursor, obj, true, fence) {
+   seq_printf(seq, "\t%s fence:",
+  dma_resv_iter_is_exclusive(&cursor) ?
+   "Exclusive" : "Shared");
+   dma_fence_describe(fence, seq);
+   }
+}
+EXPORT_SYMBOL_GPL(dma_resv_describe);
+
 #if IS_ENABLED(CONFIG_LOCKDEP)
 static int __init dma_resv_lockdep(void)
 {
diff --git a/include/linux/dma-fence.h b/include/linux/dma-fence.h
index a706b7bf51d7..1ea691753bd3 100644
--- a/include/linux/dma-fence.h
+++ b/include/linux/dma-fence.h
@@ -264,6 +264,7 @@ void dma_fence_init(struct dma_fence *fence, const struct 
dma_fence_ops *ops,
 
 void dma_fence_release(struct kref *kref);
 void dma_fence_free(struct dma_fence *fence);
+void dma_fence_describe(struct dma_fence *fence, struct seq_file *seq);
 
 /**
  * dma_fence_put - decreases refcount of the fence
diff --git a/include/linux/dma-resv.h b/include/linux/dma-resv.h
index dbd235ab447f..09c6063b199a 100644
--- a/include/linux/dma-resv.h
+++ b/include/linux/dma-resv.h
@@ -490,5 +490,6 @@ int dma_resv_copy_fences(struct dma_resv *dst, struct 
dma_resv *src);
 long dma_resv_wait_timeout(struct dma_resv *obj, bool wait_all, bool intr,
   unsigned long timeout);
 bool dma_resv_test_signaled(str