mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 09:59:32 +00:00
drm/imx: remove imx_drm_encoder_get_mux_id
It is replaced by drm_of_encoder_active_port_id. Suggested-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
This commit is contained in:
parent
4cacf91fcb
commit
53141e42cf
4 changed files with 4 additions and 36 deletions
|
@ -125,7 +125,7 @@ static void dw_hdmi_imx_encoder_mode_set(struct drm_encoder *encoder,
|
|||
static void dw_hdmi_imx_encoder_commit(struct drm_encoder *encoder)
|
||||
{
|
||||
struct imx_hdmi *hdmi = container_of(encoder, struct imx_hdmi, encoder);
|
||||
int mux = imx_drm_encoder_get_mux_id(hdmi->dev->of_node, encoder);
|
||||
int mux = drm_of_encoder_active_port_id(hdmi->dev->of_node, encoder);
|
||||
|
||||
regmap_update_bits(hdmi->regmap, IOMUXC_GPR3,
|
||||
IMX6Q_GPR3_HDMI_MUX_CTL_MASK,
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
#include <linux/device.h>
|
||||
#include <linux/fb.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_graph.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <drm/drmP.h>
|
||||
#include <drm/drm_fb_helper.h>
|
||||
|
@ -412,36 +411,6 @@ int imx_drm_encoder_parse_of(struct drm_device *drm,
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(imx_drm_encoder_parse_of);
|
||||
|
||||
/*
|
||||
* @node: device tree node containing encoder input ports
|
||||
* @encoder: drm_encoder
|
||||
*/
|
||||
int imx_drm_encoder_get_mux_id(struct device_node *node,
|
||||
struct drm_encoder *encoder)
|
||||
{
|
||||
struct imx_drm_crtc *imx_crtc = imx_drm_find_crtc(encoder->crtc);
|
||||
struct device_node *ep;
|
||||
struct of_endpoint endpoint;
|
||||
struct device_node *port;
|
||||
int ret;
|
||||
|
||||
if (!node || !imx_crtc)
|
||||
return -EINVAL;
|
||||
|
||||
for_each_endpoint_of_node(node, ep) {
|
||||
port = of_graph_get_remote_port(ep);
|
||||
of_node_put(port);
|
||||
if (port == imx_crtc->crtc->port) {
|
||||
ret = of_graph_parse_endpoint(ep, &endpoint);
|
||||
of_node_put(ep);
|
||||
return ret ? ret : endpoint.port;
|
||||
}
|
||||
}
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(imx_drm_encoder_get_mux_id);
|
||||
|
||||
static const struct drm_ioctl_desc imx_drm_ioctls[] = {
|
||||
/* none so far */
|
||||
};
|
||||
|
|
|
@ -46,8 +46,6 @@ int imx_drm_set_bus_format_pins(struct drm_encoder *encoder,
|
|||
int imx_drm_set_bus_format(struct drm_encoder *encoder,
|
||||
u32 bus_format);
|
||||
|
||||
int imx_drm_encoder_get_mux_id(struct device_node *node,
|
||||
struct drm_encoder *encoder);
|
||||
int imx_drm_encoder_parse_of(struct drm_device *drm,
|
||||
struct drm_encoder *encoder, struct device_node *np);
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include <drm/drmP.h>
|
||||
#include <drm/drm_fb_helper.h>
|
||||
#include <drm/drm_crtc_helper.h>
|
||||
#include <drm/drm_of.h>
|
||||
#include <drm/drm_panel.h>
|
||||
#include <linux/mfd/syscon.h>
|
||||
#include <linux/mfd/syscon/imx6q-iomuxc-gpr.h>
|
||||
|
@ -215,7 +216,7 @@ static void imx_ldb_encoder_commit(struct drm_encoder *encoder)
|
|||
struct imx_ldb_channel *imx_ldb_ch = enc_to_imx_ldb_ch(encoder);
|
||||
struct imx_ldb *ldb = imx_ldb_ch->ldb;
|
||||
int dual = ldb->ldb_ctrl & LDB_SPLIT_MODE_EN;
|
||||
int mux = imx_drm_encoder_get_mux_id(imx_ldb_ch->child, encoder);
|
||||
int mux = drm_of_encoder_active_port_id(imx_ldb_ch->child, encoder);
|
||||
|
||||
drm_panel_prepare(imx_ldb_ch->panel);
|
||||
|
||||
|
@ -265,7 +266,7 @@ static void imx_ldb_encoder_mode_set(struct drm_encoder *encoder,
|
|||
int dual = ldb->ldb_ctrl & LDB_SPLIT_MODE_EN;
|
||||
unsigned long serial_clk;
|
||||
unsigned long di_clk = mode->clock * 1000;
|
||||
int mux = imx_drm_encoder_get_mux_id(imx_ldb_ch->child, encoder);
|
||||
int mux = drm_of_encoder_active_port_id(imx_ldb_ch->child, encoder);
|
||||
|
||||
if (mode->clock > 170000) {
|
||||
dev_warn(ldb->dev,
|
||||
|
|
Loading…
Reference in a new issue