[PATCH 5/7] [RFC] drm/amdgpu: drop DVO encoders support.
Harry Wentland
harry.wentland at amd.com
Thu Apr 14 14:08:01 UTC 2016
DVO was mainly used for crossfire pre-DCE 8, and possibly on some DCE 8
(Tonga) SKUs as well. On newer ASICs crossfire uses XDMA so there's no
longer a need for DVO.
It's probably safe to drop it for amdgpu. Radeon driver might still want
to keep it if there's support for it.
Harry
On 2016-04-13 10:56 PM, Dave Airlie wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> I'm a bit confused whether this is needed so it would be good to
> confirm if hw shipped with it.
>
> DAL as currently is doesn't have any support for this, it doesn't
> have any encoder ids for DVO that I can see.
>
> So before porting to DAL graphics objects, I'm removing this code,
> so we can see if any regressions land here.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
> drivers/gpu/drm/amd/amdgpu/atombios_crtc.c | 3 -
> drivers/gpu/drm/amd/amdgpu/atombios_encoders.c | 100 -------------------------
> drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 8 --
> drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 8 --
> drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 8 --
> 5 files changed, 127 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/atombios_crtc.c b/drivers/gpu/drm/amd/amdgpu/atombios_crtc.c
> index 49aa350..072a729 100644
> --- a/drivers/gpu/drm/amd/amdgpu/atombios_crtc.c
> +++ b/drivers/gpu/drm/amd/amdgpu/atombios_crtc.c
> @@ -344,9 +344,6 @@ static u32 amdgpu_atombios_crtc_adjust_pll(struct drm_crtc *crtc,
> }
> }
>
> - /* DVO wants 2x pixel clock if the DVO chip is in 12 bit mode */
> - if (amdgpu_encoder->encoder_id == ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1)
> - adjusted_clock = mode->clock * 2;
> if (amdgpu_encoder->active_device & (ATOM_DEVICE_TV_SUPPORT))
> amdgpu_crtc->pll_flags |= AMDGPU_PLL_PREFER_CLOSEST_LOWER;
> if (amdgpu_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT))
> diff --git a/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c b/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
> index 4367941..7ef93c6 100644
> --- a/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
> +++ b/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
> @@ -272,7 +272,6 @@ bool amdgpu_atombios_encoder_is_digital(struct drm_encoder *encoder)
> {
> struct amdgpu_encoder *amdgpu_encoder = to_amdgpu_encoder(encoder);
> switch (amdgpu_encoder->encoder_id) {
> - case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1:
> case ENCODER_OBJECT_ID_INTERNAL_UNIPHY:
> case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1:
> case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2:
> @@ -369,79 +368,8 @@ static u8 amdgpu_atombios_encoder_get_bpc(struct drm_encoder *encoder)
> }
> }
>
> -union dvo_encoder_control {
> - ENABLE_EXTERNAL_TMDS_ENCODER_PS_ALLOCATION ext_tmds;
> - DVO_ENCODER_CONTROL_PS_ALLOCATION dvo;
> - DVO_ENCODER_CONTROL_PS_ALLOCATION_V3 dvo_v3;
> - DVO_ENCODER_CONTROL_PS_ALLOCATION_V1_4 dvo_v4;
> -};
> -
> -static void
> -amdgpu_atombios_encoder_setup_dvo(struct drm_encoder *encoder, int action)
> -{
> - struct drm_device *dev = encoder->dev;
> - struct amdgpu_device *adev = dev->dev_private;
> - struct amdgpu_encoder *amdgpu_encoder = to_amdgpu_encoder(encoder);
> - union dvo_encoder_control args;
> - int index = GetIndexIntoMasterTable(COMMAND, DVOEncoderControl);
> - uint8_t frev, crev;
> -
> - memset(&args, 0, sizeof(args));
> -
> - if (!amdgpu_atom_parse_cmd_header(adev->mode_info.atom_context, index, &frev, &crev))
> - return;
> -
> - switch (frev) {
> - case 1:
> - switch (crev) {
> - case 1:
> - /* R4xx, R5xx */
> - args.ext_tmds.sXTmdsEncoder.ucEnable = action;
> -
> - if (amdgpu_dig_monitor_is_duallink(encoder, amdgpu_encoder->pixel_clock))
> - args.ext_tmds.sXTmdsEncoder.ucMisc |= PANEL_ENCODER_MISC_DUAL;
> -
> - args.ext_tmds.sXTmdsEncoder.ucMisc |= ATOM_PANEL_MISC_888RGB;
> - break;
> - case 2:
> - /* RS600/690/740 */
> - args.dvo.sDVOEncoder.ucAction = action;
> - args.dvo.sDVOEncoder.usPixelClock = cpu_to_le16(amdgpu_encoder->pixel_clock / 10);
> - /* DFP1, CRT1, TV1 depending on the type of port */
> - args.dvo.sDVOEncoder.ucDeviceType = ATOM_DEVICE_DFP1_INDEX;
> -
> - if (amdgpu_dig_monitor_is_duallink(encoder, amdgpu_encoder->pixel_clock))
> - args.dvo.sDVOEncoder.usDevAttr.sDigAttrib.ucAttribute |= PANEL_ENCODER_MISC_DUAL;
> - break;
> - case 3:
> - /* R6xx */
> - args.dvo_v3.ucAction = action;
> - args.dvo_v3.usPixelClock = cpu_to_le16(amdgpu_encoder->pixel_clock / 10);
> - args.dvo_v3.ucDVOConfig = 0; /* XXX */
> - break;
> - case 4:
> - /* DCE8 */
> - args.dvo_v4.ucAction = action;
> - args.dvo_v4.usPixelClock = cpu_to_le16(amdgpu_encoder->pixel_clock / 10);
> - args.dvo_v4.ucDVOConfig = 0; /* XXX */
> - args.dvo_v4.ucBitPerColor = amdgpu_atombios_encoder_get_bpc(encoder);
> - break;
> - default:
> - DRM_ERROR("Unknown table version %d, %d\n", frev, crev);
> - break;
> - }
> - break;
> - default:
> - DRM_ERROR("Unknown table version %d, %d\n", frev, crev);
> - break;
> - }
> -
> - amdgpu_atom_execute_table(adev->mode_info.atom_context, index, (uint32_t *)&args);
> -}
> -
> int amdgpu_atombios_encoder_get_encoder_mode(struct drm_encoder *encoder)
> {
> - struct amdgpu_encoder *amdgpu_encoder = to_amdgpu_encoder(encoder);
> struct drm_connector *connector;
> struct amdgpu_connector *amdgpu_connector;
> struct amdgpu_connector_atom_dig *dig_connector;
> @@ -450,11 +378,6 @@ int amdgpu_atombios_encoder_get_encoder_mode(struct drm_encoder *encoder)
> if (amdgpu_encoder_get_dp_bridge_encoder_id(encoder) != ENCODER_OBJECT_ID_NONE)
> return ATOM_ENCODER_MODE_DP;
>
> - /* DVO is always DVO */
> - if ((amdgpu_encoder->encoder_id == ENCODER_OBJECT_ID_INTERNAL_DVO1) ||
> - (amdgpu_encoder->encoder_id == ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1))
> - return ATOM_ENCODER_MODE_DVO;
> -
> connector = amdgpu_get_connector_for_encoder(encoder);
> /* if we don't have an active device yet, just use one of
> * the connectors tied to the encoder.
> @@ -768,9 +691,6 @@ amdgpu_atombios_encoder_setup_dig_transmitter(struct drm_encoder *encoder, int a
> memset(&args, 0, sizeof(args));
>
> switch (amdgpu_encoder->encoder_id) {
> - case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1:
> - index = GetIndexIntoMasterTable(COMMAND, DVOOutputControl);
> - break;
> case ENCODER_OBJECT_ID_INTERNAL_UNIPHY:
> case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1:
> case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2:
> @@ -1332,18 +1252,6 @@ amdgpu_atombios_encoder_dpms(struct drm_encoder *encoder, int mode)
> break;
> }
> break;
> - case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1:
> - switch (mode) {
> - case DRM_MODE_DPMS_ON:
> - amdgpu_atombios_encoder_setup_dvo(encoder, ATOM_ENABLE);
> - break;
> - case DRM_MODE_DPMS_STANDBY:
> - case DRM_MODE_DPMS_SUSPEND:
> - case DRM_MODE_DPMS_OFF:
> - amdgpu_atombios_encoder_setup_dvo(encoder, ATOM_DISABLE);
> - break;
> - }
> - break;
> case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1:
> switch (mode) {
> case DRM_MODE_DPMS_ON:
> @@ -1402,9 +1310,7 @@ amdgpu_atombios_encoder_set_crtc_source(struct drm_encoder *encoder)
> else
> args.v1.ucDevice = ATOM_DEVICE_DFP3_INDEX;
> break;
> - case ENCODER_OBJECT_ID_INTERNAL_DVO1:
> case ENCODER_OBJECT_ID_INTERNAL_DDI:
> - case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1:
> args.v1.ucDevice = ATOM_DEVICE_DFP2_INDEX;
> break;
> case ENCODER_OBJECT_ID_INTERNAL_DAC1:
> @@ -1474,9 +1380,6 @@ amdgpu_atombios_encoder_set_crtc_source(struct drm_encoder *encoder)
> break;
> }
> break;
> - case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1:
> - args.v2.ucEncoderID = ASIC_INT_DVO_ENCODER_ID;
> - break;
> case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1:
> if (amdgpu_encoder->active_device & (ATOM_DEVICE_TV_SUPPORT))
> args.v2.ucEncoderID = ASIC_INT_TV_ENCODER_ID;
> @@ -1543,9 +1446,6 @@ amdgpu_atombios_encoder_set_crtc_source(struct drm_encoder *encoder)
> break;
> }
> break;
> - case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1:
> - args.v3.ucEncoderID = ASIC_INT_DVO_ENCODER_ID;
> - break;
> case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1:
> if (amdgpu_encoder->active_device & (ATOM_DEVICE_TV_SUPPORT))
> args.v3.ucEncoderID = ASIC_INT_TV_ENCODER_ID;
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
> index 6de2ce53..90dc73b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
> @@ -3733,7 +3733,6 @@ static void dce_v10_0_encoder_add(struct amdgpu_device *adev,
> DRM_MODE_ENCODER_DAC, NULL);
> drm_encoder_helper_add(encoder, &dce_v10_0_dac_helper_funcs);
> break;
> - case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1:
> case ENCODER_OBJECT_ID_INTERNAL_UNIPHY:
> case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1:
> case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2:
> @@ -3754,13 +3753,6 @@ static void dce_v10_0_encoder_add(struct amdgpu_device *adev,
> }
> drm_encoder_helper_add(encoder, &dce_v10_0_dig_helper_funcs);
> break;
> - case ENCODER_OBJECT_ID_SI170B:
> - case ENCODER_OBJECT_ID_CH7303:
> - case ENCODER_OBJECT_ID_EXTERNAL_SDVOA:
> - case ENCODER_OBJECT_ID_EXTERNAL_SDVOB:
> - case ENCODER_OBJECT_ID_TITFP513:
> - case ENCODER_OBJECT_ID_VT1623:
> - case ENCODER_OBJECT_ID_HDMI_SI1930:
> case ENCODER_OBJECT_ID_TRAVIS:
> case ENCODER_OBJECT_ID_NUTMEG:
> /* these are handled by the primary encoders */
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
> index 89aab0a..d3c9fb7 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
> @@ -3674,7 +3674,6 @@ static void dce_v11_0_encoder_add(struct amdgpu_device *adev,
> DRM_MODE_ENCODER_DAC, NULL);
> drm_encoder_helper_add(encoder, &dce_v11_0_dac_helper_funcs);
> break;
> - case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1:
> case ENCODER_OBJECT_ID_INTERNAL_UNIPHY:
> case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1:
> case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2:
> @@ -3695,13 +3694,6 @@ static void dce_v11_0_encoder_add(struct amdgpu_device *adev,
> }
> drm_encoder_helper_add(encoder, &dce_v11_0_dig_helper_funcs);
> break;
> - case ENCODER_OBJECT_ID_SI170B:
> - case ENCODER_OBJECT_ID_CH7303:
> - case ENCODER_OBJECT_ID_EXTERNAL_SDVOA:
> - case ENCODER_OBJECT_ID_EXTERNAL_SDVOB:
> - case ENCODER_OBJECT_ID_TITFP513:
> - case ENCODER_OBJECT_ID_VT1623:
> - case ENCODER_OBJECT_ID_HDMI_SI1930:
> case ENCODER_OBJECT_ID_TRAVIS:
> case ENCODER_OBJECT_ID_NUTMEG:
> /* these are handled by the primary encoders */
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
> index e56b55d..ddb8eba 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
> @@ -3663,7 +3663,6 @@ static void dce_v8_0_encoder_add(struct amdgpu_device *adev,
> DRM_MODE_ENCODER_DAC, NULL);
> drm_encoder_helper_add(encoder, &dce_v8_0_dac_helper_funcs);
> break;
> - case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1:
> case ENCODER_OBJECT_ID_INTERNAL_UNIPHY:
> case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1:
> case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2:
> @@ -3684,13 +3683,6 @@ static void dce_v8_0_encoder_add(struct amdgpu_device *adev,
> }
> drm_encoder_helper_add(encoder, &dce_v8_0_dig_helper_funcs);
> break;
> - case ENCODER_OBJECT_ID_SI170B:
> - case ENCODER_OBJECT_ID_CH7303:
> - case ENCODER_OBJECT_ID_EXTERNAL_SDVOA:
> - case ENCODER_OBJECT_ID_EXTERNAL_SDVOB:
> - case ENCODER_OBJECT_ID_TITFP513:
> - case ENCODER_OBJECT_ID_VT1623:
> - case ENCODER_OBJECT_ID_HDMI_SI1930:
> case ENCODER_OBJECT_ID_TRAVIS:
> case ENCODER_OBJECT_ID_NUTMEG:
> /* these are handled by the primary encoders */
More information about the dri-devel
mailing list