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=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 8E7D9C3A5A9 for ; Mon, 4 May 2020 14:29:12 +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 6A78B206D7 for ; Mon, 4 May 2020 14:29:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6A78B206D7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ravnborg.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 B6D866E418; Mon, 4 May 2020 14:29:11 +0000 (UTC) Received: from asavdk4.altibox.net (asavdk4.altibox.net [109.247.116.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3B1126E418 for ; Mon, 4 May 2020 14:29:10 +0000 (UTC) Received: from ravnborg.org (unknown [158.248.194.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by asavdk4.altibox.net (Postfix) with ESMTPS id 52E37804C8; Mon, 4 May 2020 16:29:08 +0200 (CEST) Date: Mon, 4 May 2020 16:29:07 +0200 From: Sam Ravnborg To: Thomas Zimmermann Subject: Re: [PATCH 12/17] drm/mgag200: Move TAGFIFO reset into separate function Message-ID: <20200504142907.GB28466@ravnborg.org> References: <20200429143238.10115-1-tzimmermann@suse.de> <20200429143238.10115-13-tzimmermann@suse.de> <20200503162529.GD23105@ravnborg.org> <0aa60bf9-2833-4eb7-89cf-90a796d6f0b6@suse.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <0aa60bf9-2833-4eb7-89cf-90a796d6f0b6@suse.de> User-Agent: Mutt/1.10.1 (2018-07-13) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=MOBOZvRl c=1 sm=1 tr=0 a=UWs3HLbX/2nnQ3s7vZ42gw==:117 a=UWs3HLbX/2nnQ3s7vZ42gw==:17 a=kj9zAlcOel0A:10 a=pitqBozi8Ri6JXG7c38A:9 a=CjuIK1q_8ugA:10 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: john.p.donnelly@oracle.com, dri-devel@lists.freedesktop.org, kraxel@redhat.com, airlied@redhat.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Thomas. > > > > > >> + WREG_SEQ(0x01, seq1); > >> + > >> + memctl = RREG32(MGAREG_MEMCTL); > >> + > >> + memctl |= RESET_FLAG; > >> + WREG32(MGAREG_MEMCTL, memctl); > >> + > >> + udelay(1000); > >> + > >> + memctl &= ~RESET_FLAG; > >> + WREG32(MGAREG_MEMCTL, memctl); > >> + > >> + /* screen on */ > >> + RREG_SEQ(0x01, seq1); > >> + seq1 &= ~0x20; > >> + WREG_SEQ(0x01, seq1); > > Here seq1 is read again, the old code used the old value. > > I think new code is better. > > You mean 'the old code was better,' right? Well, if there is no good reason to change it stick with the old code we know works. I was not sure what would happen with the register when reset was performed. So maybe reading back would be better, hence my comment. But re-using the old value gives full control of the register. So yeah, old code was better. Sam _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel