From mboxrd@z Thu Jan 1 00:00:00 1970 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=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_2 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 741AEC433DF for ; Wed, 8 Jul 2020 08:24:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 51D092078A for ; Wed, 8 Jul 2020 08:24:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726121AbgGHIYQ (ORCPT ); Wed, 8 Jul 2020 04:24:16 -0400 Received: from kernel.crashing.org ([76.164.61.194]:60620 "EHLO kernel.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726081AbgGHIYP (ORCPT ); Wed, 8 Jul 2020 04:24:15 -0400 Received: from localhost (gate.crashing.org [63.228.1.57]) (authenticated bits=0) by kernel.crashing.org (8.14.7/8.14.7) with ESMTP id 0688NCdH001794 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 8 Jul 2020 03:23:18 -0500 Message-ID: <39fe1480891453839e257cd85e1070cde05866f0.camel@kernel.crashing.org> Subject: Re: [PATCH 5/6] drm/ast: Initialize DRAM type before posting GPU From: Benjamin Herrenschmidt To: Thomas Zimmermann , airlied@redhat.com, daniel@ffwll.ch, sam@ravnborg.org, noralf@tronnes.org, emil.l.velikov@gmail.com, yc_chen@aspeedtech.com Cc: dri-devel@lists.freedesktop.org, Joel Stanley , Gerd Hoffmann , Daniel Vetter , stable@vger.kernel.org Date: Wed, 08 Jul 2020 18:23:11 +1000 In-Reply-To: <20200708074912.25422-6-tzimmermann@suse.de> References: <20200708074912.25422-1-tzimmermann@suse.de> <20200708074912.25422-6-tzimmermann@suse.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Wed, 2020-07-08 at 09:49 +0200, Thomas Zimmermann wrote: > Posting the GPU requires the correct DRAM type to be stored in > struct ast_private. Therefore first initialize the DRAM info and > then post the GPU. This restores the original order of instructions > in this function. I no longer have access to the relevant test POWER systems, however the patch looks good to me. > Signed-off-by: Thomas Zimmermann > Fixes: bad09da6deab ("drm/ast: Fixed vram size incorrect issue on > POWER") > Cc: Joel Stanley > Cc: Y.C. Chen Acked-by: Benjamin Herrenschmidt > Cc: Dave Airlie > Cc: Thomas Zimmermann > Cc: Gerd Hoffmann > Cc: Daniel Vetter > Cc: Sam Ravnborg > Cc: Emil Velikov > Cc: "Y.C. Chen" > Cc: # v4.11+ > --- > drivers/gpu/drm/ast/ast_main.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/ast/ast_main.c > b/drivers/gpu/drm/ast/ast_main.c > index b162cc82204d..87e5baded2a7 100644 > --- a/drivers/gpu/drm/ast/ast_main.c > +++ b/drivers/gpu/drm/ast/ast_main.c > @@ -418,15 +418,15 @@ int ast_driver_load(struct drm_device *dev, > unsigned long flags) > > ast_detect_chip(dev, &need_post); > > - if (need_post) > - ast_post_gpu(dev); > - > ret = ast_get_dram_info(dev); > if (ret) > goto out_free; > drm_info(dev, "dram MCLK=%u Mhz type=%d bus_width=%d\n", > ast->mclk, ast->dram_type, ast->dram_bus_width); > > + if (need_post) > + ast_post_gpu(dev); > + > ret = ast_mm_init(ast); > if (ret) > goto out_free; From mboxrd@z Thu Jan 1 00:00:00 1970 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=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_2 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 F03EFC433E0 for ; Wed, 8 Jul 2020 08:39:36 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BEC1921D90 for ; Wed, 8 Jul 2020 08:39:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BEC1921D90 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 285176E8A0; Wed, 8 Jul 2020 08:39:36 +0000 (UTC) X-Greylist: delayed 952 seconds by postgrey-1.36 at gabe; Wed, 08 Jul 2020 08:39:31 UTC Received: from kernel.crashing.org (kernel.crashing.org [76.164.61.194]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2B6976E8A0 for ; Wed, 8 Jul 2020 08:39:31 +0000 (UTC) Received: from localhost (gate.crashing.org [63.228.1.57]) (authenticated bits=0) by kernel.crashing.org (8.14.7/8.14.7) with ESMTP id 0688NCdH001794 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 8 Jul 2020 03:23:18 -0500 Message-ID: <39fe1480891453839e257cd85e1070cde05866f0.camel@kernel.crashing.org> Subject: Re: [PATCH 5/6] drm/ast: Initialize DRAM type before posting GPU From: Benjamin Herrenschmidt To: Thomas Zimmermann , airlied@redhat.com, daniel@ffwll.ch, sam@ravnborg.org, noralf@tronnes.org, emil.l.velikov@gmail.com, yc_chen@aspeedtech.com Date: Wed, 08 Jul 2020 18:23:11 +1000 In-Reply-To: <20200708074912.25422-6-tzimmermann@suse.de> References: <20200708074912.25422-1-tzimmermann@suse.de> <20200708074912.25422-6-tzimmermann@suse.de> X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 Mime-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Vetter , stable@vger.kernel.org, Joel Stanley , dri-devel@lists.freedesktop.org, Gerd Hoffmann Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Wed, 2020-07-08 at 09:49 +0200, Thomas Zimmermann wrote: > Posting the GPU requires the correct DRAM type to be stored in > struct ast_private. Therefore first initialize the DRAM info and > then post the GPU. This restores the original order of instructions > in this function. I no longer have access to the relevant test POWER systems, however the patch looks good to me. > Signed-off-by: Thomas Zimmermann > Fixes: bad09da6deab ("drm/ast: Fixed vram size incorrect issue on > POWER") > Cc: Joel Stanley > Cc: Y.C. Chen Acked-by: Benjamin Herrenschmidt > Cc: Dave Airlie > Cc: Thomas Zimmermann > Cc: Gerd Hoffmann > Cc: Daniel Vetter > Cc: Sam Ravnborg > Cc: Emil Velikov > Cc: "Y.C. Chen" > Cc: # v4.11+ > --- > drivers/gpu/drm/ast/ast_main.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/ast/ast_main.c > b/drivers/gpu/drm/ast/ast_main.c > index b162cc82204d..87e5baded2a7 100644 > --- a/drivers/gpu/drm/ast/ast_main.c > +++ b/drivers/gpu/drm/ast/ast_main.c > @@ -418,15 +418,15 @@ int ast_driver_load(struct drm_device *dev, > unsigned long flags) > > ast_detect_chip(dev, &need_post); > > - if (need_post) > - ast_post_gpu(dev); > - > ret = ast_get_dram_info(dev); > if (ret) > goto out_free; > drm_info(dev, "dram MCLK=%u Mhz type=%d bus_width=%d\n", > ast->mclk, ast->dram_type, ast->dram_bus_width); > > + if (need_post) > + ast_post_gpu(dev); > + > ret = ast_mm_init(ast); > if (ret) > goto out_free; _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel