<p dir="ltr"><br>
2016. 4. 14. 오전 11:59에 "Hyungwon Hwang" <<a href="mailto:hyungwon.hwang7@gmail.com">hyungwon.hwang7@gmail.com</a>>님이 작성:<br>
><br>
><br>
> 2016. 4. 14. 오전 1:12에 "Deucher, Alexander" <<a href="mailto:Alexander.Deucher@amd.com">Alexander.Deucher@amd.com</a>>님이 작성:<br>
><br>
> ><br>
> > > -----Original Message-----<br>
> > > From: Hyungwon Hwang [mailto:<a href="mailto:hyungwon.hwang7@gmail.com">hyungwon.hwang7@gmail.com</a>]<br>
> > > Sent: Wednesday, April 13, 2016 11:55 AM<br>
> > > To: Deucher, Alexander; Koenig, Christian; <a href="mailto:dri-devel@lists.freedesktop.org">dri-devel@lists.freedesktop.org</a><br>
> > > Subject: radeon_connector->audio is set by RADEON_AUDIO_DISABLE as<br>
> > > default.<br>
> > ><br>
> > > Dear all,<br>
> > ><br>
> > > I switched my desktop environment to GNOME wayland recently, and I<br>
> > > found<br>
> > > that no sound in this environment. In X desktop environment, the ioctl<br>
> > > DRM_IOCTL_MODE_SETPROPERTY(I confused it with<br>
> > > DRM_IOCTL_MODE_OBJ_SETPROPERTY - I deleted the log already :( ) is<br>
> > > called by userspace and it makes the sound works. But in Gnome wayland<br>
> > > desktop environment, the ioctl is not called. I tried to fixed it, and<br>
> > > found that it is because radeon_connector->audio is set by<br>
> > > RADEON_AUDIO_DISABLE.<br>
> ><br>
> > Thanks for spotting this. Does the attached patch fix it?<br>
> ><br>
> > Alex<br>
><br>
> Yes. But I could test it only in my environment (radeon hd 5700 + hdmi monitor).<br>
><br>
> Thanks,<br>
> Hyungwon Hwang</p>
<p dir="ltr">Oh. Sorry. I couldn't see that there was an attached patch, becaue I checked it in mailing archive. I can test it at night. After that, I will send the reply again.</p>
<p dir="ltr">Thanks,<br>
Hyungwon Hwang</p>
<p dir="ltr">><br>
> ><br>
> > ><br>
> > > In atombios_encoders.c, atombios_get_encoder_mode()<br>
> > > if (radeon_connector->audio == RADEON_AUDIO_ENABLE)<br>
> > > return ATOM_ENCODER_MODE_HDMI;<br>
> > > else if (drm_detect_hdmi_monitor(radeon_connector_edid(connector)) &&<br>
> > > (radeon_connector->audio == RADEON_AUDIO_AUTO))<br>
> > > return ATOM_ENCODER_MODE_HDMI;<br>
> > > else<br>
> > > return ATOM_ENCODER_MODE_DVI;<br>
> > ><br>
> > > This code returns ATOM_ENCODER_MODE_DVI.<br>
> > ><br>
> > > In atombios_encoders.c, radeon_atom_encoder_mode_set():<br>
> > > encoder_mode = atombios_get_encoder_mode(encoder);<br>
> > ><br>
> > > if (connector && (radeon_audio != 0) &&<br>
> > ><br>
> > > ((encoder_mode == ATOM_ENCODER_MODE_HDMI) ||<br>
> > ><br>
> > > ENCODER_MODE_IS_DP(encoder_mode)))<br>
> > ><br>
> > > radeon_audio_mode_set(encoder, adjusted_mode);b<br>
> > ><br>
> > > So this code bypasses the calling of radeon_audio_mode_set().<br>
> > ><br>
> > > I think that radeon_connector->audio should be set by<br>
> > > RADEON_AUDIO_AUTO, at least for connectors which can output audio. I<br>
> > > fixed the code like below, and it works for me. But I am not familiar<br>
> > > with radeon DRM driver, and can't see the big picture. Can you review<br>
> > > this code?<br>
> > ><br>
> > > Thanks,<br>
> > > Hyungwon Hwang<br>
> > ><br>
> > > diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c<br>
> > > b/drivers/gpu/drm/radeon/radeon_connectors.c<br>
> > > index cfcc099..cf52ea5 100644<br>
> > > --- a/drivers/gpu/drm/radeon/radeon_connectors.c<br>
> > > +++ b/drivers/gpu/drm/radeon/radeon_connectors.c<br>
> > > @@ -1975,11 +1975,12 @@ radeon_add_atom_connector(struct drm_device<br>
> > > *dev,<br>
> > ><br>
> > > rdev->mode_info.output_csc_property,<br>
> > ><br>
> > > RADEON_OUTPUT_CSC_BYPASS);<br>
> > > break;<br>
> > > - case DRM_MODE_CONNECTOR_DVII:<br>
> > > - case DRM_MODE_CONNECTOR_DVID:<br>
> > > case DRM_MODE_CONNECTOR_HDMIA:<br>
> > > case DRM_MODE_CONNECTOR_HDMIB:<br>
> > > case DRM_MODE_CONNECTOR_DisplayPort:<br>
> > > + radeon_connector->audio = RADEON_AUDIO_AUTO;<br>
> > > + case DRM_MODE_CONNECTOR_DVII:<br>
> > > + case DRM_MODE_CONNECTOR_DVID:<br>
> > > drm_connector_init(dev, &radeon_connector->base,<br>
> > > &radeon_dp_connector_funcs,<br>
> > > connector_type);<br>
> > > drm_connector_helper_add(&radeon_connector->base,<br>
> > > @@ -2024,8 +2025,9 @@ radeon_add_atom_connector(struct drm_device<br>
> > > *dev,<br>
> > > 1);<br>
> > > }<br>
> > > break;<br>
> > > - case DRM_MODE_CONNECTOR_LVDS:<br>
> > > case DRM_MODE_CONNECTOR_eDP:<br>
> > > + radeon_connector->audio = RADEON_AUDIO_AUTO;<br>
> > > + case DRM_MODE_CONNECTOR_LVDS:<br>
> > > drm_connector_init(dev, &radeon_connector->base,<br>
> > ><br>
> > > &radeon_lvds_bridge_connector_funcs, connector_type);<br>
> > > drm_connector_helper_add(&radeon_connector->base,<br>
> > > @@ -2196,6 +2198,7 @@ radeon_add_atom_connector(struct drm_device<br>
> > > *dev,<br>
> > > connector->doublescan_allowed = true;<br>
> > > else<br>
> > > connector->doublescan_allowed = false;<br>
> > > + radeon_connector->audio = RADEON_AUDIO_AUTO;<br>
> > > break;<br>
> > > case DRM_MODE_CONNECTOR_DisplayPort:<br>
> > > radeon_dig_connector = kzalloc(sizeof(struct<br>
> > > radeon_connector_atom_dig), GFP_KERNEL);<br>
> > > @@ -2245,6 +2248,7 @@ radeon_add_atom_connector(struct drm_device<br>
> > > *dev,<br>
> > > connector->interlace_allowed = true;<br>
> > > /* in theory with a DP to VGA converter... */<br>
> > > connector->doublescan_allowed = false;<br>
> > > + radeon_connector->audio = RADEON_AUDIO_AUTO;<br>
> > > break;<br>
> > > case DRM_MODE_CONNECTOR_eDP:<br>
> > > radeon_dig_connector = kzalloc(sizeof(struct<br>
> > > radeon_connector_atom_dig), GFP_KERNEL);<br>
> > > @@ -2267,6 +2271,7 @@ radeon_add_atom_connector(struct drm_device<br>
> > > *dev,<br>
> > > subpixel_order = SubPixelHorizontalRGB;<br>
> > > connector->interlace_allowed = false;<br>
> > > connector->doublescan_allowed = false;<br>
> > > + radeon_connector->audio = RADEON_AUDIO_AUTO;<br>
> > > break;<br>
> > > case DRM_MODE_CONNECTOR_SVIDEO:<br>
> > > case DRM_MODE_CONNECTOR_Composite:<br>
</p>