From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751080AbdEPFLt (ORCPT ); Tue, 16 May 2017 01:11:49 -0400 Received: from smtprelay4.synopsys.com ([198.182.47.9]:36467 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750713AbdEPFLs (ORCPT ); Tue, 16 May 2017 01:11:48 -0400 Subject: Re: [PATCH v2 5/8] drm: Use new mode_valid() helpers in connector probe helper To: Laurent Pinchart , Daniel Vetter References: <1874234.uZ7HLpxeJ2@avalon> <20170515064748.25pk2bkdl3q6zg75@phenom.ffwll.local> <1674301.cQSPGVcRm9@avalon> CC: Jose Abreu , , , Daniel Vetter , Alexey Brodkin , Carlos Palminha From: Jose Abreu Message-ID: <9b65e0c2-91d0-e036-b78b-7b18e03a506b@synopsys.com> Date: Tue, 16 May 2017 06:11:36 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <1674301.cQSPGVcRm9@avalon> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.128.58.46] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Laurent, On 15-05-2017 08:05, Laurent Pinchart wrote: > On Monday 15 May 2017 08:47:49 Daniel Vetter wrote: >> On Sun, May 14, 2017 at 02:04:24PM +0300, Laurent Pinchart wrote: >>> On Friday 12 May 2017 17:06:14 Jose Abreu wrote: >>>> On 12-05-2017 10:35, Laurent Pinchart wrote: >>>>> On Tuesday 09 May 2017 18:00:12 Jose Abreu wrote: >>>>>> + if (mode->status == MODE_OK) >>>>>> + mode->status = > drm_mode_validate_connector(connector, >>>>>> > mode); >>>>> I would reverse the arguments order to match the style of the other >>>>> validation functions. >>>> Hmm, I think it makes more sense to pass connector first and then >>>> mode ... >>> I disagree, as this function validates a mode against a pipeline, the same >>> way the other validation functions validate a mode against other >>> parameters, but it's your patch :-) >> Call it drm_connector_validate_mode, because the first argument is >> generally the object we operate on :-) > But the function doesn't validate a mode for a connector, it validates a mode > for a complete pipeline... > Hmm, but note that in the same function there is drm_mode_validate_size() and drm_mode_validate_flag() calls, which take as first argument the mode and then the object to validate (I hadn't seen this). So, maybe leave it as drm_mode_validate_connector() as it takes a connector as argument or change to drm_mode_validate_pipeline() as you said, or even drm_mode_validate_datapath(), drm_mode_validate_videopath(), drm_mode_validate_components() ? Best regards, Jose Miguel Abreu From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jose Abreu Subject: Re: [PATCH v2 5/8] drm: Use new mode_valid() helpers in connector probe helper Date: Tue, 16 May 2017 06:11:36 +0100 Message-ID: <9b65e0c2-91d0-e036-b78b-7b18e03a506b@synopsys.com> References: <1874234.uZ7HLpxeJ2@avalon> <20170515064748.25pk2bkdl3q6zg75@phenom.ffwll.local> <1674301.cQSPGVcRm9@avalon> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1674301.cQSPGVcRm9@avalon> Sender: linux-kernel-owner@vger.kernel.org To: Laurent Pinchart , Daniel Vetter Cc: Jose Abreu , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Daniel Vetter , Alexey Brodkin , Carlos Palminha List-Id: dri-devel@lists.freedesktop.org Hi Laurent, On 15-05-2017 08:05, Laurent Pinchart wrote: > On Monday 15 May 2017 08:47:49 Daniel Vetter wrote: >> On Sun, May 14, 2017 at 02:04:24PM +0300, Laurent Pinchart wrote: >>> On Friday 12 May 2017 17:06:14 Jose Abreu wrote: >>>> On 12-05-2017 10:35, Laurent Pinchart wrote: >>>>> On Tuesday 09 May 2017 18:00:12 Jose Abreu wrote: >>>>>> + if (mode->status == MODE_OK) >>>>>> + mode->status = > drm_mode_validate_connector(connector, >>>>>> > mode); >>>>> I would reverse the arguments order to match the style of the other >>>>> validation functions. >>>> Hmm, I think it makes more sense to pass connector first and then >>>> mode ... >>> I disagree, as this function validates a mode against a pipeline, the same >>> way the other validation functions validate a mode against other >>> parameters, but it's your patch :-) >> Call it drm_connector_validate_mode, because the first argument is >> generally the object we operate on :-) > But the function doesn't validate a mode for a connector, it validates a mode > for a complete pipeline... > Hmm, but note that in the same function there is drm_mode_validate_size() and drm_mode_validate_flag() calls, which take as first argument the mode and then the object to validate (I hadn't seen this). So, maybe leave it as drm_mode_validate_connector() as it takes a connector as argument or change to drm_mode_validate_pipeline() as you said, or even drm_mode_validate_datapath(), drm_mode_validate_videopath(), drm_mode_validate_components() ? Best regards, Jose Miguel Abreu