From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tomasz Figa Subject: Re: [PATCH v3 28/32] drm/exynos: Implement drm_connector in hdmi directly Date: Mon, 02 Dec 2013 10:54:32 +0100 Message-ID: <6027644.s78jeePoh1@flatron> References: <1383063198-10526-1-git-send-email-seanpaul@chromium.org> <1431502.jK5oHXV9M7@amdc1227> <20131202094636.GB18060@ulmo.nvidia.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-bk0-f42.google.com (mail-bk0-f42.google.com [209.85.214.42]) by gabe.freedesktop.org (Postfix) with ESMTP id C2815FA9E3 for ; Mon, 2 Dec 2013 01:54:35 -0800 (PST) Received: by mail-bk0-f42.google.com with SMTP id w11so5338558bkz.1 for ; Mon, 02 Dec 2013 01:54:34 -0800 (PST) In-Reply-To: <20131202094636.GB18060@ulmo.nvidia.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org To: dri-devel@lists.freedesktop.org Cc: marcheu@chromium.org List-Id: dri-devel@lists.freedesktop.org On Monday 02 of December 2013 10:46:37 Thierry Reding wrote: > On Fri, Nov 29, 2013 at 04:58:46PM +0100, Tomasz Figa wrote: > > On Tuesday 29 of October 2013 12:13:14 Sean Paul wrote: > [...] > > > diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c > [...] > > > @@ -811,11 +816,60 @@ static int hdmi_check_mode(struct exynos_drm_display *display, > > > > > > ret = mixer_check_mode(mode); > > > if (ret) > > > - return ret; > > > + return MODE_BAD; > > > > Is there a need to define custom return values, instead of returning 0 or > > a standard error code depending on whether the mode is correct? > > That's not a custom return value. It's one of the values in the > drm_mode_status enumeration (include/drm/drm_crtc.h). They are used to > transport more meaning than one of the standard error codes. OK. Strange thing is that LXR doesn't index them. > In this > case one could argue that MODE_BAD doesn't transport very much meaning, > though, and I think it would be more useful to modify mixer_check_mode() > to return a specific MODE_* value rather than one of the standard error > codes. Right. Best regards, Tomasz