> -----Original Message-----
> From: Dave Airlie [mailto:airlied at gmail.com]
> Sent: Thursday, March 15, 2012 7:40 PM
> To: Inki Dae
> Cc: airlied at linux.ie; dri-devel at lists.freedesktop.org;
> kyungmin.park at samsung.com; sw0312.kim at samsung.com
> Subject: Re: [PATCH 02/10] drm/exynos: added mode_fixup feature and code
> clean.
> 
> > ?};
> > 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,
> > ?{
> > ? ? ? ?DRM_DEBUG_KMS("%s\n", __FILE__);
> >
> > - ? ? ? mode = adjusted_mode;
> > + ? ? ? /*
> > + ? ? ? ?* copy the mode data adjusted by mode_fixup() into crtc->mode
> > + ? ? ? ?* so that hardware can be seet to proper mode.
> > + ? ? ? ?*/
> > + ? ? ? 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

Reply via email to