From patchwork Fri Oct 11 00:30:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 3019821 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0C3FA9F1E1 for ; Fri, 11 Oct 2013 00:47:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 45F9420254 for ; Fri, 11 Oct 2013 00:47:38 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 6F8DC20184 for ; Fri, 11 Oct 2013 00:47:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 662DEE605B for ; Thu, 10 Oct 2013 17:47:37 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by gabe.freedesktop.org (Postfix) with ESMTP id 4BB46E767D for ; Thu, 10 Oct 2013 17:31:16 -0700 (PDT) Received: by mail-ie0-f180.google.com with SMTP id e14so2307703iej.39 for ; Thu, 10 Oct 2013 17:31:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=SGNla0LZ69WCogTSGJ0UbA+Wz/jZFvw+CLATBT1ghuI=; b=ZQrW7VD0ouajI6z5amH0coeWmeQM/aSki7KobtxvcX4IqNlbMt5fAkSKrj3ORg9zEt YhxSE0Phgo4HvpWua8wnjwrvshKAMkKhZGneimzFzhQGabubwuoJSkSabtUJQ6VewBXj ACyCXiEPd3zeRj7PVIgdxxsJNUx1OrYapv+yY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=SGNla0LZ69WCogTSGJ0UbA+Wz/jZFvw+CLATBT1ghuI=; b=UtUQTC2ts2FlHcTN5n7MMIvw6FB+DpRWTLdUMo6YteVK3/NqAq5cBNoWiD+bwjRNWx FpSzDHf/Wonfmrft6+Rq00oEQvstrx6jQwkqFnOK4xrSLkrDxkxfwIwNxVBKhNGC4bxP /+/sxHxMqHs1/OZs6Azhdxgqx5Irh0nbyeFeMbYzz2JeWOcNl1yUrcWOTSQKTq5cEOsf HupTq8zqNEZAdyrK1o6qh41obkgCp6yO1HstpqrCTvDaElrOQSzldkYk8NdQt9Gnwhhi N9H/Xr779l3ftBgWa2dl3VYlEYmBc78oBDKAYxpGIEMb0iIC99HkzOzExKIyB8bLVnry K7hA== X-Gm-Message-State: ALoCoQmWJx3W85+TBRHkTVTOfdGmYmH5tCtf7zaHJoASu6C+vXzQsZRxBzV0orYluspGeEq3Rho7 X-Received: by 10.50.26.36 with SMTP id i4mr650143igg.33.1381451475895; Thu, 10 Oct 2013 17:31:15 -0700 (PDT) Received: from seanpaul-glaptop.corp.google.com (dhcp-172-19-29-233.mtv.corp.google.com [172.19.29.233]) by mx.google.com with ESMTPSA id p7sm420421iga.3.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Oct 2013 17:31:15 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org, inki.dae@samsung.com Subject: [PATCH 15/23] drm/exynos: Use drm_mode_copy to copy modes Date: Thu, 10 Oct 2013 20:30:28 -0400 Message-Id: <1381451436-10089-16-git-send-email-seanpaul@chromium.org> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1381451436-10089-1-git-send-email-seanpaul@chromium.org> References: <1381451436-10089-1-git-send-email-seanpaul@chromium.org> Cc: marcheu@chromium.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch changes the manual copying of mode to adjusted_mode in mode_fixup to use drm_mode_copy instead of handling things manually. Signed-off-by: Sean Paul --- drivers/gpu/drm/exynos/exynos_hdmi.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index d95df28..c975a56 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -843,21 +843,13 @@ static void hdmi_mode_fixup(void *in_ctx, struct drm_connector *connector, mode_ok = hdmi_check_mode(in_ctx, m); if (mode_ok == 0) { - struct drm_mode_object base; - struct list_head head; - DRM_INFO("desired mode doesn't exist so\n"); DRM_INFO("use the most suitable mode among modes.\n"); DRM_DEBUG_KMS("Adjusted Mode: [%d]x[%d] [%d]Hz\n", m->hdisplay, m->vdisplay, m->vrefresh); - /* preserve display mode header while copying. */ - head = adjusted_mode->head; - base = adjusted_mode->base; - memcpy(adjusted_mode, m, sizeof(*m)); - adjusted_mode->head = head; - adjusted_mode->base = base; + drm_mode_copy(adjusted_mode, m); break; } }