Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp35004pxf; Wed, 24 Mar 2021 20:06:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwNMimI8bq+Qae7gk7ty8Qz4CEgYw5D3JmGoAfYNOxTMZb79Uh2avMq6KxXrZ/wSkIhw2Y9 X-Received: by 2002:a05:6402:3486:: with SMTP id v6mr6613290edc.109.1616641582769; Wed, 24 Mar 2021 20:06:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616641582; cv=none; d=google.com; s=arc-20160816; b=CYokcg7nkBWFGF8HFUSRqgvByF0Z776d3gFxzXNP5ye6CxhF2T6hHS8LHqQxIX5po7 TnwXBzQX7yvLwG9LI1rmkMXiuKxShvNMBMSVCkDVieD3LghFYLRfsp5qc6udAnyq16L9 4Swaiy9o6q98I7z2MREAvNeIuq7MXJDrWCtATNA12eJm5jPbC6WNlS0+WofjcOylmlN/ O7GmwjJWSy4Z06V/rMf95pWsqIkLZyy6Bo/M4LfSLIDD6+7MqirsqSEmc5uj/Nkbgbe0 lmXpgoz+m1g9CjALMMV3CUFSVeA6fOe7CH4DnPXYBJdKt79tBQdelTr3ZMRHqHT2OQZQ V2XA== 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:organization :from:references:cc:to:subject; bh=DMdVSgPfqnEdHkb8FlhDzCUf/NdjtfH+VEg++hq5Omw=; b=NFM3rV84MfXkTs+8sB1lGef48kcEpJYAvH/rACXRnDUyazMcwsBhGupdpfeZsXjlMl Io1qJrvBMA8hqvH0DfWg6NrVpegxwA0FrwLZtHEy5cuCI0AcMVbE1TYby0oUCPITN9kW +lcBuDdprltP/eDYHOwNW2h4HJXq74ovYNKkjLufCgO8z4B7haBWD5/pYOAk+X7FLVh6 YjVkT9YK0EmiJGwslr8kL6pWlRlgbhWcSYVmKAa5qyIUjX3znvovtzYYYIiRx2F8+0z7 d9rJHJNuaWUTKsQxDGti4QjjRz6+cGNorzh9Kqjf41zBXPrJhCrLPf/joJzloz4Mx0ct 6jbA== ARC-Authentication-Results: i=1; mx.google.com; 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 t18si3056051ejj.437.2021.03.24.20.05.59; Wed, 24 Mar 2021 20:06:22 -0700 (PDT) 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; 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 S235152AbhCXNWb (ORCPT + 99 others); Wed, 24 Mar 2021 09:22:31 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:51150 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233395AbhCXNV5 (ORCPT ); Wed, 24 Mar 2021 09:21:57 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4F585r6cDpz1qtfD; Wed, 24 Mar 2021 14:21:52 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4F585r4y3wz1qsk8; Wed, 24 Mar 2021 14:21:52 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id Ec622X1yBJ6V; Wed, 24 Mar 2021 14:21:50 +0100 (CET) X-Auth-Info: Wy0aHOg7MRsGS0dgJhi4wXhn+NlMDJsLXSIT1LPaZwE= Received: from [10.88.0.186] (dslb-084-056-254-233.084.056.pools.vodafone-ip.de [84.56.254.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Wed, 24 Mar 2021 14:21:50 +0100 (CET) Subject: Re: [PATCH v3 2/2] drm: bridge: Add TI SN65DSI83/84/85 DSI to LVDS bridge To: Jagan Teki , Rob Herring , Andrzej Hajda , Neil Armstrong , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Sam Ravnborg Cc: Marek Vasut , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-amarula@amarulasolutions.com References: <20210214174453.104616-1-jagan@amarulasolutions.com> <20210214174453.104616-2-jagan@amarulasolutions.com> From: Claudius Heine Organization: Denx Software Engineering Message-ID: <8cac7848-3a8e-c597-1efc-c67fb6daba25@denx.de> Date: Wed, 24 Mar 2021 14:21:50 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <20210214174453.104616-2-jagan@amarulasolutions.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jagan, On 2021-02-14 18:44, Jagan Teki wrote: [...] > +static void sn65dsi_enable(struct drm_bridge *bridge) > +{ > + struct sn65dsi *sn = bridge_to_sn65dsi(bridge); > + struct drm_display_mode *mode = bridge_to_mode(bridge); > + int bpp = mipi_dsi_pixel_format_to_bpp(sn->dsi->format); > + unsigned int lanes = sn->dsi->lanes; > + unsigned int pixel_clk = mode->clock * 1000; > + unsigned int dsi_clk = pixel_clk * bpp / (lanes * 2); > + unsigned int val; > + > + /* reset SOFT_RESET bit */ > + regmap_write(sn->regmap, SN65DSI_SOFT_RESET, 0x0); > + > + msleep(10); > + > + /* reset PLL_EN bit */ > + regmap_write(sn->regmap, SN65DSI_CLK_PLL, 0x0); > + > + msleep(10); > + > + /* setup lvds clock */ > + val = sn65dsi_get_clk_range(0, 5, pixel_clk, 25000000, 25000000); > + if (val < 0) { val is unsigned int, so it can never be negative so this condition is always false. Same error further down in that function as well. regards, Claudius