Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752646AbdLKO7n (ORCPT ); Mon, 11 Dec 2017 09:59:43 -0500 Received: from mail-lf0-f67.google.com ([209.85.215.67]:39478 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752265AbdLKO7g (ORCPT ); Mon, 11 Dec 2017 09:59:36 -0500 X-Google-Smtp-Source: ACJfBovtF9nLkYr+qPAhRiW3b1fXlYPMZhXr6qnH/GR/HMKjeoa0/SyFanmWlXL7g6S+COv7/3v2/Q== Subject: Re: [PATCH v1 1/2] drm/tegra: dc: Link DC1 to DC0 on Tegra20 To: Thierry Reding Cc: linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org References: <85902b42264b094cbf7cf30930f8c0bbccdca1b7.1512947732.git.digetx@gmail.com> <20171211101222.GF10671@ulmo> From: Dmitry Osipenko Message-ID: Date: Mon, 11 Dec 2017 17:59:29 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20171211101222.GF10671@ulmo> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1077 Lines: 27 On 11.12.2017 13:12, Thierry Reding wrote: > On Mon, Dec 11, 2017 at 02:19:43AM +0300, Dmitry Osipenko wrote: >> HW reset isn't actually broken on Tegra20, but there is a dependency on >> first display controller to be taken out of reset for the second to be >> enabled successfully. >> >> Signed-off-by: Dmitry Osipenko >> --- >> drivers/gpu/drm/tegra/dc.c | 77 +++++++++++++++++++++++++++++----------------- >> drivers/gpu/drm/tegra/dc.h | 4 ++- >> 2 files changed, 51 insertions(+), 30 deletions(-) >> >> diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c >> index fc70351b9017..6139d3e9cedf 100644 >> --- a/drivers/gpu/drm/tegra/dc.c >> +++ b/drivers/gpu/drm/tegra/dc.c >> @@ -24,6 +24,8 @@ >> #include >> #include >> >> +static struct tegra_dc *dc0; > > I'd like to avoid the global variable. Perhaps you can use the > driver_for_each_device() or driver_find_device() functions to find the > correct device? driver_find_device() fit perfectly, thank you for the suggestion.