From patchwork Wed Oct 16 19:26:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 3057401 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 845AA9F2B6 for ; Wed, 16 Oct 2013 20:50:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DB39F204AD for ; Wed, 16 Oct 2013 20:50:10 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id AAA0A204AC for ; Wed, 16 Oct 2013 20:50:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6A80DE75FD for ; Wed, 16 Oct 2013 13:50:08 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qe0-f53.google.com (mail-qe0-f53.google.com [209.85.128.53]) by gabe.freedesktop.org (Postfix) with ESMTP id 5590CE77E6 for ; Wed, 16 Oct 2013 12:27:30 -0700 (PDT) Received: by mail-qe0-f53.google.com with SMTP id cy11so1019405qeb.40 for ; Wed, 16 Oct 2013 12:27:30 -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=KN+DbEvFsFlb7Lmec+InbFxhiSmLgSliV8g09Pc+6GQ=; b=Ka6l1kl4E3Nk2StqZMj0F9gx2o84T6XtB2onXxfyNawWc+mG32sI8/TyCUPowd5HQQ pR2xDSM2ZCyxKtrRNA2MXvek3JJThZ9FThhERDs1eC1VnlsfU7zbk5HXlbN0lWM4MVwC rnFE1WCgdvzshAYbEwcQGgW/q4MuuAFsN8FWQ= 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=KN+DbEvFsFlb7Lmec+InbFxhiSmLgSliV8g09Pc+6GQ=; b=XcG+FUKfoMDpQg24866FduFgY6LLSA1DP6SvKCxbWpkTEVZEazaJNW/HliIuuWXy1b /B87noRxL81bneBg4Ge10DBUn82cSQPmmUIq2BsBvBOMJ9GmgiCSMYMO6+B7dDYY9MSa jeglQRZAFsMcBr35znpwj0/UXByYjbwbrHUsx1jAa2WbodhlQPRqvtBvABLBwopekB3r +M5rlmnKkXYgFi7cH+VuOpOlvs8ZR7nq6xho/JAZID0OR31/+ruZuHgLHzZz8PGEMQnO UOT6AHh7NFf+uDR2alwFJCkhM/Q80ZtPwc+5qrIL167S1uIohjTe9/TRXZfBds6OyI64 +Rsg== X-Gm-Message-State: ALoCoQkqxSNN/iqtBD4R8IrldpIXdDUG7Uw4ArUhnau1Q/PjmJnRPYoctrAnHHE+JSM7BUbaCWBm X-Received: by 10.49.41.3 with SMTP id b3mr6075109qel.51.1381951650394; Wed, 16 Oct 2013 12:27:30 -0700 (PDT) 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 4sm167771575qak.11.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 16 Oct 2013 12:27:29 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org, inki.dae@samsung.com Subject: [PATCH v2 15/26] drm/exynos: Use drm_mode_copy to copy modes Date: Wed, 16 Oct 2013 15:26:45 -0400 Message-Id: <1381951616-12548-16-git-send-email-seanpaul@chromium.org> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1381951616-12548-1-git-send-email-seanpaul@chromium.org> References: <1381951616-12548-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.6 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 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 64c5647..afc83c9 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; } }