forked from luck/tmp_suning_uos_patched
drm: Pass 'name' to drm_encoder_init()
Done with coccinelle for the most part. However, it thinks '...' is part of the semantic patch, so I put an 'int DOTDOTDOT' placeholder in its place and got rid of it with sed afterwards. @@ identifier dev, encoder, funcs; @@ int drm_encoder_init(struct drm_device *dev, struct drm_encoder *encoder, const struct drm_encoder_funcs *funcs, int encoder_type + ,const char *name, int DOTDOTDOT ) { ... } @@ identifier dev, encoder, funcs; @@ int drm_encoder_init(struct drm_device *dev, struct drm_encoder *encoder, const struct drm_encoder_funcs *funcs, int encoder_type + ,const char *name, int DOTDOTDOT ); @@ expression E1, E2, E3, E4; @@ drm_encoder_init(E1, E2, E3, E4 + ,NULL ) v2: Add ', or NULL...' to @name kernel doc (Jani) Annotate the function with __printf() attribute (Jani) Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1449670818-2966-1-git-send-email-ville.syrjala@linux.intel.com
This commit is contained in:
parent
b0b3b79511
commit
13a3d91f17
|
@ -3729,7 +3729,7 @@ static void dce_v10_0_encoder_add(struct amdgpu_device *adev,
|
|||
case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1:
|
||||
case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC2:
|
||||
drm_encoder_init(dev, encoder, &dce_v10_0_encoder_funcs,
|
||||
DRM_MODE_ENCODER_DAC);
|
||||
DRM_MODE_ENCODER_DAC, NULL);
|
||||
drm_encoder_helper_add(encoder, &dce_v10_0_dac_helper_funcs);
|
||||
break;
|
||||
case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1:
|
||||
|
@ -3740,15 +3740,15 @@ static void dce_v10_0_encoder_add(struct amdgpu_device *adev,
|
|||
if (amdgpu_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT)) {
|
||||
amdgpu_encoder->rmx_type = RMX_FULL;
|
||||
drm_encoder_init(dev, encoder, &dce_v10_0_encoder_funcs,
|
||||
DRM_MODE_ENCODER_LVDS);
|
||||
DRM_MODE_ENCODER_LVDS, NULL);
|
||||
amdgpu_encoder->enc_priv = amdgpu_atombios_encoder_get_lcd_info(amdgpu_encoder);
|
||||
} else if (amdgpu_encoder->devices & (ATOM_DEVICE_CRT_SUPPORT)) {
|
||||
drm_encoder_init(dev, encoder, &dce_v10_0_encoder_funcs,
|
||||
DRM_MODE_ENCODER_DAC);
|
||||
DRM_MODE_ENCODER_DAC, NULL);
|
||||
amdgpu_encoder->enc_priv = amdgpu_atombios_encoder_get_dig_info(amdgpu_encoder);
|
||||
} else {
|
||||
drm_encoder_init(dev, encoder, &dce_v10_0_encoder_funcs,
|
||||
DRM_MODE_ENCODER_TMDS);
|
||||
DRM_MODE_ENCODER_TMDS, NULL);
|
||||
amdgpu_encoder->enc_priv = amdgpu_atombios_encoder_get_dig_info(amdgpu_encoder);
|
||||
}
|
||||
drm_encoder_helper_add(encoder, &dce_v10_0_dig_helper_funcs);
|
||||
|
@ -3766,13 +3766,13 @@ static void dce_v10_0_encoder_add(struct amdgpu_device *adev,
|
|||
amdgpu_encoder->is_ext_encoder = true;
|
||||
if (amdgpu_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT))
|
||||
drm_encoder_init(dev, encoder, &dce_v10_0_encoder_funcs,
|
||||
DRM_MODE_ENCODER_LVDS);
|
||||
DRM_MODE_ENCODER_LVDS, NULL);
|
||||
else if (amdgpu_encoder->devices & (ATOM_DEVICE_CRT_SUPPORT))
|
||||
drm_encoder_init(dev, encoder, &dce_v10_0_encoder_funcs,
|
||||
DRM_MODE_ENCODER_DAC);
|
||||
DRM_MODE_ENCODER_DAC, NULL);
|
||||
else
|
||||
drm_encoder_init(dev, encoder, &dce_v10_0_encoder_funcs,
|
||||
DRM_MODE_ENCODER_TMDS);
|
||||
DRM_MODE_ENCODER_TMDS, NULL);
|
||||
drm_encoder_helper_add(encoder, &dce_v10_0_ext_helper_funcs);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -3722,7 +3722,7 @@ static void dce_v11_0_encoder_add(struct amdgpu_device *adev,
|
|||
case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1:
|
||||
case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC2:
|
||||
drm_encoder_init(dev, encoder, &dce_v11_0_encoder_funcs,
|
||||
DRM_MODE_ENCODER_DAC);
|
||||
DRM_MODE_ENCODER_DAC, NULL);
|
||||
drm_encoder_helper_add(encoder, &dce_v11_0_dac_helper_funcs);
|
||||
break;
|
||||
case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1:
|
||||
|
@ -3733,15 +3733,15 @@ static void dce_v11_0_encoder_add(struct amdgpu_device *adev,
|
|||
if (amdgpu_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT)) {
|
||||
amdgpu_encoder->rmx_type = RMX_FULL;
|
||||
drm_encoder_init(dev, encoder, &dce_v11_0_encoder_funcs,
|
||||
DRM_MODE_ENCODER_LVDS);
|
||||
DRM_MODE_ENCODER_LVDS, NULL);
|
||||
amdgpu_encoder->enc_priv = amdgpu_atombios_encoder_get_lcd_info(amdgpu_encoder);
|
||||
} else if (amdgpu_encoder->devices & (ATOM_DEVICE_CRT_SUPPORT)) {
|
||||
drm_encoder_init(dev, encoder, &dce_v11_0_encoder_funcs,
|
||||
DRM_MODE_ENCODER_DAC);
|
||||
DRM_MODE_ENCODER_DAC, NULL);
|
||||
amdgpu_encoder->enc_priv = amdgpu_atombios_encoder_get_dig_info(amdgpu_encoder);
|
||||
} else {
|
||||
drm_encoder_init(dev, encoder, &dce_v11_0_encoder_funcs,
|
||||
DRM_MODE_ENCODER_TMDS);
|
||||
DRM_MODE_ENCODER_TMDS, NULL);
|
||||
amdgpu_encoder->enc_priv = amdgpu_atombios_encoder_get_dig_info(amdgpu_encoder);
|
||||
}
|
||||
drm_encoder_helper_add(encoder, &dce_v11_0_dig_helper_funcs);
|
||||
|
@ -3759,13 +3759,13 @@ static void dce_v11_0_encoder_add(struct amdgpu_device *adev,
|
|||
amdgpu_encoder->is_ext_encoder = true;
|
||||
if (amdgpu_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT))
|
||||
drm_encoder_init(dev, encoder, &dce_v11_0_encoder_funcs,
|
||||
DRM_MODE_ENCODER_LVDS);
|
||||
DRM_MODE_ENCODER_LVDS, NULL);
|
||||
else if (amdgpu_encoder->devices & (ATOM_DEVICE_CRT_SUPPORT))
|
||||
drm_encoder_init(dev, encoder, &dce_v11_0_encoder_funcs,
|
||||
DRM_MODE_ENCODER_DAC);
|
||||
DRM_MODE_ENCODER_DAC, NULL);
|
||||
else
|
||||
drm_encoder_init(dev, encoder, &dce_v11_0_encoder_funcs,
|
||||
DRM_MODE_ENCODER_TMDS);
|
||||
DRM_MODE_ENCODER_TMDS, NULL);
|
||||
drm_encoder_helper_add(encoder, &dce_v11_0_ext_helper_funcs);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -3659,7 +3659,7 @@ static void dce_v8_0_encoder_add(struct amdgpu_device *adev,
|
|||
case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1:
|
||||
case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC2:
|
||||
drm_encoder_init(dev, encoder, &dce_v8_0_encoder_funcs,
|
||||
DRM_MODE_ENCODER_DAC);
|
||||
DRM_MODE_ENCODER_DAC, NULL);
|
||||
drm_encoder_helper_add(encoder, &dce_v8_0_dac_helper_funcs);
|
||||
break;
|
||||
case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1:
|
||||
|
@ -3670,15 +3670,15 @@ static void dce_v8_0_encoder_add(struct amdgpu_device *adev,
|
|||
if (amdgpu_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT)) {
|
||||
amdgpu_encoder->rmx_type = RMX_FULL;
|
||||
drm_encoder_init(dev, encoder, &dce_v8_0_encoder_funcs,
|
||||
DRM_MODE_ENCODER_LVDS);
|
||||
DRM_MODE_ENCODER_LVDS, NULL);
|
||||
amdgpu_encoder->enc_priv = amdgpu_atombios_encoder_get_lcd_info(amdgpu_encoder);
|
||||
} else if (amdgpu_encoder->devices & (ATOM_DEVICE_CRT_SUPPORT)) {
|
||||
drm_encoder_init(dev, encoder, &dce_v8_0_encoder_funcs,
|
||||
DRM_MODE_ENCODER_DAC);
|
||||
DRM_MODE_ENCODER_DAC, NULL);
|
||||
amdgpu_encoder->enc_priv = amdgpu_atombios_encoder_get_dig_info(amdgpu_encoder);
|
||||
} else {
|
||||
drm_encoder_init(dev, encoder, &dce_v8_0_encoder_funcs,
|
||||
DRM_MODE_ENCODER_TMDS);
|
||||
DRM_MODE_ENCODER_TMDS, NULL);
|
||||
amdgpu_encoder->enc_priv = amdgpu_atombios_encoder_get_dig_info(amdgpu_encoder);
|
||||
}
|
||||
drm_encoder_helper_add(encoder, &dce_v8_0_dig_helper_funcs);
|
||||
|
@ -3696,13 +3696,13 @@ static void dce_v8_0_encoder_add(struct amdgpu_device *adev,
|
|||
amdgpu_encoder->is_ext_encoder = true;
|
||||
if (amdgpu_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT))
|
||||
drm_encoder_init(dev, encoder, &dce_v8_0_encoder_funcs,
|
||||
DRM_MODE_ENCODER_LVDS);
|
||||
DRM_MODE_ENCODER_LVDS, NULL);
|
||||
else if (amdgpu_encoder->devices & (ATOM_DEVICE_CRT_SUPPORT))
|
||||
drm_encoder_init(dev, encoder, &dce_v8_0_encoder_funcs,
|
||||
DRM_MODE_ENCODER_DAC);
|
||||
DRM_MODE_ENCODER_DAC, NULL);
|
||||
else
|
||||
drm_encoder_init(dev, encoder, &dce_v8_0_encoder_funcs,
|
||||
DRM_MODE_ENCODER_TMDS);
|
||||
DRM_MODE_ENCODER_TMDS, NULL);
|
||||
drm_encoder_helper_add(encoder, &dce_v8_0_ext_helper_funcs);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -751,7 +751,7 @@ static int ast_encoder_init(struct drm_device *dev)
|
|||
return -ENOMEM;
|
||||
|
||||
drm_encoder_init(dev, &ast_encoder->base, &ast_enc_funcs,
|
||||
DRM_MODE_ENCODER_DAC);
|
||||
DRM_MODE_ENCODER_DAC, NULL);
|
||||
drm_encoder_helper_add(&ast_encoder->base, &ast_enc_helper_funcs);
|
||||
|
||||
ast_encoder->base.possible_crtcs = 1;
|
||||
|
|
|
@ -256,7 +256,7 @@ static int atmel_hlcdc_create_panel_output(struct drm_device *dev,
|
|||
&atmel_hlcdc_panel_encoder_helper_funcs);
|
||||
ret = drm_encoder_init(dev, &panel->base.encoder,
|
||||
&atmel_hlcdc_panel_encoder_funcs,
|
||||
DRM_MODE_ENCODER_LVDS);
|
||||
DRM_MODE_ENCODER_LVDS, NULL);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
|
|
@ -196,7 +196,7 @@ static void bochs_encoder_init(struct drm_device *dev)
|
|||
|
||||
encoder->possible_crtcs = 0x1;
|
||||
drm_encoder_init(dev, encoder, &bochs_encoder_encoder_funcs,
|
||||
DRM_MODE_ENCODER_DAC);
|
||||
DRM_MODE_ENCODER_DAC, NULL);
|
||||
drm_encoder_helper_add(encoder, &bochs_encoder_helper_funcs);
|
||||
}
|
||||
|
||||
|
|
|
@ -489,7 +489,7 @@ static struct drm_encoder *cirrus_encoder_init(struct drm_device *dev)
|
|||
encoder->possible_crtcs = 0x1;
|
||||
|
||||
drm_encoder_init(dev, encoder, &cirrus_encoder_encoder_funcs,
|
||||
DRM_MODE_ENCODER_DAC);
|
||||
DRM_MODE_ENCODER_DAC, NULL);
|
||||
drm_encoder_helper_add(encoder, &cirrus_encoder_helper_funcs);
|
||||
|
||||
return encoder;
|
||||
|
|
|
@ -1077,6 +1077,7 @@ EXPORT_SYMBOL(drm_connector_unplug_all);
|
|||
* @encoder: the encoder to init
|
||||
* @funcs: callbacks for this encoder
|
||||
* @encoder_type: user visible type of the encoder
|
||||
* @name: printf style format string for the encoder name, or NULL for default name
|
||||
*
|
||||
* Initialises a preallocated encoder. Encoder should be
|
||||
* subclassed as part of driver encoder objects.
|
||||
|
@ -1087,7 +1088,7 @@ EXPORT_SYMBOL(drm_connector_unplug_all);
|
|||
int drm_encoder_init(struct drm_device *dev,
|
||||
struct drm_encoder *encoder,
|
||||
const struct drm_encoder_funcs *funcs,
|
||||
int encoder_type)
|
||||
int encoder_type, const char *name, ...)
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
|
|
@ -1313,7 +1313,7 @@ static int exynos_dp_bind(struct device *dev, struct device *master, void *data)
|
|||
DRM_DEBUG_KMS("possible_crtcs = 0x%x\n", encoder->possible_crtcs);
|
||||
|
||||
drm_encoder_init(drm_dev, encoder, &exynos_dp_encoder_funcs,
|
||||
DRM_MODE_ENCODER_TMDS);
|
||||
DRM_MODE_ENCODER_TMDS, NULL);
|
||||
|
||||
drm_encoder_helper_add(encoder, &exynos_dp_encoder_helper_funcs);
|
||||
|
||||
|
|
|
@ -309,7 +309,7 @@ int exynos_dpi_bind(struct drm_device *dev, struct drm_encoder *encoder)
|
|||
DRM_DEBUG_KMS("possible_crtcs = 0x%x\n", encoder->possible_crtcs);
|
||||
|
||||
drm_encoder_init(dev, encoder, &exynos_dpi_encoder_funcs,
|
||||
DRM_MODE_ENCODER_TMDS);
|
||||
DRM_MODE_ENCODER_TMDS, NULL);
|
||||
|
||||
drm_encoder_helper_add(encoder, &exynos_dpi_encoder_helper_funcs);
|
||||
|
||||
|
|
|
@ -1831,7 +1831,7 @@ static int exynos_dsi_bind(struct device *dev, struct device *master,
|
|||
DRM_DEBUG_KMS("possible_crtcs = 0x%x\n", encoder->possible_crtcs);
|
||||
|
||||
drm_encoder_init(drm_dev, encoder, &exynos_dsi_encoder_funcs,
|
||||
DRM_MODE_ENCODER_TMDS);
|
||||
DRM_MODE_ENCODER_TMDS, NULL);
|
||||
|
||||
drm_encoder_helper_add(encoder, &exynos_dsi_encoder_helper_funcs);
|
||||
|
||||
|
|
|
@ -473,7 +473,7 @@ static int vidi_bind(struct device *dev, struct device *master, void *data)
|
|||
DRM_DEBUG_KMS("possible_crtcs = 0x%x\n", encoder->possible_crtcs);
|
||||
|
||||
drm_encoder_init(drm_dev, encoder, &exynos_vidi_encoder_funcs,
|
||||
DRM_MODE_ENCODER_TMDS);
|
||||
DRM_MODE_ENCODER_TMDS, NULL);
|
||||
|
||||
drm_encoder_helper_add(encoder, &exynos_vidi_encoder_helper_funcs);
|
||||
|
||||
|
|
|
@ -1793,7 +1793,7 @@ static int hdmi_bind(struct device *dev, struct device *master, void *data)
|
|||
DRM_DEBUG_KMS("possible_crtcs = 0x%x\n", encoder->possible_crtcs);
|
||||
|
||||
drm_encoder_init(drm_dev, encoder, &exynos_hdmi_encoder_funcs,
|
||||
DRM_MODE_ENCODER_TMDS);
|
||||
DRM_MODE_ENCODER_TMDS, NULL);
|
||||
|
||||
drm_encoder_helper_add(encoder, &exynos_hdmi_encoder_helper_funcs);
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ int fsl_dcu_drm_encoder_create(struct fsl_dcu_drm_device *fsl_dev,
|
|||
|
||||
encoder->possible_crtcs = 1;
|
||||
ret = drm_encoder_init(fsl_dev->drm, encoder, &encoder_funcs,
|
||||
DRM_MODE_ENCODER_LVDS);
|
||||
DRM_MODE_ENCODER_LVDS, NULL);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
|
|
@ -273,7 +273,7 @@ void cdv_intel_crt_init(struct drm_device *dev,
|
|||
|
||||
encoder = &gma_encoder->base;
|
||||
drm_encoder_init(dev, encoder,
|
||||
&cdv_intel_crt_enc_funcs, DRM_MODE_ENCODER_DAC);
|
||||
&cdv_intel_crt_enc_funcs, DRM_MODE_ENCODER_DAC, NULL);
|
||||
|
||||
gma_connector_attach_encoder(gma_connector, gma_encoder);
|
||||
|
||||
|
|
|
@ -2020,7 +2020,8 @@ cdv_intel_dp_init(struct drm_device *dev, struct psb_intel_mode_device *mode_dev
|
|||
encoder = &gma_encoder->base;
|
||||
|
||||
drm_connector_init(dev, connector, &cdv_intel_dp_connector_funcs, type);
|
||||
drm_encoder_init(dev, encoder, &cdv_intel_dp_enc_funcs, DRM_MODE_ENCODER_TMDS);
|
||||
drm_encoder_init(dev, encoder, &cdv_intel_dp_enc_funcs,
|
||||
DRM_MODE_ENCODER_TMDS, NULL);
|
||||
|
||||
gma_connector_attach_encoder(gma_connector, gma_encoder);
|
||||
|
||||
|
|
|
@ -313,7 +313,7 @@ void cdv_hdmi_init(struct drm_device *dev,
|
|||
DRM_MODE_CONNECTOR_DVID);
|
||||
|
||||
drm_encoder_init(dev, encoder, &psb_intel_lvds_enc_funcs,
|
||||
DRM_MODE_ENCODER_TMDS);
|
||||
DRM_MODE_ENCODER_TMDS, NULL);
|
||||
|
||||
gma_connector_attach_encoder(gma_connector, gma_encoder);
|
||||
gma_encoder->type = INTEL_OUTPUT_HDMI;
|
||||
|
|
|
@ -652,7 +652,7 @@ void cdv_intel_lvds_init(struct drm_device *dev,
|
|||
|
||||
drm_encoder_init(dev, encoder,
|
||||
&cdv_intel_lvds_enc_funcs,
|
||||
DRM_MODE_ENCODER_LVDS);
|
||||
DRM_MODE_ENCODER_LVDS, NULL);
|
||||
|
||||
|
||||
gma_connector_attach_encoder(gma_connector, gma_encoder);
|
||||
|
|
|
@ -994,7 +994,7 @@ struct mdfld_dsi_encoder *mdfld_dsi_dpi_init(struct drm_device *dev,
|
|||
drm_encoder_init(dev,
|
||||
encoder,
|
||||
p_funcs->encoder_funcs,
|
||||
DRM_MODE_ENCODER_LVDS);
|
||||
DRM_MODE_ENCODER_LVDS, NULL);
|
||||
drm_encoder_helper_add(encoder,
|
||||
p_funcs->encoder_helper_funcs);
|
||||
|
||||
|
|
|
@ -654,7 +654,7 @@ void oaktrail_hdmi_init(struct drm_device *dev,
|
|||
|
||||
drm_encoder_init(dev, encoder,
|
||||
&oaktrail_hdmi_enc_funcs,
|
||||
DRM_MODE_ENCODER_TMDS);
|
||||
DRM_MODE_ENCODER_TMDS, NULL);
|
||||
|
||||
gma_connector_attach_encoder(gma_connector, gma_encoder);
|
||||
|
||||
|
|
|
@ -323,7 +323,7 @@ void oaktrail_lvds_init(struct drm_device *dev,
|
|||
DRM_MODE_CONNECTOR_LVDS);
|
||||
|
||||
drm_encoder_init(dev, encoder, &psb_intel_lvds_enc_funcs,
|
||||
DRM_MODE_ENCODER_LVDS);
|
||||
DRM_MODE_ENCODER_LVDS, NULL);
|
||||
|
||||
gma_connector_attach_encoder(gma_connector, gma_encoder);
|
||||
gma_encoder->type = INTEL_OUTPUT_LVDS;
|
||||
|
|
|
@ -723,7 +723,7 @@ void psb_intel_lvds_init(struct drm_device *dev,
|
|||
|
||||
drm_encoder_init(dev, encoder,
|
||||
&psb_intel_lvds_enc_funcs,
|
||||
DRM_MODE_ENCODER_LVDS);
|
||||
DRM_MODE_ENCODER_LVDS, NULL);
|
||||
|
||||
gma_connector_attach_encoder(gma_connector, gma_encoder);
|
||||
gma_encoder->type = INTEL_OUTPUT_LVDS;
|
||||
|
|
|
@ -2526,7 +2526,8 @@ bool psb_intel_sdvo_init(struct drm_device *dev, int sdvo_reg)
|
|||
/* encoder type will be decided later */
|
||||
gma_encoder = &psb_intel_sdvo->base;
|
||||
gma_encoder->type = INTEL_OUTPUT_SDVO;
|
||||
drm_encoder_init(dev, &gma_encoder->base, &psb_intel_sdvo_enc_funcs, 0);
|
||||
drm_encoder_init(dev, &gma_encoder->base, &psb_intel_sdvo_enc_funcs,
|
||||
0, NULL);
|
||||
|
||||
/* Read the regs to test if we can talk to the device */
|
||||
for (i = 0; i < 0x40; i++) {
|
||||
|
|
|
@ -1423,7 +1423,7 @@ static int tda998x_bind(struct device *dev, struct device *master, void *data)
|
|||
|
||||
drm_encoder_helper_add(&priv->encoder, &tda998x_encoder_helper_funcs);
|
||||
ret = drm_encoder_init(drm, &priv->encoder, &tda998x_encoder_funcs,
|
||||
DRM_MODE_ENCODER_TMDS);
|
||||
DRM_MODE_ENCODER_TMDS, NULL);
|
||||
if (ret)
|
||||
goto err_encoder;
|
||||
|
||||
|
|
|
@ -798,7 +798,7 @@ void intel_crt_init(struct drm_device *dev)
|
|||
&intel_crt_connector_funcs, DRM_MODE_CONNECTOR_VGA);
|
||||
|
||||
drm_encoder_init(dev, &crt->base.base, &intel_crt_enc_funcs,
|
||||
DRM_MODE_ENCODER_DAC);
|
||||
DRM_MODE_ENCODER_DAC, NULL);
|
||||
|
||||
intel_connector_attach_encoder(intel_connector, &crt->base);
|
||||
|
||||
|
|
|
@ -3284,7 +3284,7 @@ void intel_ddi_init(struct drm_device *dev, enum port port)
|
|||
encoder = &intel_encoder->base;
|
||||
|
||||
drm_encoder_init(dev, encoder, &intel_ddi_funcs,
|
||||
DRM_MODE_ENCODER_TMDS);
|
||||
DRM_MODE_ENCODER_TMDS, NULL);
|
||||
|
||||
intel_encoder->compute_config = intel_ddi_compute_config;
|
||||
intel_encoder->enable = intel_enable_ddi;
|
||||
|
|
|
@ -5977,7 +5977,7 @@ intel_dp_init(struct drm_device *dev,
|
|||
encoder = &intel_encoder->base;
|
||||
|
||||
drm_encoder_init(dev, &intel_encoder->base, &intel_dp_enc_funcs,
|
||||
DRM_MODE_ENCODER_TMDS);
|
||||
DRM_MODE_ENCODER_TMDS, NULL);
|
||||
|
||||
intel_encoder->compute_config = intel_dp_compute_config;
|
||||
intel_encoder->disable = intel_disable_dp;
|
||||
|
|
|
@ -536,7 +536,7 @@ intel_dp_create_fake_mst_encoder(struct intel_digital_port *intel_dig_port, enum
|
|||
intel_mst->primary = intel_dig_port;
|
||||
|
||||
drm_encoder_init(dev, &intel_encoder->base, &intel_dp_mst_enc_funcs,
|
||||
DRM_MODE_ENCODER_DPMST);
|
||||
DRM_MODE_ENCODER_DPMST, NULL);
|
||||
|
||||
intel_encoder->type = INTEL_OUTPUT_DP_MST;
|
||||
intel_encoder->crtc_mask = 0x7;
|
||||
|
|
|
@ -1152,7 +1152,8 @@ void intel_dsi_init(struct drm_device *dev)
|
|||
|
||||
connector = &intel_connector->base;
|
||||
|
||||
drm_encoder_init(dev, encoder, &intel_dsi_funcs, DRM_MODE_ENCODER_DSI);
|
||||
drm_encoder_init(dev, encoder, &intel_dsi_funcs, DRM_MODE_ENCODER_DSI,
|
||||
NULL);
|
||||
|
||||
/* XXX: very likely not all of these are needed */
|
||||
intel_encoder->compute_config = intel_dsi_compute_config;
|
||||
|
|
|
@ -429,7 +429,7 @@ void intel_dvo_init(struct drm_device *dev)
|
|||
|
||||
intel_encoder = &intel_dvo->base;
|
||||
drm_encoder_init(dev, &intel_encoder->base,
|
||||
&intel_dvo_enc_funcs, encoder_type);
|
||||
&intel_dvo_enc_funcs, encoder_type, NULL);
|
||||
|
||||
intel_encoder->disable = intel_disable_dvo;
|
||||
intel_encoder->enable = intel_enable_dvo;
|
||||
|
|
|
@ -2165,7 +2165,7 @@ void intel_hdmi_init(struct drm_device *dev,
|
|||
intel_encoder = &intel_dig_port->base;
|
||||
|
||||
drm_encoder_init(dev, &intel_encoder->base, &intel_hdmi_enc_funcs,
|
||||
DRM_MODE_ENCODER_TMDS);
|
||||
DRM_MODE_ENCODER_TMDS, NULL);
|
||||
|
||||
intel_encoder->compute_config = intel_hdmi_compute_config;
|
||||
if (HAS_PCH_SPLIT(dev)) {
|
||||
|
|
|
@ -1025,7 +1025,7 @@ void intel_lvds_init(struct drm_device *dev)
|
|||
DRM_MODE_CONNECTOR_LVDS);
|
||||
|
||||
drm_encoder_init(dev, &intel_encoder->base, &intel_lvds_enc_funcs,
|
||||
DRM_MODE_ENCODER_LVDS);
|
||||
DRM_MODE_ENCODER_LVDS, NULL);
|
||||
|
||||
intel_encoder->enable = intel_enable_lvds;
|
||||
intel_encoder->pre_enable = intel_pre_enable_lvds;
|
||||
|
|
|
@ -2978,7 +2978,8 @@ bool intel_sdvo_init(struct drm_device *dev,
|
|||
/* encoder type will be decided later */
|
||||
intel_encoder = &intel_sdvo->base;
|
||||
intel_encoder->type = INTEL_OUTPUT_SDVO;
|
||||
drm_encoder_init(dev, &intel_encoder->base, &intel_sdvo_enc_funcs, 0);
|
||||
drm_encoder_init(dev, &intel_encoder->base, &intel_sdvo_enc_funcs, 0,
|
||||
NULL);
|
||||
|
||||
/* Read the regs to test if we can talk to the device */
|
||||
for (i = 0; i < 0x40; i++) {
|
||||
|
|
|
@ -1645,7 +1645,7 @@ intel_tv_init(struct drm_device *dev)
|
|||
DRM_MODE_CONNECTOR_SVIDEO);
|
||||
|
||||
drm_encoder_init(dev, &intel_encoder->base, &intel_tv_enc_funcs,
|
||||
DRM_MODE_ENCODER_TVDAC);
|
||||
DRM_MODE_ENCODER_TVDAC, NULL);
|
||||
|
||||
intel_encoder->compute_config = intel_tv_compute_config;
|
||||
intel_encoder->get_config = intel_tv_get_config;
|
||||
|
|
|
@ -251,7 +251,7 @@ static int dw_hdmi_imx_bind(struct device *dev, struct device *master,
|
|||
|
||||
drm_encoder_helper_add(encoder, &dw_hdmi_imx_encoder_helper_funcs);
|
||||
drm_encoder_init(drm, encoder, &dw_hdmi_imx_encoder_funcs,
|
||||
DRM_MODE_ENCODER_TMDS);
|
||||
DRM_MODE_ENCODER_TMDS, NULL);
|
||||
|
||||
return dw_hdmi_bind(dev, master, data, encoder, iores, irq, plat_data);
|
||||
}
|
||||
|
|
|
@ -422,7 +422,7 @@ static int imx_ldb_register(struct drm_device *drm,
|
|||
drm_encoder_helper_add(&imx_ldb_ch->encoder,
|
||||
&imx_ldb_encoder_helper_funcs);
|
||||
drm_encoder_init(drm, &imx_ldb_ch->encoder, &imx_ldb_encoder_funcs,
|
||||
DRM_MODE_ENCODER_LVDS);
|
||||
DRM_MODE_ENCODER_LVDS, NULL);
|
||||
|
||||
drm_connector_helper_add(&imx_ldb_ch->connector,
|
||||
&imx_ldb_connector_helper_funcs);
|
||||
|
|
|
@ -508,7 +508,7 @@ static int imx_tve_register(struct drm_device *drm, struct imx_tve *tve)
|
|||
|
||||
drm_encoder_helper_add(&tve->encoder, &imx_tve_encoder_helper_funcs);
|
||||
drm_encoder_init(drm, &tve->encoder, &imx_tve_encoder_funcs,
|
||||
encoder_type);
|
||||
encoder_type, NULL);
|
||||
|
||||
drm_connector_helper_add(&tve->connector,
|
||||
&imx_tve_connector_helper_funcs);
|
||||
|
|
|
@ -192,7 +192,7 @@ static int imx_pd_register(struct drm_device *drm,
|
|||
|
||||
drm_encoder_helper_add(&imxpd->encoder, &imx_pd_encoder_helper_funcs);
|
||||
drm_encoder_init(drm, &imxpd->encoder, &imx_pd_encoder_funcs,
|
||||
DRM_MODE_ENCODER_NONE);
|
||||
DRM_MODE_ENCODER_NONE, NULL);
|
||||
|
||||
drm_connector_helper_add(&imxpd->connector,
|
||||
&imx_pd_connector_helper_funcs);
|
||||
|
|
|
@ -1538,7 +1538,7 @@ static struct drm_encoder *mga_encoder_init(struct drm_device *dev)
|
|||
encoder->possible_crtcs = 0x1;
|
||||
|
||||
drm_encoder_init(dev, encoder, &mga_encoder_encoder_funcs,
|
||||
DRM_MODE_ENCODER_DAC);
|
||||
DRM_MODE_ENCODER_DAC, NULL);
|
||||
drm_encoder_helper_add(encoder, &mga_encoder_helper_funcs);
|
||||
|
||||
return encoder;
|
||||
|
|
|
@ -262,7 +262,7 @@ struct drm_encoder *mdp4_dtv_encoder_init(struct drm_device *dev)
|
|||
encoder = &mdp4_dtv_encoder->base;
|
||||
|
||||
drm_encoder_init(dev, encoder, &mdp4_dtv_encoder_funcs,
|
||||
DRM_MODE_ENCODER_TMDS);
|
||||
DRM_MODE_ENCODER_TMDS, NULL);
|
||||
drm_encoder_helper_add(encoder, &mdp4_dtv_encoder_helper_funcs);
|
||||
|
||||
mdp4_dtv_encoder->src_clk = devm_clk_get(dev->dev, "src_clk");
|
||||
|
|
|
@ -460,7 +460,7 @@ struct drm_encoder *mdp4_lcdc_encoder_init(struct drm_device *dev,
|
|||
encoder = &mdp4_lcdc_encoder->base;
|
||||
|
||||
drm_encoder_init(dev, encoder, &mdp4_lcdc_encoder_funcs,
|
||||
DRM_MODE_ENCODER_LVDS);
|
||||
DRM_MODE_ENCODER_LVDS, NULL);
|
||||
drm_encoder_helper_add(encoder, &mdp4_lcdc_encoder_helper_funcs);
|
||||
|
||||
/* TODO: do we need different pll in other cases? */
|
||||
|
|
|
@ -326,7 +326,7 @@ struct drm_encoder *mdp5_cmd_encoder_init(struct drm_device *dev,
|
|||
mdp5_cmd_enc->ctl = ctl;
|
||||
|
||||
drm_encoder_init(dev, encoder, &mdp5_cmd_encoder_funcs,
|
||||
DRM_MODE_ENCODER_DSI);
|
||||
DRM_MODE_ENCODER_DSI, NULL);
|
||||
|
||||
drm_encoder_helper_add(encoder, &mdp5_cmd_encoder_helper_funcs);
|
||||
|
||||
|
|
|
@ -354,7 +354,7 @@ struct drm_encoder *mdp5_encoder_init(struct drm_device *dev,
|
|||
|
||||
spin_lock_init(&mdp5_encoder->intf_lock);
|
||||
|
||||
drm_encoder_init(dev, encoder, &mdp5_encoder_funcs, enc_type);
|
||||
drm_encoder_init(dev, encoder, &mdp5_encoder_funcs, enc_type, NULL);
|
||||
|
||||
drm_encoder_helper_add(encoder, &mdp5_encoder_helper_funcs);
|
||||
|
||||
|
|
|
@ -549,7 +549,8 @@ nv04_dac_create(struct drm_connector *connector, struct dcb_output *entry)
|
|||
else
|
||||
helper = &nv04_dac_helper_funcs;
|
||||
|
||||
drm_encoder_init(dev, encoder, &nv04_dac_funcs, DRM_MODE_ENCODER_DAC);
|
||||
drm_encoder_init(dev, encoder, &nv04_dac_funcs, DRM_MODE_ENCODER_DAC,
|
||||
NULL);
|
||||
drm_encoder_helper_add(encoder, helper);
|
||||
|
||||
encoder->possible_crtcs = entry->heads;
|
||||
|
|
|
@ -705,7 +705,7 @@ nv04_dfp_create(struct drm_connector *connector, struct dcb_output *entry)
|
|||
nv_encoder->dcb = entry;
|
||||
nv_encoder->or = ffs(entry->or) - 1;
|
||||
|
||||
drm_encoder_init(connector->dev, encoder, &nv04_dfp_funcs, type);
|
||||
drm_encoder_init(connector->dev, encoder, &nv04_dfp_funcs, type, NULL);
|
||||
drm_encoder_helper_add(encoder, helper);
|
||||
|
||||
encoder->possible_crtcs = entry->heads;
|
||||
|
|
|
@ -223,7 +223,8 @@ nv04_tv_create(struct drm_connector *connector, struct dcb_output *entry)
|
|||
/* Initialize the common members */
|
||||
encoder = to_drm_encoder(nv_encoder);
|
||||
|
||||
drm_encoder_init(dev, encoder, &nv04_tv_funcs, DRM_MODE_ENCODER_TVDAC);
|
||||
drm_encoder_init(dev, encoder, &nv04_tv_funcs, DRM_MODE_ENCODER_TVDAC,
|
||||
NULL);
|
||||
drm_encoder_helper_add(encoder, &nv04_tv_helper_funcs);
|
||||
|
||||
nv_encoder->enc_save = drm_i2c_encoder_save;
|
||||
|
|
|
@ -814,7 +814,8 @@ nv17_tv_create(struct drm_connector *connector, struct dcb_output *entry)
|
|||
tv_enc->base.dcb = entry;
|
||||
tv_enc->base.or = ffs(entry->or) - 1;
|
||||
|
||||
drm_encoder_init(dev, encoder, &nv17_tv_funcs, DRM_MODE_ENCODER_TVDAC);
|
||||
drm_encoder_init(dev, encoder, &nv17_tv_funcs, DRM_MODE_ENCODER_TVDAC,
|
||||
NULL);
|
||||
drm_encoder_helper_add(encoder, &nv17_tv_helper_funcs);
|
||||
to_encoder_slave(encoder)->slave_funcs = &nv17_tv_slave_funcs;
|
||||
|
||||
|
|
|
@ -1718,7 +1718,7 @@ nv50_dac_create(struct drm_connector *connector, struct dcb_output *dcbe)
|
|||
encoder = to_drm_encoder(nv_encoder);
|
||||
encoder->possible_crtcs = dcbe->heads;
|
||||
encoder->possible_clones = 0;
|
||||
drm_encoder_init(connector->dev, encoder, &nv50_dac_func, type);
|
||||
drm_encoder_init(connector->dev, encoder, &nv50_dac_func, type, NULL);
|
||||
drm_encoder_helper_add(encoder, &nv50_dac_hfunc);
|
||||
|
||||
drm_mode_connector_attach_encoder(connector, encoder);
|
||||
|
@ -2126,7 +2126,7 @@ nv50_sor_create(struct drm_connector *connector, struct dcb_output *dcbe)
|
|||
encoder = to_drm_encoder(nv_encoder);
|
||||
encoder->possible_crtcs = dcbe->heads;
|
||||
encoder->possible_clones = 0;
|
||||
drm_encoder_init(connector->dev, encoder, &nv50_sor_func, type);
|
||||
drm_encoder_init(connector->dev, encoder, &nv50_sor_func, type, NULL);
|
||||
drm_encoder_helper_add(encoder, &nv50_sor_hfunc);
|
||||
|
||||
drm_mode_connector_attach_encoder(connector, encoder);
|
||||
|
@ -2306,7 +2306,7 @@ nv50_pior_create(struct drm_connector *connector, struct dcb_output *dcbe)
|
|||
encoder = to_drm_encoder(nv_encoder);
|
||||
encoder->possible_crtcs = dcbe->heads;
|
||||
encoder->possible_clones = 0;
|
||||
drm_encoder_init(connector->dev, encoder, &nv50_pior_func, type);
|
||||
drm_encoder_init(connector->dev, encoder, &nv50_pior_func, type, NULL);
|
||||
drm_encoder_helper_add(encoder, &nv50_pior_hfunc);
|
||||
|
||||
drm_mode_connector_attach_encoder(connector, encoder);
|
||||
|
|
|
@ -178,7 +178,7 @@ struct drm_encoder *omap_encoder_init(struct drm_device *dev,
|
|||
encoder = &omap_encoder->base;
|
||||
|
||||
drm_encoder_init(dev, encoder, &omap_encoder_funcs,
|
||||
DRM_MODE_ENCODER_TMDS);
|
||||
DRM_MODE_ENCODER_TMDS, NULL);
|
||||
drm_encoder_helper_add(encoder, &omap_encoder_helper_funcs);
|
||||
|
||||
return encoder;
|
||||
|
|
|
@ -968,7 +968,7 @@ static int qdev_output_init(struct drm_device *dev, int num_output)
|
|||
&qxl_connector_funcs, DRM_MODE_CONNECTOR_VIRTUAL);
|
||||
|
||||
drm_encoder_init(dev, &qxl_output->enc, &qxl_enc_funcs,
|
||||
DRM_MODE_ENCODER_VIRTUAL);
|
||||
DRM_MODE_ENCODER_VIRTUAL, NULL);
|
||||
|
||||
/* we get HPD via client monitors config */
|
||||
connector->polled = DRM_CONNECTOR_POLL_HPD;
|
||||
|
|
|
@ -2767,23 +2767,27 @@ radeon_add_atom_encoder(struct drm_device *dev,
|
|||
case ENCODER_OBJECT_ID_INTERNAL_LVTM1:
|
||||
if (radeon_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT)) {
|
||||
radeon_encoder->rmx_type = RMX_FULL;
|
||||
drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs, DRM_MODE_ENCODER_LVDS);
|
||||
drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs,
|
||||
DRM_MODE_ENCODER_LVDS, NULL);
|
||||
radeon_encoder->enc_priv = radeon_atombios_get_lvds_info(radeon_encoder);
|
||||
} else {
|
||||
drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs, DRM_MODE_ENCODER_TMDS);
|
||||
drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs,
|
||||
DRM_MODE_ENCODER_TMDS, NULL);
|
||||
radeon_encoder->enc_priv = radeon_atombios_set_dig_info(radeon_encoder);
|
||||
}
|
||||
drm_encoder_helper_add(encoder, &radeon_atom_dig_helper_funcs);
|
||||
break;
|
||||
case ENCODER_OBJECT_ID_INTERNAL_DAC1:
|
||||
drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs, DRM_MODE_ENCODER_DAC);
|
||||
drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs,
|
||||
DRM_MODE_ENCODER_DAC, NULL);
|
||||
radeon_encoder->enc_priv = radeon_atombios_set_dac_info(radeon_encoder);
|
||||
drm_encoder_helper_add(encoder, &radeon_atom_dac_helper_funcs);
|
||||
break;
|
||||
case ENCODER_OBJECT_ID_INTERNAL_DAC2:
|
||||
case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1:
|
||||
case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC2:
|
||||
drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs, DRM_MODE_ENCODER_TVDAC);
|
||||
drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs,
|
||||
DRM_MODE_ENCODER_TVDAC, NULL);
|
||||
radeon_encoder->enc_priv = radeon_atombios_set_dac_info(radeon_encoder);
|
||||
drm_encoder_helper_add(encoder, &radeon_atom_dac_helper_funcs);
|
||||
break;
|
||||
|
@ -2797,13 +2801,16 @@ radeon_add_atom_encoder(struct drm_device *dev,
|
|||
case ENCODER_OBJECT_ID_INTERNAL_UNIPHY3:
|
||||
if (radeon_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT)) {
|
||||
radeon_encoder->rmx_type = RMX_FULL;
|
||||
drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs, DRM_MODE_ENCODER_LVDS);
|
||||
drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs,
|
||||
DRM_MODE_ENCODER_LVDS, NULL);
|
||||
radeon_encoder->enc_priv = radeon_atombios_get_lvds_info(radeon_encoder);
|
||||
} else if (radeon_encoder->devices & (ATOM_DEVICE_CRT_SUPPORT)) {
|
||||
drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs, DRM_MODE_ENCODER_DAC);
|
||||
drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs,
|
||||
DRM_MODE_ENCODER_DAC, NULL);
|
||||
radeon_encoder->enc_priv = radeon_atombios_set_dig_info(radeon_encoder);
|
||||
} else {
|
||||
drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs, DRM_MODE_ENCODER_TMDS);
|
||||
drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs,
|
||||
DRM_MODE_ENCODER_TMDS, NULL);
|
||||
radeon_encoder->enc_priv = radeon_atombios_set_dig_info(radeon_encoder);
|
||||
}
|
||||
drm_encoder_helper_add(encoder, &radeon_atom_dig_helper_funcs);
|
||||
|
@ -2820,11 +2827,14 @@ radeon_add_atom_encoder(struct drm_device *dev,
|
|||
/* these are handled by the primary encoders */
|
||||
radeon_encoder->is_ext_encoder = true;
|
||||
if (radeon_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT))
|
||||
drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs, DRM_MODE_ENCODER_LVDS);
|
||||
drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs,
|
||||
DRM_MODE_ENCODER_LVDS, NULL);
|
||||
else if (radeon_encoder->devices & (ATOM_DEVICE_CRT_SUPPORT))
|
||||
drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs, DRM_MODE_ENCODER_DAC);
|
||||
drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs,
|
||||
DRM_MODE_ENCODER_DAC, NULL);
|
||||
else
|
||||
drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs, DRM_MODE_ENCODER_TMDS);
|
||||
drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs,
|
||||
DRM_MODE_ENCODER_TMDS, NULL);
|
||||
drm_encoder_helper_add(encoder, &radeon_atom_ext_helper_funcs);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -641,7 +641,7 @@ radeon_dp_create_fake_mst_encoder(struct radeon_connector *connector)
|
|||
}
|
||||
|
||||
drm_encoder_init(dev, &radeon_encoder->base, &radeon_dp_mst_enc_funcs,
|
||||
DRM_MODE_ENCODER_DPMST);
|
||||
DRM_MODE_ENCODER_DPMST, NULL);
|
||||
drm_encoder_helper_add(encoder, &radeon_mst_helper_funcs);
|
||||
|
||||
mst_enc = radeon_encoder->enc_priv;
|
||||
|
|
|
@ -1772,7 +1772,8 @@ radeon_add_legacy_encoder(struct drm_device *dev, uint32_t encoder_enum, uint32_
|
|||
switch (radeon_encoder->encoder_id) {
|
||||
case ENCODER_OBJECT_ID_INTERNAL_LVDS:
|
||||
encoder->possible_crtcs = 0x1;
|
||||
drm_encoder_init(dev, encoder, &radeon_legacy_lvds_enc_funcs, DRM_MODE_ENCODER_LVDS);
|
||||
drm_encoder_init(dev, encoder, &radeon_legacy_lvds_enc_funcs,
|
||||
DRM_MODE_ENCODER_LVDS, NULL);
|
||||
drm_encoder_helper_add(encoder, &radeon_legacy_lvds_helper_funcs);
|
||||
if (rdev->is_atom_bios)
|
||||
radeon_encoder->enc_priv = radeon_atombios_get_lvds_info(radeon_encoder);
|
||||
|
@ -1781,12 +1782,14 @@ radeon_add_legacy_encoder(struct drm_device *dev, uint32_t encoder_enum, uint32_
|
|||
radeon_encoder->rmx_type = RMX_FULL;
|
||||
break;
|
||||
case ENCODER_OBJECT_ID_INTERNAL_TMDS1:
|
||||
drm_encoder_init(dev, encoder, &radeon_legacy_tmds_int_enc_funcs, DRM_MODE_ENCODER_TMDS);
|
||||
drm_encoder_init(dev, encoder, &radeon_legacy_tmds_int_enc_funcs,
|
||||
DRM_MODE_ENCODER_TMDS, NULL);
|
||||
drm_encoder_helper_add(encoder, &radeon_legacy_tmds_int_helper_funcs);
|
||||
radeon_encoder->enc_priv = radeon_legacy_get_tmds_info(radeon_encoder);
|
||||
break;
|
||||
case ENCODER_OBJECT_ID_INTERNAL_DAC1:
|
||||
drm_encoder_init(dev, encoder, &radeon_legacy_primary_dac_enc_funcs, DRM_MODE_ENCODER_DAC);
|
||||
drm_encoder_init(dev, encoder, &radeon_legacy_primary_dac_enc_funcs,
|
||||
DRM_MODE_ENCODER_DAC, NULL);
|
||||
drm_encoder_helper_add(encoder, &radeon_legacy_primary_dac_helper_funcs);
|
||||
if (rdev->is_atom_bios)
|
||||
radeon_encoder->enc_priv = radeon_atombios_get_primary_dac_info(radeon_encoder);
|
||||
|
@ -1794,7 +1797,8 @@ radeon_add_legacy_encoder(struct drm_device *dev, uint32_t encoder_enum, uint32_
|
|||
radeon_encoder->enc_priv = radeon_combios_get_primary_dac_info(radeon_encoder);
|
||||
break;
|
||||
case ENCODER_OBJECT_ID_INTERNAL_DAC2:
|
||||
drm_encoder_init(dev, encoder, &radeon_legacy_tv_dac_enc_funcs, DRM_MODE_ENCODER_TVDAC);
|
||||
drm_encoder_init(dev, encoder, &radeon_legacy_tv_dac_enc_funcs,
|
||||
DRM_MODE_ENCODER_TVDAC, NULL);
|
||||
drm_encoder_helper_add(encoder, &radeon_legacy_tv_dac_helper_funcs);
|
||||
if (rdev->is_atom_bios)
|
||||
radeon_encoder->enc_priv = radeon_atombios_get_tv_dac_info(radeon_encoder);
|
||||
|
@ -1802,7 +1806,8 @@ radeon_add_legacy_encoder(struct drm_device *dev, uint32_t encoder_enum, uint32_
|
|||
radeon_encoder->enc_priv = radeon_combios_get_tv_dac_info(radeon_encoder);
|
||||
break;
|
||||
case ENCODER_OBJECT_ID_INTERNAL_DVO1:
|
||||
drm_encoder_init(dev, encoder, &radeon_legacy_tmds_ext_enc_funcs, DRM_MODE_ENCODER_TMDS);
|
||||
drm_encoder_init(dev, encoder, &radeon_legacy_tmds_ext_enc_funcs,
|
||||
DRM_MODE_ENCODER_TMDS, NULL);
|
||||
drm_encoder_helper_add(encoder, &radeon_legacy_tmds_ext_helper_funcs);
|
||||
if (!rdev->is_atom_bios)
|
||||
radeon_encoder->enc_priv = radeon_legacy_get_ext_tmds_info(radeon_encoder);
|
||||
|
|
|
@ -173,7 +173,7 @@ int rcar_du_encoder_init(struct rcar_du_device *rcdu,
|
|||
goto done;
|
||||
} else {
|
||||
ret = drm_encoder_init(rcdu->ddev, encoder, &encoder_funcs,
|
||||
encoder_type);
|
||||
encoder_type, NULL);
|
||||
if (ret < 0)
|
||||
goto done;
|
||||
|
||||
|
|
|
@ -151,7 +151,7 @@ int rcar_du_hdmienc_init(struct rcar_du_device *rcdu,
|
|||
goto error;
|
||||
|
||||
ret = drm_encoder_init(rcdu->ddev, encoder, &encoder_funcs,
|
||||
DRM_MODE_ENCODER_TMDS);
|
||||
DRM_MODE_ENCODER_TMDS, NULL);
|
||||
if (ret < 0)
|
||||
goto error;
|
||||
|
||||
|
|
|
@ -295,7 +295,7 @@ static int dw_hdmi_rockchip_bind(struct device *dev, struct device *master,
|
|||
|
||||
drm_encoder_helper_add(encoder, &dw_hdmi_rockchip_encoder_helper_funcs);
|
||||
drm_encoder_init(drm, encoder, &dw_hdmi_rockchip_encoder_funcs,
|
||||
DRM_MODE_ENCODER_TMDS);
|
||||
DRM_MODE_ENCODER_TMDS, NULL);
|
||||
|
||||
return dw_hdmi_bind(dev, master, data, encoder, iores, irq, plat_data);
|
||||
}
|
||||
|
|
|
@ -613,7 +613,7 @@ int shmob_drm_encoder_create(struct shmob_drm_device *sdev)
|
|||
encoder->possible_crtcs = 1;
|
||||
|
||||
ret = drm_encoder_init(sdev->ddev, encoder, &encoder_funcs,
|
||||
DRM_MODE_ENCODER_LVDS);
|
||||
DRM_MODE_ENCODER_LVDS, NULL);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
|
|
@ -512,7 +512,8 @@ sti_tvout_create_dvo_encoder(struct drm_device *dev,
|
|||
drm_encoder->possible_clones = 1 << 0;
|
||||
|
||||
drm_encoder_init(dev, drm_encoder,
|
||||
&sti_tvout_encoder_funcs, DRM_MODE_ENCODER_LVDS);
|
||||
&sti_tvout_encoder_funcs, DRM_MODE_ENCODER_LVDS,
|
||||
NULL);
|
||||
|
||||
drm_encoder_helper_add(drm_encoder, &sti_dvo_encoder_helper_funcs);
|
||||
|
||||
|
@ -564,7 +565,7 @@ static struct drm_encoder *sti_tvout_create_hda_encoder(struct drm_device *dev,
|
|||
drm_encoder->possible_clones = 1 << 0;
|
||||
|
||||
drm_encoder_init(dev, drm_encoder,
|
||||
&sti_tvout_encoder_funcs, DRM_MODE_ENCODER_DAC);
|
||||
&sti_tvout_encoder_funcs, DRM_MODE_ENCODER_DAC, NULL);
|
||||
|
||||
drm_encoder_helper_add(drm_encoder, &sti_hda_encoder_helper_funcs);
|
||||
|
||||
|
@ -613,7 +614,7 @@ static struct drm_encoder *sti_tvout_create_hdmi_encoder(struct drm_device *dev,
|
|||
drm_encoder->possible_clones = 1 << 1;
|
||||
|
||||
drm_encoder_init(dev, drm_encoder,
|
||||
&sti_tvout_encoder_funcs, DRM_MODE_ENCODER_TMDS);
|
||||
&sti_tvout_encoder_funcs, DRM_MODE_ENCODER_TMDS, NULL);
|
||||
|
||||
drm_encoder_helper_add(drm_encoder, &sti_hdmi_encoder_helper_funcs);
|
||||
|
||||
|
|
|
@ -1023,7 +1023,7 @@ static int tegra_dsi_init(struct host1x_client *client)
|
|||
|
||||
drm_encoder_init(drm, &dsi->output.encoder,
|
||||
&tegra_dsi_encoder_funcs,
|
||||
DRM_MODE_ENCODER_DSI);
|
||||
DRM_MODE_ENCODER_DSI, NULL);
|
||||
drm_encoder_helper_add(&dsi->output.encoder,
|
||||
&tegra_dsi_encoder_helper_funcs);
|
||||
|
||||
|
|
|
@ -1320,7 +1320,7 @@ static int tegra_hdmi_init(struct host1x_client *client)
|
|||
hdmi->output.connector.dpms = DRM_MODE_DPMS_OFF;
|
||||
|
||||
drm_encoder_init(drm, &hdmi->output.encoder, &tegra_hdmi_encoder_funcs,
|
||||
DRM_MODE_ENCODER_TMDS);
|
||||
DRM_MODE_ENCODER_TMDS, NULL);
|
||||
drm_encoder_helper_add(&hdmi->output.encoder,
|
||||
&tegra_hdmi_encoder_helper_funcs);
|
||||
|
||||
|
|
|
@ -287,7 +287,7 @@ int tegra_dc_rgb_init(struct drm_device *drm, struct tegra_dc *dc)
|
|||
output->connector.dpms = DRM_MODE_DPMS_OFF;
|
||||
|
||||
drm_encoder_init(drm, &output->encoder, &tegra_rgb_encoder_funcs,
|
||||
DRM_MODE_ENCODER_LVDS);
|
||||
DRM_MODE_ENCODER_LVDS, NULL);
|
||||
drm_encoder_helper_add(&output->encoder,
|
||||
&tegra_rgb_encoder_helper_funcs);
|
||||
|
||||
|
|
|
@ -2178,7 +2178,7 @@ static int tegra_sor_init(struct host1x_client *client)
|
|||
sor->output.connector.dpms = DRM_MODE_DPMS_OFF;
|
||||
|
||||
drm_encoder_init(drm, &sor->output.encoder, &tegra_sor_encoder_funcs,
|
||||
encoder);
|
||||
encoder, NULL);
|
||||
drm_encoder_helper_add(&sor->output.encoder, helpers);
|
||||
|
||||
drm_mode_connector_attach_encoder(&sor->output.connector,
|
||||
|
|
|
@ -128,7 +128,7 @@ static struct drm_encoder *panel_encoder_create(struct drm_device *dev,
|
|||
encoder->possible_crtcs = 1;
|
||||
|
||||
ret = drm_encoder_init(dev, encoder, &panel_encoder_funcs,
|
||||
DRM_MODE_ENCODER_LVDS);
|
||||
DRM_MODE_ENCODER_LVDS, NULL);
|
||||
if (ret < 0)
|
||||
goto fail;
|
||||
|
||||
|
|
|
@ -138,7 +138,7 @@ static struct drm_encoder *tfp410_encoder_create(struct drm_device *dev,
|
|||
encoder->possible_crtcs = 1;
|
||||
|
||||
ret = drm_encoder_init(dev, encoder, &tfp410_encoder_funcs,
|
||||
DRM_MODE_ENCODER_TMDS);
|
||||
DRM_MODE_ENCODER_TMDS, NULL);
|
||||
if (ret < 0)
|
||||
goto fail;
|
||||
|
||||
|
|
|
@ -73,7 +73,8 @@ struct drm_encoder *udl_encoder_init(struct drm_device *dev)
|
|||
if (!encoder)
|
||||
return NULL;
|
||||
|
||||
drm_encoder_init(dev, encoder, &udl_enc_funcs, DRM_MODE_ENCODER_TMDS);
|
||||
drm_encoder_init(dev, encoder, &udl_enc_funcs, DRM_MODE_ENCODER_TMDS,
|
||||
NULL);
|
||||
drm_encoder_helper_add(encoder, &udl_helper_funcs);
|
||||
encoder->possible_crtcs = 1;
|
||||
return encoder;
|
||||
|
|
|
@ -519,7 +519,7 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)
|
|||
WARN_ON_ONCE((HD_READ(VC4_HD_M_CTL) & VC4_HD_M_ENABLE) == 0);
|
||||
|
||||
drm_encoder_init(drm, hdmi->encoder, &vc4_hdmi_encoder_funcs,
|
||||
DRM_MODE_ENCODER_TMDS);
|
||||
DRM_MODE_ENCODER_TMDS, NULL);
|
||||
drm_encoder_helper_add(hdmi->encoder, &vc4_hdmi_encoder_helper_funcs);
|
||||
|
||||
hdmi->connector = vc4_hdmi_connector_init(drm, hdmi->encoder);
|
||||
|
|
|
@ -441,7 +441,7 @@ static int vgdev_output_init(struct virtio_gpu_device *vgdev, int index)
|
|||
drm_connector_helper_add(connector, &virtio_gpu_conn_helper_funcs);
|
||||
|
||||
drm_encoder_init(dev, encoder, &virtio_gpu_enc_funcs,
|
||||
DRM_MODE_ENCODER_VIRTUAL);
|
||||
DRM_MODE_ENCODER_VIRTUAL, NULL);
|
||||
drm_encoder_helper_add(encoder, &virtio_gpu_enc_helper_funcs);
|
||||
encoder->possible_crtcs = 1 << index;
|
||||
|
||||
|
|
|
@ -363,7 +363,7 @@ static int vmw_ldu_init(struct vmw_private *dev_priv, unsigned unit)
|
|||
connector->status = vmw_du_connector_detect(connector, true);
|
||||
|
||||
drm_encoder_init(dev, encoder, &vmw_legacy_encoder_funcs,
|
||||
DRM_MODE_ENCODER_VIRTUAL);
|
||||
DRM_MODE_ENCODER_VIRTUAL, NULL);
|
||||
drm_mode_connector_attach_encoder(connector, encoder);
|
||||
encoder->possible_crtcs = (1 << unit);
|
||||
encoder->possible_clones = 0;
|
||||
|
|
|
@ -597,7 +597,7 @@ static int vmw_sou_init(struct vmw_private *dev_priv, unsigned unit)
|
|||
connector->status = vmw_du_connector_detect(connector, true);
|
||||
|
||||
drm_encoder_init(dev, encoder, &vmw_screen_object_encoder_funcs,
|
||||
DRM_MODE_ENCODER_VIRTUAL);
|
||||
DRM_MODE_ENCODER_VIRTUAL, NULL);
|
||||
drm_mode_connector_attach_encoder(connector, encoder);
|
||||
encoder->possible_crtcs = (1 << unit);
|
||||
encoder->possible_clones = 0;
|
||||
|
|
|
@ -1145,7 +1145,7 @@ static int vmw_stdu_init(struct vmw_private *dev_priv, unsigned unit)
|
|||
connector->status = vmw_du_connector_detect(connector, false);
|
||||
|
||||
drm_encoder_init(dev, encoder, &vmw_stdu_encoder_funcs,
|
||||
DRM_MODE_ENCODER_VIRTUAL);
|
||||
DRM_MODE_ENCODER_VIRTUAL, NULL);
|
||||
drm_mode_connector_attach_encoder(connector, encoder);
|
||||
encoder->possible_crtcs = (1 << unit);
|
||||
encoder->possible_clones = 0;
|
||||
|
|
|
@ -2196,10 +2196,11 @@ void drm_bridge_mode_set(struct drm_bridge *bridge,
|
|||
void drm_bridge_pre_enable(struct drm_bridge *bridge);
|
||||
void drm_bridge_enable(struct drm_bridge *bridge);
|
||||
|
||||
extern int drm_encoder_init(struct drm_device *dev,
|
||||
struct drm_encoder *encoder,
|
||||
const struct drm_encoder_funcs *funcs,
|
||||
int encoder_type);
|
||||
extern __printf(5, 6)
|
||||
int drm_encoder_init(struct drm_device *dev,
|
||||
struct drm_encoder *encoder,
|
||||
const struct drm_encoder_funcs *funcs,
|
||||
int encoder_type, const char *name, ...);
|
||||
|
||||
/**
|
||||
* drm_encoder_crtc_ok - can a given crtc drive a given encoder?
|
||||
|
|
Loading…
Reference in New Issue
Block a user