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=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable 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 32C82C2BA83 for ; Fri, 7 Feb 2020 16:34:54 +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 12D53217BA for ; Fri, 7 Feb 2020 16:34:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 12D53217BA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com 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 39ADD6FD26; Fri, 7 Feb 2020 16:34:53 +0000 (UTC) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7B7576FD1B; Fri, 7 Feb 2020 16:34:51 +0000 (UTC) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Feb 2020 08:34:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,414,1574150400"; d="scan'208";a="250462951" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by orsmga002.jf.intel.com with SMTP; 07 Feb 2020 08:34:48 -0800 Received: by stinkbox (sSMTP sendmail emulation); Fri, 07 Feb 2020 18:34:47 +0200 Date: Fri, 7 Feb 2020 18:34:47 +0200 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Daniel Vetter Subject: Re: [Intel-gfx] [PATCH v2 1/6] drm: Include the encoder itself in possible_clones Message-ID: <20200207163447.GN13686@intel.com> References: <20200207135950.6655-1-ville.syrjala@linux.intel.com> <20200207135950.6655-2-ville.syrjala@linux.intel.com> <20200207145001.GI13686@intel.com> <20200207162751.GJ43062@phenom.ffwll.local> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200207162751.GJ43062@phenom.ffwll.local> X-Patchwork-Hint: comment User-Agent: Mutt/1.10.1 (2018-07-13) 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: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Fri, Feb 07, 2020 at 05:27:51PM +0100, Daniel Vetter wrote: > On Fri, Feb 07, 2020 at 04:50:01PM +0200, Ville Syrj=E4l=E4 wrote: > > On Fri, Feb 07, 2020 at 03:28:35PM +0100, Thomas Zimmermann wrote: > > > Hi > > > = > > > Am 07.02.20 um 14:59 schrieb Ville Syrjala: > > > > From: Ville Syrj=E4l=E4 > > > > = > > > > The docs say possible_clones should always include the encoder itse= lf. > > > > Since most drivers don't want to deal with the complexities of clon= ing > > > > let's allow them to set possible_clones=3D0 and instead we'll fix t= hat > > > > up in the core. > > > > = > > > > We can't put this special case into drm_encoder_init() because driv= ers > > > > will have to fill up possible_clones after adding all the relevant > > > > encoders. Otherwise they wouldn't know the proper encoder indexes to > > > > use. So we'll just do it just before registering the encoders. > > > > = > > > > TODO: Should we do something similar for possible_crtcs=3D=3D0? > > > > = > > > > Cc: Thomas Zimmermann > > > > Cc: Daniel Vetter > > > > Signed-off-by: Ville Syrj=E4l=E4 > > > = > > > May this fixup function should warn iff possible_clones was set to no= n-0 > > > by the driver, but the encoder itself is missing. > > = > > Yeah, I guess we could do that. > = > +1 on that, should catch some bugs at least. > = > Also can you pls fix up the kerneldoc for drm_encoder.possible_clones, > defacto this now means that 0 is a totally fine setting. Sure. And for possible_crtcs I was thinking similar concept: for_each_encoder() if (possible_crtc =3D=3D 0) possible_crtcs =3D all_crtc_mask; -- = Ville Syrj=E4l=E4 Intel _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel 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=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham 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 B0519C35250 for ; Fri, 7 Feb 2020 16:34:52 +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 922A6217BA for ; Fri, 7 Feb 2020 16:34:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 922A6217BA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E86176FD1B; Fri, 7 Feb 2020 16:34:51 +0000 (UTC) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7B7576FD1B; Fri, 7 Feb 2020 16:34:51 +0000 (UTC) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Feb 2020 08:34:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,414,1574150400"; d="scan'208";a="250462951" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by orsmga002.jf.intel.com with SMTP; 07 Feb 2020 08:34:48 -0800 Received: by stinkbox (sSMTP sendmail emulation); Fri, 07 Feb 2020 18:34:47 +0200 Date: Fri, 7 Feb 2020 18:34:47 +0200 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Daniel Vetter Message-ID: <20200207163447.GN13686@intel.com> References: <20200207135950.6655-1-ville.syrjala@linux.intel.com> <20200207135950.6655-2-ville.syrjala@linux.intel.com> <20200207145001.GI13686@intel.com> <20200207162751.GJ43062@phenom.ffwll.local> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200207162751.GJ43062@phenom.ffwll.local> X-Patchwork-Hint: comment User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [Intel-gfx] [PATCH v2 1/6] drm: Include the encoder itself in possible_clones X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Fri, Feb 07, 2020 at 05:27:51PM +0100, Daniel Vetter wrote: > On Fri, Feb 07, 2020 at 04:50:01PM +0200, Ville Syrj=E4l=E4 wrote: > > On Fri, Feb 07, 2020 at 03:28:35PM +0100, Thomas Zimmermann wrote: > > > Hi > > > = > > > Am 07.02.20 um 14:59 schrieb Ville Syrjala: > > > > From: Ville Syrj=E4l=E4 > > > > = > > > > The docs say possible_clones should always include the encoder itse= lf. > > > > Since most drivers don't want to deal with the complexities of clon= ing > > > > let's allow them to set possible_clones=3D0 and instead we'll fix t= hat > > > > up in the core. > > > > = > > > > We can't put this special case into drm_encoder_init() because driv= ers > > > > will have to fill up possible_clones after adding all the relevant > > > > encoders. Otherwise they wouldn't know the proper encoder indexes to > > > > use. So we'll just do it just before registering the encoders. > > > > = > > > > TODO: Should we do something similar for possible_crtcs=3D=3D0? > > > > = > > > > Cc: Thomas Zimmermann > > > > Cc: Daniel Vetter > > > > Signed-off-by: Ville Syrj=E4l=E4 > > > = > > > May this fixup function should warn iff possible_clones was set to no= n-0 > > > by the driver, but the encoder itself is missing. > > = > > Yeah, I guess we could do that. > = > +1 on that, should catch some bugs at least. > = > Also can you pls fix up the kerneldoc for drm_encoder.possible_clones, > defacto this now means that 0 is a totally fine setting. Sure. And for possible_crtcs I was thinking similar concept: for_each_encoder() if (possible_crtc =3D=3D 0) possible_crtcs =3D all_crtc_mask; -- = Ville Syrj=E4l=E4 Intel _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx