From: Inki Dae Subject: RE: [PATCH 02/10] drm/exynos: added mode_fixup feature and code clean. Date: Thu, 15 Mar 2012 20:21:27 +0900 Message-ID: <002a01cd029d$c34989f0$49dc9dd0$%dae@samsung.com> References: <1331650024-10578-1-git-send-email-inki.dae@samsung.com> <1331650024-10578-3-git-send-email-inki.dae@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by gabe.freedesktop.org (Postfix) with ESMTP id D86B0A0B06 for ; Thu, 15 Mar 2012 04:21:30 -0700 (PDT) Received: from epcpsbgm1.samsung.com (mailout3.samsung.com [203.254.224.33]) by mailout3.samsung.com (Oracle Communications Messaging Exchange Server 7u4-19.01 64bit (built Sep 7 2010)) with ESMTP id <0M0X004U3BJS8NB0@mailout3.samsung.com> for dri-devel@lists.freedesktop.org; Thu, 15 Mar 2012 20:21:28 +0900 (KST) Received: from NOINKIDAE02 ([165.213.219.102]) by mmp1.samsung.com (Oracle Communications Messaging Exchange Server 7u4-19.01 64bit (built Sep 7 2010)) with ESMTPA id <0M0X003LXBJUV500@mmp1.samsung.com> for dri-devel@lists.freedesktop.org; Thu, 15 Mar 2012 20:21:30 +0900 (KST) In-reply-to: Content-language: ko List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: 'Dave Airlie' Cc: kyungmin.park@samsung.com, sw0312.kim@samsung.com, dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org > -----Original Message----- > From: Dave Airlie [mailto:airlied@gmail.com] > Sent: Thursday, March 15, 2012 7:40 PM > To: Inki Dae > Cc: airlied@linux.ie; dri-devel@lists.freedesktop.org; > kyungmin.park@samsung.com; sw0312.kim@samsung.com > Subject: Re: [PATCH 02/10] drm/exynos: added mode_fixup feature and code > clean. > = > > =A0}; > > diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c > b/drivers/gpu/drm/exynos/exynos_drm_crtc.c > > index de81883..2d9a0e6 100644 > > --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c > > +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c > > @@ -249,7 +249,11 @@ exynos_drm_crtc_mode_set(struct drm_crtc *crtc, > struct drm_display_mode *mode, > > =A0{ > > =A0 =A0 =A0 =A0DRM_DEBUG_KMS("%s\n", __FILE__); > > > > - =A0 =A0 =A0 mode =3D adjusted_mode; > > + =A0 =A0 =A0 /* > > + =A0 =A0 =A0 =A0* copy the mode data adjusted by mode_fixup() into crt= c->mode > > + =A0 =A0 =A0 =A0* so that hardware can be seet to proper mode. > > + =A0 =A0 =A0 =A0*/ > > + =A0 =A0 =A0 memcpy(&crtc->mode, adjusted_mode, sizeof(*adjusted_mode)= ); > = > This just seems wrong on lots of levels, if you get an error how are > you going to fallback? > = > You should be passing the modes into the crtc_update function and > doing things like other drivers here. > = > Dave. Got it. I will check return value from crtc_update and if it gets an error then I will handle it properly. Thanks, Inki Dae