From patchwork Tue Oct 29 16:13:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 3109161 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 B868A9F2B7 for ; Tue, 29 Oct 2013 16:18:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8739F20304 for ; Tue, 29 Oct 2013 16:18:35 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 59164200F4 for ; Tue, 29 Oct 2013 16:18:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 80730EEC08; Tue, 29 Oct 2013 09:15:07 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qe0-f41.google.com (mail-qe0-f41.google.com [209.85.128.41]) by gabe.freedesktop.org (Postfix) with ESMTP id DBB36EEBDD for ; Tue, 29 Oct 2013 09:13:58 -0700 (PDT) Received: by mail-qe0-f41.google.com with SMTP id x7so48778qeu.0 for ; Tue, 29 Oct 2013 09:13:58 -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=EglvLMpw/93rHpkwVmLzdZ3WytRWyfUHxvlW4YEWPog=; b=nUBCFXBjgXSxMPIqACDBoRlC40dge8vfh+mZK/MJf4eKE8cs7GeVuEeuCqA0zWipIY l0V1tDPe+gIUhLLRjfSvqWOLapOlypH8zVxfUPJQPNeV+4h+dl3A6W3bgXBtu5/iHOwP uF/cHOaKE9Co9fOTScibnySnCV7e6mSBm005o= 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=EglvLMpw/93rHpkwVmLzdZ3WytRWyfUHxvlW4YEWPog=; b=aMTu2cCWg+FyFKQ4ZOsfxzYNkyLHrVfGxKEiyi+PnPDdsXebh+jUpyYL6gPjaz2RZB ZzAcOCOFV2BPUvppr8gMXZ6kjWWhfaq2Bc3u6OU5JmG7FYUeGxL/nKMJwkKVT5WgF5Vv 43uFLwH3+7Gb44x5EC33qne1l5c9BdEWS5oBQkTVgG13IOu5hLQN75xE3E0aDhI3TMcL vwAYoQujaRfdxv9iZ6P1RvcqQswBX7WAKnRFs+PYk3y527LQHXY4R+sQV8iXnQbaXQtT SkXYmw9orK8wYKIesuV+voYDEpUILFwknBkL4yMqm5Q8t7nX9mwXdSzWkO4ceE0TdCOS 3rZw== X-Gm-Message-State: ALoCoQm6WjIGnX38CVvZDSbfVuiRqZhCvJD4jizq8kBr+SPfsq6daVcVBWMiahEIvPoRlha3BV/y X-Received: by 10.49.4.134 with SMTP id k6mr561258qek.86.1383063238482; Tue, 29 Oct 2013 09:13:58 -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 h9sm66581946qaq.9.2013.10.29.09.13.57 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 29 Oct 2013 09:13:57 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org, inki.dae@samsung.com Subject: [PATCH v3 15/32] drm/exynos: Use drm_mode_copy to copy modes Date: Tue, 29 Oct 2013 12:13:01 -0400 Message-Id: <1383063198-10526-16-git-send-email-seanpaul@chromium.org> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1383063198-10526-1-git-send-email-seanpaul@chromium.org> References: <1383063198-10526-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.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 Reviewed-by: Tomasz Figa --- Changes in v2: None Changes in v3: 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 9e12fb7..2c127b9 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -846,21 +846,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; } }