From patchwork Thu Jan 30 21:19:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 3559511 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 4A4F59F382 for ; Thu, 30 Jan 2014 21:23:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3C80520173 for ; Thu, 30 Jan 2014 21:23:11 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 27A64201B9 for ; Thu, 30 Jan 2014 21:23:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BFE1287185; Thu, 30 Jan 2014 13:23:06 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qa0-f52.google.com (mail-qa0-f52.google.com [209.85.216.52]) by gabe.freedesktop.org (Postfix) with ESMTP id 9402C44E8B for ; Thu, 30 Jan 2014 13:20:18 -0800 (PST) Received: by mail-qa0-f52.google.com with SMTP id j15so5279624qaq.11 for ; Thu, 30 Jan 2014 13:20:18 -0800 (PST) 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=hLaFUwZJw6Ky8kLQAbDIvmM9QHgIFNWUUzke70Q5cuI=; b=LSsgODM+UKGmCpEYcOEghV+g1vFSox/Jeccb03cgMM5UxjJHXGOB72gpMv2aGmVngd lK4aN3bmmB612U/hzqhLJwjPcLclZuJf91MZYkUp24iMsSPbjW3W4VnFIm6odu/elptH VAHcK+hvt4y0xyrO1hbFLs2bviDtjO8FzDtX4= 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=hLaFUwZJw6Ky8kLQAbDIvmM9QHgIFNWUUzke70Q5cuI=; b=XInbGisYNC6LDJk5emmjwCJHjHkfDZiOclnFZXS1EUman2FxQzfMOkvUdAXFhfmUJ/ X+Z+u7M26xhaztsIIZwslfWYSjCVHekGkzwr4CO9Hs7PcOR3sTB37JnqXTCPyJAzsHpQ J6K1ulLqK+stm0npzMeYrXszWjjOp51E+Z+9VjXE8OTC+ZtlNpJArdrV2TKDnSr8ZKzc eu/88O5XT1SZJLGCQDU/MeowQumOZ+MOwyvRltltwd8GEc1lWxI9kQPumgjlvC41h5WJ rqw+IMomoPqUNAErDEmlZEHhbNiBAkbshXWQHQwzc0gLEAIoDPLsCCtvQtOxD8vFk7OB h4BQ== X-Gm-Message-State: ALoCoQmPaFsASQhYrB1vfAe76iCWSq1T7zP6TeYLKsSaZe4LRYlh/4PLtdruwi8B0g+8QP8FNChe X-Received: by 10.224.14.129 with SMTP id g1mr26291228qaa.42.1391116818077; Thu, 30 Jan 2014 13:20:18 -0800 (PST) Received: from seanpaul-glaptop.roam.corp.google.com (cpe-173-095-180-236.nc.res.rr.com. [173.95.180.236]) by mx.google.com with ESMTPSA id r13sm20673608qan.7.2014.01.30.13.20.16 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 30 Jan 2014 13:20:17 -0800 (PST) From: Sean Paul To: dri-devel@lists.freedesktop.org, inki.dae@samsung.com Subject: [PATCH v4 17/34] drm/exynos: Use drm_mode_copy to copy modes Date: Thu, 30 Jan 2014 16:19:16 -0500 Message-Id: <1391116773-28471-18-git-send-email-seanpaul@chromium.org> X-Mailer: git-send-email 1.8.5.1 In-Reply-To: <1391116773-28471-1-git-send-email-seanpaul@chromium.org> References: <1391116773-28471-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@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.5 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 --- Changes in v2: None Changes in v3: None Changes in v4: None 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 051aa76..3faea8f 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -847,21 +847,13 @@ static void hdmi_mode_fixup(struct exynos_drm_display *display, mode_ok = hdmi_check_mode(display, 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; } }