Re: [PATCH v2 0/3] drm/amd/display: add HDMI Stereo 3D support
Note, the higher level pieces are not yet in place, for this to work on X for instance. I started to look at that a while back, only to realize the kernel driver needed help first. On Thu, May 11, 2017 at 10:33 AM, Jeffrey Smith <whydo...@gmail.com> wrote: > I took the work from https://patchwork.freedesktop.org/patch/27065/ > and cleaned it up. I've been meaning to take what I'd done and post it. > Your question inspired me to take care of that and here is the result: > https://github.com/whydoubt/stereo-es2gears > > Also, Alastair Bridgewater pointed out to me that intel-gpu-tools has > some testing modes, but I only messed with it a little. > https://github.com/tiagovignatti/intel-gpu-tools > > I have also played around with creating test patterns by extending > https://github.com/dvdhrm/docs/blob/master/drm-howto/modeset.c > but that is some very raw stuff and probably not particularly helpful > in the current state. > > On Wed, May 10, 2017 at 3:46 PM, Harry Wentland <harry.wentl...@amd.com> > wrote: >> On 2017-05-08 12:35 PM, Jeff Smith wrote: >>> >>> Changes: I have broken one patch into three. >>> >>> Note: this only covers the display (not amdgpu) portion and does not >>> include the code to make it work over the card's DVI port. >>> >>> I only have one Stereo-3D-capable display to test this on, an LG TV from >>> about 2014. All 3 modes (side-by-side half, top-and-bottom, and >>> frame-packing) appear to work as intended. >>> >> >> Hi Jeff, >> >> how do you test this? Which app, etc, are you using? I've never tested >> stereo 3D before on Linux but would really love to give this a quick spin >> before pulling these patches. Everything that pops up on google points me to >> the bino video player but that segfaults on Ubuntu 17.04 with any video. >> >> Harry >> >> >> >>> Jeff Smith (3): >>> drm/amd/display: translate drm's mode to display's stereo-3D timing >>> drm/amd/display: use stereo-3D-aware methods when calculating >>> dimensions >>> drm/amd/display: enable stereo-3D modes/timings >>> >>> .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c| 33 >>> +++--- >>> .../display/dc/dce110/dce110_timing_generator.c| 4 --- >>> 2 files changed, 23 insertions(+), 14 deletions(-) >>> >> ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v2 0/3] drm/amd/display: add HDMI Stereo 3D support
I took the work from https://patchwork.freedesktop.org/patch/27065/ and cleaned it up. I've been meaning to take what I'd done and post it. Your question inspired me to take care of that and here is the result: https://github.com/whydoubt/stereo-es2gears Also, Alastair Bridgewater pointed out to me that intel-gpu-tools has some testing modes, but I only messed with it a little. https://github.com/tiagovignatti/intel-gpu-tools I have also played around with creating test patterns by extending https://github.com/dvdhrm/docs/blob/master/drm-howto/modeset.c but that is some very raw stuff and probably not particularly helpful in the current state. On Wed, May 10, 2017 at 3:46 PM, Harry Wentlandwrote: > On 2017-05-08 12:35 PM, Jeff Smith wrote: >> >> Changes: I have broken one patch into three. >> >> Note: this only covers the display (not amdgpu) portion and does not >> include the code to make it work over the card's DVI port. >> >> I only have one Stereo-3D-capable display to test this on, an LG TV from >> about 2014. All 3 modes (side-by-side half, top-and-bottom, and >> frame-packing) appear to work as intended. >> > > Hi Jeff, > > how do you test this? Which app, etc, are you using? I've never tested > stereo 3D before on Linux but would really love to give this a quick spin > before pulling these patches. Everything that pops up on google points me to > the bino video player but that segfaults on Ubuntu 17.04 with any video. > > Harry > > > >> Jeff Smith (3): >> drm/amd/display: translate drm's mode to display's stereo-3D timing >> drm/amd/display: use stereo-3D-aware methods when calculating >> dimensions >> drm/amd/display: enable stereo-3D modes/timings >> >> .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c| 33 >> +++--- >> .../display/dc/dce110/dce110_timing_generator.c| 4 --- >> 2 files changed, 23 insertions(+), 14 deletions(-) >> > ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 4/5] drm/amd/display: Add HDMI Stereo 3D (DC) support
I have easy access to an LG 3D television, though I do not have model information handy at the moment. This is the only display I have tested on so far. I have tested all three modes, and in each case the signal is recognized as 3D (the TV pops up a message to this effect), and the content is displayed as intended. BTW, regarding timing_3d_format I am not entirely clear on the difference between hardware and software varieties (e.g. _HW_FRAME_PACKING vs. _SW_FRAME_PACKING) but my inclination was that the software variety is what I was working with. On Wed, Mar 1, 2017 at 5:13 PM, Harry Wentlandwrote: > On 2017-02-24 07:14 PM, Jeff Smith wrote: > >> Signed-off-by: Jeff Smith >> --- >> .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c| 32 >> -- >> .../display/dc/dce110/dce110_timing_generator.c| 4 --- >> 2 files changed, 23 insertions(+), 13 deletions(-) >> >> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c >> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c >> index 3912dc8..eda813e 100644 >> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c >> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c >> @@ -649,8 +649,7 @@ static void update_stream_scaling_settings( >> return; >> >> /* Full screen scaling by default */ >> - src.width = mode->hdisplay; >> - src.height = mode->vdisplay; >> + drm_crtc_get_hv_timing(mode, , ); >> dst.width = stream->timing.h_addressable; >> dst.height = stream->timing.v_addressable; >> >> @@ -853,7 +852,22 @@ static void fill_stream_properties_from_dr >> m_display_mode( >> else >> timing_out->pixel_encoding = PIXEL_ENCODING_RGB; >> >> - timing_out->timing_3d_format = TIMING_3D_FORMAT_NONE; >> + switch (mode_in->flags & DRM_MODE_FLAG_3D_MASK) { >> + case DRM_MODE_FLAG_3D_FRAME_PACKING: >> + timing_out->timing_3d_format = >> TIMING_3D_FORMAT_SW_FRAME_PACKING; >> + break; >> + case DRM_MODE_FLAG_3D_TOP_AND_BOTTOM: >> + timing_out->timing_3d_format = >> TIMING_3D_FORMAT_TB_SW_PACKED; >> + break; >> + case DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF: >> + timing_out->timing_3d_format = >> TIMING_3D_FORMAT_SBS_SW_PACKED; >> + break; >> + case DRM_MODE_FLAG_3D_NONE: >> + default: >> + timing_out->timing_3d_format = TIMING_3D_FORMAT_NONE; >> + break; >> + } >> + >> > > Are these tested and if so on which displays? Even though we have some of > this code in place we haven't tested any of it and don't necessarily expect > it to work. > > Harry > > > timing_out->display_color_depth = convert_color_depth_from_displ >> ay_info( >> connector); >> timing_out->scan_type = SCANNING_TYPE_NODATA; >> @@ -1028,6 +1042,7 @@ static struct dc_stream *create_stream_for_sink( >> dm_state->scaling != RMX_OFF); >> } >> >> + drm_mode_set_crtcinfo(, CRTC_STEREO_DOUBLE_ONLY); >> fill_stream_properties_from_drm_display_mode(stream, >> , >base); >> update_stream_scaling_settings(, dm_state, stream); >> @@ -1558,13 +1573,12 @@ int amdgpu_dm_connector_mode_valid( >> goto stream_create_fail; >> } >> >> - drm_mode_set_crtcinfo(mode, 0); >> + drm_mode_set_crtcinfo(mode, CRTC_STEREO_DOUBLE); >> fill_stream_properties_from_drm_display_mode(stream, mode, >> connector); >> >> val_set.stream = stream; >> val_set.surface_count = 0; >> - stream->src.width = mode->hdisplay; >> - stream->src.height = mode->vdisplay; >> + drm_crtc_get_hv_timing(mode, >src.width, >> >src.height); >> stream->dst = stream->src; >> >> if (dc_validate_resources(adev->dm.dc, _set, 1)) >> @@ -1793,14 +1807,13 @@ int dm_create_validation_set_for_connector(struct >> drm_connector *connector, >> return result; >> } >> >> - drm_mode_set_crtcinfo(mode, 0); >> + drm_mode_set_crtcinfo(mode, CRTC_STEREO_DOUBLE); >> >> fill_stream_properties_from_drm_display_mode(stream, mode, >> connector); >> >> val_set->stream = stream; >> >> - stream->src.width = mode->hdisplay; >> - stream->src.height = mode->vdisplay; >> + drm_crtc_get_hv_timing(mode, >src.width, >> >src.height); >> stream->dst = stream->src; >> >> return MODE_OK; >> @@ -2073,6 +2086,7 @@ void amdgpu_dm_connector_init_helper( >> aconnector->dc_link = link; >> aconnector->base.interlace_allowed = true; >> aconnector->base.doublescan_allowed = true; >> + aconnector->base.stereo_allowed = true; >> aconnector->base.dpms = DRM_MODE_DPMS_OFF; >> aconnector->hpd.hpd = AMDGPU_HPD_NONE; /* not used */ >> >>
Re: [PATCH 5/5] drm/amd/display: Allow HDMI capabilities over DVI connector (DC)
This did work for me, including stereo 3D, so that is rather disappointing. (DVI output of the card -> DVI/HDMI adapter -> HDMI Cable -> HDMI TV input) Is it that HDMI signaling passing through a DVI connector is dis-allowed on the whole, or is there something more subtle that I am missing? Would it be allowed if only accessible through a kernel parameter? On Wed, Mar 1, 2017 at 5:11 PM, Harry Wentlandwrote: > On 2017-02-24 07:14 PM, Jeff Smith wrote: > >> Signed-off-by: Jeff Smith >> --- >> drivers/gpu/drm/amd/display/dc/core/dc_link.c | 7 ++- >> 1 file changed, 6 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c >> b/drivers/gpu/drm/amd/display/dc/core/dc_link.c >> index 2b92939..168f260 100644 >> --- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c >> +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c >> @@ -706,8 +706,13 @@ bool dc_link_detect(const struct dc_link *dc_link, >> bool boot) >> >> /* HDMI-DVI Dongle */ >> if (dc_sink->sink_signal == SIGNAL_TYPE_HDMI_TYPE_A && >> - !dc_sink->edid_caps.edid_hdmi) >> + !dc_sink->edid_caps.edid_hdmi) { >> dc_sink->sink_signal = >> SIGNAL_TYPE_DVI_SINGLE_LINK; >> + } else if ((dc_sink->sink_signal == >> SIGNAL_TYPE_DVI_SINGLE_LINK || >> + dc_sink->sink_signal == >> SIGNAL_TYPE_DVI_DUAL_LINK) && >> + dc_sink->edid_caps.edid_hdmi) { >> + dc_sink->sink_signal = SIGNAL_TYPE_HDMI_TYPE_A; >> + } >> > > This won't pass HDMI compliance. > > Harry > > > >> /* Connectivity log: detection */ >> for (i = 0; i < sink->public.dc_edid.length / >> EDID_BLOCK_SIZE; i++) { >> >> ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel