From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH v3 28/32] drm/exynos: Implement drm_connector in hdmi directly Date: Mon, 2 Dec 2013 10:46:37 +0100 Message-ID: <20131202094636.GB18060@ulmo.nvidia.com> References: <1383063198-10526-1-git-send-email-seanpaul@chromium.org> <1383063198-10526-29-git-send-email-seanpaul@chromium.org> <1431502.jK5oHXV9M7@amdc1227> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1042633751==" Return-path: Received: from mail-bk0-f47.google.com (mail-bk0-f47.google.com [209.85.214.47]) by gabe.freedesktop.org (Postfix) with ESMTP id B69FCF9DD6 for ; Mon, 2 Dec 2013 01:47:40 -0800 (PST) Received: by mail-bk0-f47.google.com with SMTP id mx12so5234041bkb.20 for ; Mon, 02 Dec 2013 01:47:39 -0800 (PST) In-Reply-To: <1431502.jK5oHXV9M7@amdc1227> 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: Tomasz Figa Cc: marcheu@chromium.org, dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1042633751== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="eAbsdosE1cNLO4uF" Content-Disposition: inline --eAbsdosE1cNLO4uF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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/exy= nos/exynos_hdmi.c [...] > > @@ -811,11 +816,60 @@ static int hdmi_check_mode(struct exynos_drm_disp= lay *display, > > =20 > > ret =3D mixer_check_mode(mode); > > if (ret) > > - return ret; > > + return MODE_BAD; >=20 > 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. 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. Thierry --eAbsdosE1cNLO4uF Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJSnFb8AAoJEN0jrNd/PrOh82sP/iqjik6FyTbSMgxB2wUMa63K IOmubqxi+qgrONLHdveKtTt71SsYeA7/jF4fLU06QjDcmJodyM4S1qMntGkfmv1M xE7N//m65TLQDVIUhDzkrZiY95juiEqc4E/CkbFwq7Zfg6ZGdDP4QSkr7CI8j/pO di5Pr/S6YdSo0qxE0ZyE+7gWqJ9cR/rZNEviQGoN8ss+RBFY+qvM5MLbRqYYXK7e xe71kugy9CELRe7k0KtXXcZzxIPwcguHOU3gXzToHId7Xs8451ruR08B4XJlJLA4 835VQvtyDsJ4zu44SlVEmwOA+dX595W3l2kGByRCpYRu6iOIpQm7bKAKmxbci8ym X22+QQSECeOJqZK9UWktTDZpTugYG2ROGETdU3oHZ+bDbWaqTw+oPajQr+oLbCwQ PxosCAMYmOs7W8sME7FaTsV4d0wZ1/QIHVtmvt+IFX8MCYI3JyAiWwoaMQXOpayL dg0KqZVKBnazH8W1eZPI9IZD6yc0m5ZkG9LsFkfAr0VdY0PvEkDuJS11dmXe3HvH jncniusHuXLgmyDWLQBzv2ERzxLj5jHbPUbOMjIVEx6SOAEhlCM3WfAWndohb5FN 3CHbViw7vwlNv7PYu25G9LdPaHfd3PkD3Z4THhPUUw1uI+4fVHPjKXq5Y1eioPyb CrecNMV3OyHcZ6tZ8loA =EwQi -----END PGP SIGNATURE----- --eAbsdosE1cNLO4uF-- --===============1042633751== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============1042633751==--