Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp6259892pxb; Tue, 16 Feb 2021 22:51:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJzaZe/1WT2M8wVuP05Cf8IgqRxRJFXe5Tbqi3SQJA2fxxeVdHzYhArJc5q1rAG4y/x3JXMD X-Received: by 2002:aa7:c58b:: with SMTP id g11mr19306714edq.354.1613544716450; Tue, 16 Feb 2021 22:51:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613544716; cv=none; d=google.com; s=arc-20160816; b=gpd/X/pyCJKEmJemZnuIUfJNh4KaA89nEIksVdzK40rZhd45dJNBSmj/U+pK0B60C2 YZojg1BhU35q9KdCWbFFpRs8/xyZ552w3d8UBZwgunVFG4RZHyYvEP1fBvyYha0ajcE4 MaYs6X4dbn1O8wPQDHHqzR9v5bf7vNi6SardIoyAjBL91ALA5kxu3TBoSt1c3SHBQFgZ jxsffdH3DIWRLB9PbbXhU9Qs11yZ2Sy9V7Cjd2TSjx8E6wQnHcK3gSuzjMWciQ4cUIsU K8N5FQ7Yt04FGfK4CDz1I6KMhK2ecTFCFJiW5NaKqd/Jp15xky85PyeMGS35v0WoE554 JGNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:autocrypt:from :references:cc:to:subject:dkim-signature; bh=p77eXRHwuYKwL70qIrDLUT3GXYSj9NQPTn6x0+XSwd4=; b=Z8tP4+a9N16ntvlTjSv5Jhqajn2MFfIroQeAi6UQ2KUyuhiR5v/kvI0x9uJgeDIcNK tVXylUCBkfm5+9v9cnp4cu/IdxpWe0heEXSd5FGrNT122+shOjhIqu2UZ5S8obuw0p4a P3+LXwZzX5c98fvB1PK9yxN6v/UY589x2yaWtFg+FAbTB3iuY2naeizf58Ujomy0P7wB DQ/5qsBmLY7InCbXr+igQUMd9GLgUpIeQaPA0Gn0snZLYM1vhmFUOThRT7u+u+U8cfwV wJd3Api7WZGA6+YbN7bRBNRmC0MHyfWIym0/bRNOvSQ/x3XZzykUcOT/mlW1xmDW9sB/ sZVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=rdCcZb39; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f15si740826edv.199.2021.02.16.22.51.33; Tue, 16 Feb 2021 22:51:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=rdCcZb39; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231586AbhBQGmE (ORCPT + 99 others); Wed, 17 Feb 2021 01:42:04 -0500 Received: from perceval.ideasonboard.com ([213.167.242.64]:42978 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229468AbhBQGl7 (ORCPT ); Wed, 17 Feb 2021 01:41:59 -0500 Received: from [192.168.1.111] (91-157-208-71.elisa-laajakaista.fi [91.157.208.71]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 310D68C4; Wed, 17 Feb 2021 07:41:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1613544076; bh=kACUWAlTtOjLum7wNaqm/GR5HlDYZlCl+dsy0Q/Nw7o=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=rdCcZb39++Zh2RYpzpgU8Gu0TmzhwO+GtemIHB7dru21BrRYwL9gjMzhgz2ixwgGZ S1Z47gQRwTuS7kSjRFHOUDluIP89QF8IXlDzTN0xqYX05c9keG9Gl44SOXTKEJ6Nfi Th/HLpwcFYpDUbJINqMrzNq4jkF80UYK2nvpKA6E= Subject: Re: [RESEND PATCH] drm/tilcdc: fix raster control register setting To: Dario Binacchi , linux-kernel@vger.kernel.org, Jyri Sarha Cc: Daniel Vetter , David Airlie , dri-devel@lists.freedesktop.org References: <20210216202225.12861-1-dariobin@libero.it> From: Tomi Valkeinen Autocrypt: addr=tomi.valkeinen@ideasonboard.com; keydata= mQINBE6ms0cBEACyizowecZqXfMZtnBniOieTuFdErHAUyxVgtmr0f5ZfIi9Z4l+uUN4Zdw2 wCEZjx3o0Z34diXBaMRJ3rAk9yB90UJAnLtb8A97Oq64DskLF81GCYB2P1i0qrG7UjpASgCA Ru0lVvxsWyIwSfoYoLrazbT1wkWRs8YBkkXQFfL7Mn3ZMoGPcpfwYH9O7bV1NslbmyJzRCMO eYV258gjCcwYlrkyIratlHCek4GrwV8Z9NQcjD5iLzrONjfafrWPwj6yn2RlL0mQEwt1lOvn LnI7QRtB3zxA3yB+FLsT1hx0va6xCHpX3QO2gBsyHCyVafFMrg3c/7IIWkDLngJxFgz6DLiA G4ld1QK/jsYqfP2GIMH1mFdjY+iagG4DqOsjip479HCWAptpNxSOCL6z3qxCU8MCz8iNOtZk DYXQWVscM5qgYSn+fmMM2qN+eoWlnCGVURZZLDjg387S2E1jT/dNTOsM/IqQj+ZROUZuRcF7 0RTtuU5q1HnbRNwy+23xeoSGuwmLQ2UsUk7Q5CnrjYfiPo3wHze8avK95JBoSd+WIRmV3uoO rXCoYOIRlDhg9XJTrbnQ3Ot5zOa0Y9c4IpyAlut6mDtxtKXr4+8OzjSVFww7tIwadTK3wDQv Bus4jxHjS6dz1g2ypT65qnHen6mUUH63lhzewqO9peAHJ0SLrQARAQABtDBUb21pIFZhbGtl aW5lbiA8dG9taS52YWxrZWluZW5AaWRlYXNvbmJv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SHP3Pa4E7lsSdWhSlHYNdG/czhoUkSCN09C0rEK93wxACx3vtxPLjXu6RptBw 3dRq7n+mQChEB1am0BueV1JZaBboIL0AGlSJkm23kw== Message-ID: <07f7a7c0-8016-bf32-92ad-b9de4aaed84c@ideasonboard.com> Date: Wed, 17 Feb 2021 08:41:15 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210216202225.12861-1-dariobin@libero.it> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16/02/2021 22:22, Dario Binacchi wrote: > The fdd property of the tilcdc_panel_info structure must set the reqdly > bit field (bit 12 to 19) of the raster control register. The previous > statement set the least significant bit instead. > > Signed-off-by: Dario Binacchi > > --- > > drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c > index 30213708fc99..238068e28729 100644 > --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c > +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c > @@ -393,7 +393,7 @@ static void tilcdc_crtc_set_mode(struct drm_crtc *crtc) > return; > } > } > - reg |= info->fdd < 12; > + reg |= info->fdd << 12; > tilcdc_write(dev, LCDC_RASTER_CTRL_REG, reg); > > if (info->invert_pxl_clk) > This is interesting, looks like this has always been broken, and in many cases sets bits 0, which is the enable bit. So we enable LCDC before even setting the fb address. How does this not blow up LCDC totally? The fix looks correct to me, but it will change the register value for boards that have apparently been working for years. Dario, did you test this on actual HW, or did you just spot the error? Reviewed-by: Tomi Valkeinen Tomi