diff mbox

[v3,3/3] drm/rockchip: remove rockchip_drm_encoder_get_mux_id

Message ID 1440672968-29422-4-git-send-email-p.zabel@pengutronix.de (mailing list archive)
State New, archived
Headers show

Commit Message

Philipp Zabel Aug. 27, 2015, 10:56 a.m. UTC
It is replaced by drm_of_encoder_active_endpoint_id.

Suggested-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
 drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c |  2 +-
 drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 30 -----------------------------
 drivers/gpu/drm/rockchip/rockchip_drm_drv.h |  2 --
 3 files changed, 1 insertion(+), 33 deletions(-)

Comments

Heiko Stuebner Aug. 27, 2015, 11:26 a.m. UTC | #1
Hi Philipp,

Am Donnerstag, 27. August 2015, 12:56:07 schrieb Philipp Zabel:
> It is replaced by drm_of_encoder_active_endpoint_id.
> 
> Suggested-by: Daniel Kurtz <djkurtz@chromium.org>
> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>

the person working the most on the rockchip dw_hdmi currently is probably 
Yakir Yang (included now).

But even to me with my general Rockchip work area outside the drm this looks 
good, as there isn't any functional change present in the moved function, so

Reviewed-by: Heiko Stuebner <heiko@sntech.de>


Heiko

> ---
>  drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c |  2 +-
>  drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 30
> ----------------------------- drivers/gpu/drm/rockchip/rockchip_drm_drv.h |
>  2 --
>  3 files changed, 1 insertion(+), 33 deletions(-)
> 
> diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
> b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c index 80d6fc8..042eb95 100644
> --- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
> +++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
> @@ -201,7 +201,7 @@ static void dw_hdmi_rockchip_encoder_commit(struct
> drm_encoder *encoder) u32 val;
>  	int mux;
> 
> -	mux = rockchip_drm_encoder_get_mux_id(hdmi->dev->of_node, encoder);
> +	mux = drm_of_encoder_active_endpoint_id(hdmi->dev->of_node, encoder);
>  	if (mux)
>  		val = HDMI_SEL_VOP_LIT | (HDMI_SEL_VOP_LIT << 16);
>  	else
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
> b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c index 9a0c291..12094d0 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
> @@ -379,36 +379,6 @@ static const struct dev_pm_ops rockchip_drm_pm_ops = {
>  				rockchip_drm_sys_resume)
>  };
> 
> -/*
> - * @node: device tree node containing encoder input ports
> - * @encoder: drm_encoder
> - */
> -int rockchip_drm_encoder_get_mux_id(struct device_node *node,
> -				    struct drm_encoder *encoder)
> -{
> -	struct device_node *ep;
> -	struct drm_crtc *crtc = encoder->crtc;
> -	struct of_endpoint endpoint;
> -	struct device_node *port;
> -	int ret;
> -
> -	if (!node || !crtc)
> -		return -EINVAL;
> -
> -	for_each_endpoint_of_node(node, ep) {
> -		port = of_graph_get_remote_port(ep);
> -		of_node_put(port);
> -		if (port == crtc->port) {
> -			ret = of_graph_parse_endpoint(ep, &endpoint);
> -			of_node_put(ep);
> -			return ret ?: endpoint.id;
> -		}
> -	}
> -
> -	return -EINVAL;
> -}
> -EXPORT_SYMBOL_GPL(rockchip_drm_encoder_get_mux_id);
> -
>  static int compare_of(struct device *dev, void *data)
>  {
>  	struct device_node *np = data;
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.h
> b/drivers/gpu/drm/rockchip/rockchip_drm_drv.h index dc4e5f0..20d6ac1 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.h
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.h
> @@ -56,8 +56,6 @@ int rockchip_register_crtc_funcs(struct drm_device *dev,
>  				 const struct rockchip_crtc_funcs *crtc_funcs,
>  				 int pipe);
>  void rockchip_unregister_crtc_funcs(struct drm_device *dev, int pipe);
> -int rockchip_drm_encoder_get_mux_id(struct device_node *node,
> -				    struct drm_encoder *encoder);
>  int rockchip_drm_crtc_mode_config(struct drm_crtc *crtc, int
> connector_type, int out_mode);
>  int rockchip_drm_dma_attach_device(struct drm_device *drm_dev,
Yakir Yang Aug. 28, 2015, 1:17 a.m. UTC | #2
Hi Philipp,

? 2015/8/27 19:26, Heiko Stuebner ??:
> Hi Philipp,
>
> Am Donnerstag, 27. August 2015, 12:56:07 schrieb Philipp Zabel:
>> It is replaced by drm_of_encoder_active_endpoint_id.
>>
>> Suggested-by: Daniel Kurtz <djkurtz@chromium.org>
>> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
>> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> the person working the most on the rockchip dw_hdmi currently is probably
> Yakir Yang (included now).
>
> But even to me with my general Rockchip work area outside the drm this looks
> good, as there isn't any functional change present in the moved function, so
>
> Reviewed-by: Heiko Stuebner <heiko@sntech.de>

I cherry-pick 1/3 and 3/3 to my chromeos-3.14 tree, both HDMI and eDP 
works perfectly, so

Test-by: Yakir Yang <ykk@rock-chips.com>

Thanks,
- Yakir

>
> Heiko
>
>> ---
>>   drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c |  2 +-
>>   drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 30
>> ----------------------------- drivers/gpu/drm/rockchip/rockchip_drm_drv.h |
>>   2 --
>>   3 files changed, 1 insertion(+), 33 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
>> b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c index 80d6fc8..042eb95 100644
>> --- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
>> +++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
>> @@ -201,7 +201,7 @@ static void dw_hdmi_rockchip_encoder_commit(struct
>> drm_encoder *encoder) u32 val;
>>   	int mux;
>>
>> -	mux = rockchip_drm_encoder_get_mux_id(hdmi->dev->of_node, encoder);
>> +	mux = drm_of_encoder_active_endpoint_id(hdmi->dev->of_node, encoder);
>>   	if (mux)
>>   		val = HDMI_SEL_VOP_LIT | (HDMI_SEL_VOP_LIT << 16);
>>   	else
>> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
>> b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c index 9a0c291..12094d0 100644
>> --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
>> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
>> @@ -379,36 +379,6 @@ static const struct dev_pm_ops rockchip_drm_pm_ops = {
>>   				rockchip_drm_sys_resume)
>>   };
>>
>> -/*
>> - * @node: device tree node containing encoder input ports
>> - * @encoder: drm_encoder
>> - */
>> -int rockchip_drm_encoder_get_mux_id(struct device_node *node,
>> -				    struct drm_encoder *encoder)
>> -{
>> -	struct device_node *ep;
>> -	struct drm_crtc *crtc = encoder->crtc;
>> -	struct of_endpoint endpoint;
>> -	struct device_node *port;
>> -	int ret;
>> -
>> -	if (!node || !crtc)
>> -		return -EINVAL;
>> -
>> -	for_each_endpoint_of_node(node, ep) {
>> -		port = of_graph_get_remote_port(ep);
>> -		of_node_put(port);
>> -		if (port == crtc->port) {
>> -			ret = of_graph_parse_endpoint(ep, &endpoint);
>> -			of_node_put(ep);
>> -			return ret ?: endpoint.id;
>> -		}
>> -	}
>> -
>> -	return -EINVAL;
>> -}
>> -EXPORT_SYMBOL_GPL(rockchip_drm_encoder_get_mux_id);
>> -
>>   static int compare_of(struct device *dev, void *data)
>>   {
>>   	struct device_node *np = data;
>> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.h
>> b/drivers/gpu/drm/rockchip/rockchip_drm_drv.h index dc4e5f0..20d6ac1 100644
>> --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.h
>> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.h
>> @@ -56,8 +56,6 @@ int rockchip_register_crtc_funcs(struct drm_device *dev,
>>   				 const struct rockchip_crtc_funcs *crtc_funcs,
>>   				 int pipe);
>>   void rockchip_unregister_crtc_funcs(struct drm_device *dev, int pipe);
>> -int rockchip_drm_encoder_get_mux_id(struct device_node *node,
>> -				    struct drm_encoder *encoder);
>>   int rockchip_drm_crtc_mode_config(struct drm_crtc *crtc, int
>> connector_type, int out_mode);
>>   int rockchip_drm_dma_attach_device(struct drm_device *drm_dev,
>
>
>
yao mark Aug. 28, 2015, 1:56 a.m. UTC | #3
On 2015?08?27? 18:56, Philipp Zabel wrote:
> It is replaced by drm_of_encoder_active_endpoint_id.
>
> Suggested-by: Daniel Kurtz <djkurtz@chromium.org>
> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> ---
>   drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c |  2 +-
>   drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 30 -----------------------------
>   drivers/gpu/drm/rockchip/rockchip_drm_drv.h |  2 --
>   3 files changed, 1 insertion(+), 33 deletions(-)
>
> diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
> index 80d6fc8..042eb95 100644
> --- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
> +++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
> @@ -201,7 +201,7 @@ static void dw_hdmi_rockchip_encoder_commit(struct drm_encoder *encoder)
>   	u32 val;
>   	int mux;
>   
> -	mux = rockchip_drm_encoder_get_mux_id(hdmi->dev->of_node, encoder);
> +	mux = drm_of_encoder_active_endpoint_id(hdmi->dev->of_node, encoder);
>   	if (mux)
>   		val = HDMI_SEL_VOP_LIT | (HDMI_SEL_VOP_LIT << 16);
>   	else
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
> index 9a0c291..12094d0 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
> @@ -379,36 +379,6 @@ static const struct dev_pm_ops rockchip_drm_pm_ops = {
>   				rockchip_drm_sys_resume)
>   };
>   
> -/*
> - * @node: device tree node containing encoder input ports
> - * @encoder: drm_encoder
> - */
> -int rockchip_drm_encoder_get_mux_id(struct device_node *node,
> -				    struct drm_encoder *encoder)
> -{
> -	struct device_node *ep;
> -	struct drm_crtc *crtc = encoder->crtc;
> -	struct of_endpoint endpoint;
> -	struct device_node *port;
> -	int ret;
> -
> -	if (!node || !crtc)
> -		return -EINVAL;
> -
> -	for_each_endpoint_of_node(node, ep) {
> -		port = of_graph_get_remote_port(ep);
> -		of_node_put(port);
> -		if (port == crtc->port) {
> -			ret = of_graph_parse_endpoint(ep, &endpoint);
> -			of_node_put(ep);
> -			return ret ?: endpoint.id;
> -		}
> -	}
> -
> -	return -EINVAL;
> -}
> -EXPORT_SYMBOL_GPL(rockchip_drm_encoder_get_mux_id);
> -

Dw-hdmi driver can reuse this fuction, so

Acked-by: Mark Yao <mark.yao@rock-chips.com>

>   static int compare_of(struct device *dev, void *data)
>   {
>   	struct device_node *np = data;
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.h b/drivers/gpu/drm/rockchip/rockchip_drm_drv.h
> index dc4e5f0..20d6ac1 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.h
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.h
> @@ -56,8 +56,6 @@ int rockchip_register_crtc_funcs(struct drm_device *dev,
>   				 const struct rockchip_crtc_funcs *crtc_funcs,
>   				 int pipe);
>   void rockchip_unregister_crtc_funcs(struct drm_device *dev, int pipe);
> -int rockchip_drm_encoder_get_mux_id(struct device_node *node,
> -				    struct drm_encoder *encoder);
>   int rockchip_drm_crtc_mode_config(struct drm_crtc *crtc, int connector_type,
>   				  int out_mode);
>   int rockchip_drm_dma_attach_device(struct drm_device *drm_dev,
Yakir Yang Aug. 28, 2015, 3:18 a.m. UTC | #4
Hi Philipp & Heiko,

? 2015/8/28 9:17, Yakir Yang ??:
> Hi Philipp,
>
> ? 2015/8/27 19:26, Heiko Stuebner ??:
>> Hi Philipp,
>>
>> Am Donnerstag, 27. August 2015, 12:56:07 schrieb Philipp Zabel:
>>> It is replaced by drm_of_encoder_active_endpoint_id.
>>>
>>> Suggested-by: Daniel Kurtz <djkurtz@chromium.org>
>>> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
>>> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
>> the person working the most on the rockchip dw_hdmi currently is 
>> probably
>> Yakir Yang (included now).
>>
>> But even to me with my general Rockchip work area outside the drm 
>> this looks
>> good, as there isn't any functional change present in the moved 
>> function, so
>>
>> Reviewed-by: Heiko Stuebner <heiko@sntech.de>
>
> I cherry-pick 1/3 and 3/3 to my chromeos-3.14 tree, both HDMI and eDP 
> works perfectly, so
>
> Test-by: Yakir Yang <ykk@rock-chips.com>
>

Actually, I do feel some strange limit with this change.

If we take the endpoint id as the vop id, then we must ensure the
remote point order in dtsi file.
                                 hdmi_in_vopb: endpoint@0 {
                                         reg = <0>;
                                         remote-endpoint = <&vopb_out_hdmi>;
                                 };
                                 hdmi_in_vopl: endpoint@1 {
                                         reg = <1>;
                                         remote-endpoint = <&vopl_out_hdmi>;
                                 };

This is strange limite, don't you think?

- Yakir

> Thanks,
> - Yakir
>
>>
>> Heiko
>>
>>> ---
>>>   drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c |  2 +-
>>>   drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 30
>>> ----------------------------- 
>>> drivers/gpu/drm/rockchip/rockchip_drm_drv.h |
>>>   2 --
>>>   3 files changed, 1 insertion(+), 33 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
>>> b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c index 80d6fc8..042eb95 
>>> 100644
>>> --- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
>>> +++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
>>> @@ -201,7 +201,7 @@ static void dw_hdmi_rockchip_encoder_commit(struct
>>> drm_encoder *encoder) u32 val;
>>>       int mux;
>>>
>>> -    mux = rockchip_drm_encoder_get_mux_id(hdmi->dev->of_node, 
>>> encoder);
>>> +    mux = drm_of_encoder_active_endpoint_id(hdmi->dev->of_node, 
>>> encoder);
>>>       if (mux)
>>>           val = HDMI_SEL_VOP_LIT | (HDMI_SEL_VOP_LIT << 16);
>>>       else
>>> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
>>> b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c index 9a0c291..12094d0 
>>> 100644
>>> --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
>>> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
>>> @@ -379,36 +379,6 @@ static const struct dev_pm_ops 
>>> rockchip_drm_pm_ops = {
>>>                   rockchip_drm_sys_resume)
>>>   };
>>>
>>> -/*
>>> - * @node: device tree node containing encoder input ports
>>> - * @encoder: drm_encoder
>>> - */
>>> -int rockchip_drm_encoder_get_mux_id(struct device_node *node,
>>> -                    struct drm_encoder *encoder)
>>> -{
>>> -    struct device_node *ep;
>>> -    struct drm_crtc *crtc = encoder->crtc;
>>> -    struct of_endpoint endpoint;
>>> -    struct device_node *port;
>>> -    int ret;
>>> -
>>> -    if (!node || !crtc)
>>> -        return -EINVAL;
>>> -
>>> -    for_each_endpoint_of_node(node, ep) {
>>> -        port = of_graph_get_remote_port(ep);
>>> -        of_node_put(port);
>>> -        if (port == crtc->port) {
>>> -            ret = of_graph_parse_endpoint(ep, &endpoint);
>>> -            of_node_put(ep);
>>> -            return ret ?: endpoint.id;
>>> -        }
>>> -    }
>>> -
>>> -    return -EINVAL;
>>> -}
>>> -EXPORT_SYMBOL_GPL(rockchip_drm_encoder_get_mux_id);
>>> -
>>>   static int compare_of(struct device *dev, void *data)
>>>   {
>>>       struct device_node *np = data;
>>> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.h
>>> b/drivers/gpu/drm/rockchip/rockchip_drm_drv.h index dc4e5f0..20d6ac1 
>>> 100644
>>> --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.h
>>> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.h
>>> @@ -56,8 +56,6 @@ int rockchip_register_crtc_funcs(struct drm_device 
>>> *dev,
>>>                    const struct rockchip_crtc_funcs *crtc_funcs,
>>>                    int pipe);
>>>   void rockchip_unregister_crtc_funcs(struct drm_device *dev, int 
>>> pipe);
>>> -int rockchip_drm_encoder_get_mux_id(struct device_node *node,
>>> -                    struct drm_encoder *encoder);
>>>   int rockchip_drm_crtc_mode_config(struct drm_crtc *crtc, int
>>> connector_type, int out_mode);
>>>   int rockchip_drm_dma_attach_device(struct drm_device *drm_dev,
>>
>>
>>
>
Philipp Zabel Aug. 28, 2015, 1:27 p.m. UTC | #5
Hi Heiko, Mark, Yakir,

thank you for review & testing!

Am Freitag, den 28.08.2015, 11:18 +0800 schrieb Yakir Yang:
> Actually, I do feel some strange limit with this change.
> 
> If we take the endpoint id as the vop id, then we must ensure the
> remote point order in dtsi file.
>                                  hdmi_in_vopb: endpoint@0 {
>                                          reg = <0>;
>                                          remote-endpoint = <&vopb_out_hdmi>;
>                                  };
>                                  hdmi_in_vopl: endpoint@1 {
>                                          reg = <1>;
>                                          remote-endpoint = <&vopl_out_hdmi>;
>                                  };
> 
> This is strange limite, don't you think?

Not the order, but the reg property must be set as documented in
Documentation/devicetree/bindings/video/dw_hdmi-rockchip.txt:

- ports: contain a port node with endpoint definitions as defined in
  Documentation/devicetree/bindings/media/video-interfaces.txt. For
  vopb,set the reg = <0> and set the reg = <1> for vopl.

This has been exactly the same before.

regards
Philipp
diff mbox

Patch

diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
index 80d6fc8..042eb95 100644
--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
@@ -201,7 +201,7 @@  static void dw_hdmi_rockchip_encoder_commit(struct drm_encoder *encoder)
 	u32 val;
 	int mux;
 
-	mux = rockchip_drm_encoder_get_mux_id(hdmi->dev->of_node, encoder);
+	mux = drm_of_encoder_active_endpoint_id(hdmi->dev->of_node, encoder);
 	if (mux)
 		val = HDMI_SEL_VOP_LIT | (HDMI_SEL_VOP_LIT << 16);
 	else
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
index 9a0c291..12094d0 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
@@ -379,36 +379,6 @@  static const struct dev_pm_ops rockchip_drm_pm_ops = {
 				rockchip_drm_sys_resume)
 };
 
-/*
- * @node: device tree node containing encoder input ports
- * @encoder: drm_encoder
- */
-int rockchip_drm_encoder_get_mux_id(struct device_node *node,
-				    struct drm_encoder *encoder)
-{
-	struct device_node *ep;
-	struct drm_crtc *crtc = encoder->crtc;
-	struct of_endpoint endpoint;
-	struct device_node *port;
-	int ret;
-
-	if (!node || !crtc)
-		return -EINVAL;
-
-	for_each_endpoint_of_node(node, ep) {
-		port = of_graph_get_remote_port(ep);
-		of_node_put(port);
-		if (port == crtc->port) {
-			ret = of_graph_parse_endpoint(ep, &endpoint);
-			of_node_put(ep);
-			return ret ?: endpoint.id;
-		}
-	}
-
-	return -EINVAL;
-}
-EXPORT_SYMBOL_GPL(rockchip_drm_encoder_get_mux_id);
-
 static int compare_of(struct device *dev, void *data)
 {
 	struct device_node *np = data;
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.h b/drivers/gpu/drm/rockchip/rockchip_drm_drv.h
index dc4e5f0..20d6ac1 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.h
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.h
@@ -56,8 +56,6 @@  int rockchip_register_crtc_funcs(struct drm_device *dev,
 				 const struct rockchip_crtc_funcs *crtc_funcs,
 				 int pipe);
 void rockchip_unregister_crtc_funcs(struct drm_device *dev, int pipe);
-int rockchip_drm_encoder_get_mux_id(struct device_node *node,
-				    struct drm_encoder *encoder);
 int rockchip_drm_crtc_mode_config(struct drm_crtc *crtc, int connector_type,
 				  int out_mode);
 int rockchip_drm_dma_attach_device(struct drm_device *drm_dev,