Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4076469iob; Sun, 8 May 2022 02:27:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwa3pWXCTT0I/bcHO6ZxVI5gmJKGc55xmUcp4PaHtNFvHCDshT+I6sWcJcWNH3AAYUdeg8m X-Received: by 2002:aa7:cd0a:0:b0:425:bc13:4ccb with SMTP id b10-20020aa7cd0a000000b00425bc134ccbmr11721320edw.229.1652002050886; Sun, 08 May 2022 02:27:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652002050; cv=none; d=google.com; s=arc-20160816; b=tn6bMeUlX6/Hy3SVAFYZRZGbpej3oZgORNi0U7UsQUuCRQH1YqSSD+UKtOx4XEEoYZ XlF3I8uNKWhMDp8sIgeIaGh1uMIoTIGeDmp8iyDGIMZ18NS1v2US6Pb+zCHZM5ilUOU3 TRTyMVkgjod7oPKFqpXWk/pzREWOG7d9mays58/S/PMBAvfStEBlKqa+qYkPTs6VMb0Y Sge/UUxYJFPs3tj2ZvWa+PtuFyx/E/7E+XZSy5pl1mJT4UOiOD5pSqcpbLpkcgfZwMoh /HBuC6kBlsMb5fmmU4uKWjFTb3cu8qkGp9tl9Sj1SVtmVWrYU0SGb6my+KJGJIW7w1D3 FF0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=p9htX0KFzI9LrPiJC0hxZjuIhFKh3ZZvE4glCLeZPPY=; b=Z256bhYCzbpwTtJcvqSaoJm5L5JJK9XCo7IavjycrD6l8JJzPb4q6vkbBoBOQDE7vM EpVWm9s6px8RFu0CnlNcstZlVSMWG1kIgKg2RactrfTxFjTZOAUOd7h5OJIwLaW42t/a l0JBNwT2frYUgHmTlOL0K+lCJ22oT2FZGNDRKvRbkmCOfTzyJfmQltUncG6eoweRoh4l J8233LmLbJFYsUgOzjNdkdaiWicKDacFGRWIOzpzTnSL4y9Kriua0A8FA/VSpqSbj/CJ Z/wOPOCCeXrh9kbMlCWH49FgiYwy1ygsaVXc7NN8y7gKaq7Zq4sRew7wPWdCALdwMia6 d2nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fVbgw1Rk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v6-20020a170906180600b006f3a070d863si9466117eje.710.2022.05.08.02.27.07; Sun, 08 May 2022 02:27:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fVbgw1Rk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376816AbiEDRpX (ORCPT + 99 others); Wed, 4 May 2022 13:45:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356345AbiEDRMA (ORCPT ); Wed, 4 May 2022 13:12:00 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27DCD4BBAD; Wed, 4 May 2022 09:57:50 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 85E97CE28B0; Wed, 4 May 2022 16:57:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A4561C385AF; Wed, 4 May 2022 16:57:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1651683458; bh=se5v7BD30ixTkjSOWrFGeSsOS9HZQ/4c5BU5f7DwOwM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fVbgw1Rk2scdqF6QXmUZAwWRY/YeV0ftmMudidx3dokbWkkfMTphTNE8Coj03e0Wx TENt2MXGv8fAMvu4fpR6wAEufaSinNbwrUOcJypQ6o4auBXX5+GvDBqFME1MWP0uxl dxMFR7mwAq5KCHMr4yWhIach2ceiZemRX1me6SpI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jernej Skrabec , Samuel Holland , Maxime Ripard , Sasha Levin Subject: [PATCH 5.17 133/225] drm/sun4i: Remove obsolete references to PHYS_OFFSET Date: Wed, 4 May 2022 18:46:11 +0200 Message-Id: <20220504153122.186885580@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220504153110.096069935@linuxfoundation.org> References: <20220504153110.096069935@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Samuel Holland [ Upstream commit dc3ae06c5f2170d879ff58696f629d8c3868aec3 ] commit b4bdc4fbf8d0 ("soc: sunxi: Deal with the MBUS DMA offsets in a central place") added a platform device notifier that sets the DMA offset for all of the display engine frontend and backend devices. The code applying the offset to DMA buffer physical addresses was then removed from the backend driver in commit 756668ba682e ("drm/sun4i: backend: Remove the MBUS quirks"), but the code subtracting PHYS_OFFSET was left in the frontend driver. As a result, the offset was applied twice in the frontend driver. This likely went unnoticed because it only affects specific configurations (scaling or certain pixel formats) where the frontend is used, on boards with both one of these older SoCs and more than 1 GB of DRAM. In addition, the references to PHYS_OFFSET prevent compiling the driver on architectures where PHYS_OFFSET is not defined. Fixes: b4bdc4fbf8d0 ("soc: sunxi: Deal with the MBUS DMA offsets in a central place") Reviewed-by: Jernej Skrabec Signed-off-by: Samuel Holland Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20220424162633.12369-4-samuel@sholland.org Signed-off-by: Sasha Levin --- drivers/gpu/drm/sun4i/sun4i_frontend.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_frontend.c b/drivers/gpu/drm/sun4i/sun4i_frontend.c index 56ae38389db0..462fae73eae9 100644 --- a/drivers/gpu/drm/sun4i/sun4i_frontend.c +++ b/drivers/gpu/drm/sun4i/sun4i_frontend.c @@ -222,13 +222,11 @@ void sun4i_frontend_update_buffer(struct sun4i_frontend *frontend, /* Set the physical address of the buffer in memory */ paddr = drm_fb_cma_get_gem_addr(fb, state, 0); - paddr -= PHYS_OFFSET; DRM_DEBUG_DRIVER("Setting buffer #0 address to %pad\n", &paddr); regmap_write(frontend->regs, SUN4I_FRONTEND_BUF_ADDR0_REG, paddr); if (fb->format->num_planes > 1) { paddr = drm_fb_cma_get_gem_addr(fb, state, swap ? 2 : 1); - paddr -= PHYS_OFFSET; DRM_DEBUG_DRIVER("Setting buffer #1 address to %pad\n", &paddr); regmap_write(frontend->regs, SUN4I_FRONTEND_BUF_ADDR1_REG, paddr); @@ -236,7 +234,6 @@ void sun4i_frontend_update_buffer(struct sun4i_frontend *frontend, if (fb->format->num_planes > 2) { paddr = drm_fb_cma_get_gem_addr(fb, state, swap ? 1 : 2); - paddr -= PHYS_OFFSET; DRM_DEBUG_DRIVER("Setting buffer #2 address to %pad\n", &paddr); regmap_write(frontend->regs, SUN4I_FRONTEND_BUF_ADDR2_REG, paddr); -- 2.35.1