From patchwork Tue Sep 1 15:09:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 264768 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A52F7C433E2 for ; Tue, 1 Sep 2020 15:30:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 77BF1207D3 for ; Tue, 1 Sep 2020 15:30:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598974216; bh=rCyF4ksN2Ht7HesuQ4IXcJCM/op/1avwDTAnycy6+4w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=sK8Q5+E7JQNrc/XZgI11jkQV+cQezkkAX+xS8XU/VRTAH/LYppNoK09eY5ldBLjPn JGMEVZ3SQt6RZprpfl2q8K3BKq48ye++uMFfrYPxVWuO2ZYHVWu5SdQXI6su9BNkLj V9cDijjodaIAd13C8XmZOrm10rzCYiIzntEQNq2w= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730585AbgIAPaF (ORCPT ); Tue, 1 Sep 2020 11:30:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:60048 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730580AbgIAPaC (ORCPT ); Tue, 1 Sep 2020 11:30:02 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BF7BD206C0; Tue, 1 Sep 2020 15:30:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598974202; bh=rCyF4ksN2Ht7HesuQ4IXcJCM/op/1avwDTAnycy6+4w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qHCO5GkTtJI1esPrIaxBGVV9UgXhYWC/pnRQmTBF9a7t8WNhI1vKbfWF8a5g5XBa8 /ut52X7hQ0iFVJUNZSdUfT62w8Au6eiYeusd9U0xJFgrImrSVFmGIrKbmmrgaPibVM RRHD/pa8pMfTFT+VVi8kbUZvxO+0BN0sWt66TA60= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paul Cercueil , Sam Ravnborg , Sasha Levin Subject: [PATCH 5.4 084/214] gpu/drm: ingenic: Use the planes src_[x, y] to configure DMA length Date: Tue, 1 Sep 2020 17:09:24 +0200 Message-Id: <20200901150957.018382104@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200901150952.963606936@linuxfoundation.org> References: <20200901150952.963606936@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Paul Cercueil [ Upstream commit 52e4607dace1eeeb2e012fca291dc4e6cb449bff ] Instead of obtaining the width/height of the framebuffer from the CRTC state, obtain it from the current plane state. v2: No change Signed-off-by: Paul Cercueil Link: https://patchwork.freedesktop.org/patch/msgid/20191210144142.33143-3-paul@crapouillou.net # *** extracted tags *** Acked-by: Sam Ravnborg Signed-off-by: Sasha Levin --- drivers/gpu/drm/ingenic/ingenic-drm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/ingenic/ingenic-drm.c b/drivers/gpu/drm/ingenic/ingenic-drm.c index 376fca6ca9f47..e746b3a6f7cbc 100644 --- a/drivers/gpu/drm/ingenic/ingenic-drm.c +++ b/drivers/gpu/drm/ingenic/ingenic-drm.c @@ -375,8 +375,8 @@ static void ingenic_drm_plane_atomic_update(struct drm_plane *plane, if (state && state->fb) { addr = drm_fb_cma_get_gem_addr(state->fb, state, 0); - width = state->crtc->state->adjusted_mode.hdisplay; - height = state->crtc->state->adjusted_mode.vdisplay; + width = state->src_w >> 16; + height = state->src_h >> 16; cpp = state->fb->format->cpp[plane->index]; priv->dma_hwdesc->addr = addr;