From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 1/4] drm: Fix primary plane size for stereo doubled modes for legacy setcrtc Date: Tue, 17 Nov 2015 11:54:04 +0100 Message-ID: <20151117105404.GV16848@phenom.ffwll.local> References: <1447686157-29607-1-git-send-email-ville.syrjala@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Content-Disposition: inline In-Reply-To: <1447686157-29607-1-git-send-email-ville.syrjala@linux.intel.com> Sender: stable-owner@vger.kernel.org To: ville.syrjala@linux.intel.com Cc: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, Daniel Vetter , stable@vger.kernel.org List-Id: intel-gfx@lists.freedesktop.org On Mon, Nov 16, 2015 at 05:02:34PM +0200, ville.syrjala@linux.intel.com= wrote: > From: Ville Syrj=E4l=E4 >=20 > Properly double the hdisplay/vdisplay timings that we use as the prim= ary > plane size with stereo doubled modes. Otherwise the modeset gets > rejected on machines where the primary plane must be fullscreen, and = on > the rest only the first eye would get a visible plane. >=20 > Cc: Daniel Vetter > Cc: stable@vger.kernel.org > Fixes: 042652ed9599 ("drm/atomic-helper: implementatations for legacy= interfaces") > Signed-off-by: Ville Syrj=E4l=E4 Testcase: igt/kms_3d Reviewed-by: Daniel Vetter To avoid conflicts with patches 2-4 I applied all of them to drm-misc, = but we need to cherry-pick this one to drm-fixes too. -Daniel > --- > drivers/gpu/drm/drm_atomic_helper.c | 15 +++++++++------ > 1 file changed, 9 insertions(+), 6 deletions(-) >=20 > diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/dr= m_atomic_helper.c > index 9870c70..7857163 100644 > --- a/drivers/gpu/drm/drm_atomic_helper.c > +++ b/drivers/gpu/drm/drm_atomic_helper.c > @@ -1741,6 +1741,7 @@ int __drm_atomic_helper_set_config(struct drm_m= ode_set *set, > struct drm_crtc_state *crtc_state; > struct drm_plane_state *primary_state; > struct drm_crtc *crtc =3D set->crtc; > + int hdisplay, vdisplay; > int ret; > =20 > crtc_state =3D drm_atomic_get_crtc_state(state, crtc); > @@ -1783,19 +1784,21 @@ int __drm_atomic_helper_set_config(struct drm= _mode_set *set, > if (ret !=3D 0) > return ret; > =20 > + drm_crtc_get_hv_timing(set->mode, &hdisplay, &vdisplay); > + > drm_atomic_set_fb_for_plane(primary_state, set->fb); > primary_state->crtc_x =3D 0; > primary_state->crtc_y =3D 0; > - primary_state->crtc_h =3D set->mode->vdisplay; > - primary_state->crtc_w =3D set->mode->hdisplay; > + primary_state->crtc_h =3D vdisplay; > + primary_state->crtc_w =3D hdisplay; > primary_state->src_x =3D set->x << 16; > primary_state->src_y =3D set->y << 16; > if (primary_state->rotation & (BIT(DRM_ROTATE_90) | BIT(DRM_ROTATE_= 270))) { > - primary_state->src_h =3D set->mode->hdisplay << 16; > - primary_state->src_w =3D set->mode->vdisplay << 16; > + primary_state->src_h =3D hdisplay << 16; > + primary_state->src_w =3D vdisplay << 16; > } else { > - primary_state->src_h =3D set->mode->vdisplay << 16; > - primary_state->src_w =3D set->mode->hdisplay << 16; > + primary_state->src_h =3D vdisplay << 16; > + primary_state->src_w =3D hdisplay << 16; > } > =20 > commit: > --=20 > 2.4.10 >=20 --=20 Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch