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=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no 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 970A0C2BB1D for ; Fri, 13 Mar 2020 13:58:04 +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 719B5206B7 for ; Fri, 13 Mar 2020 13:58:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 719B5206B7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=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 0855C6EBCA; Fri, 13 Mar 2020 13:58:04 +0000 (UTC) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2DCA76E9CD for ; Fri, 13 Mar 2020 13:58:02 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Mar 2020 06:58:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,548,1574150400"; d="scan'208,217";a="235335557" Received: from irsmsx107.ger.corp.intel.com ([163.33.3.99]) by fmsmga007.fm.intel.com with ESMTP; 13 Mar 2020 06:57:59 -0700 Received: from irsmsx604.ger.corp.intel.com (163.33.146.137) by IRSMSX107.ger.corp.intel.com (163.33.3.99) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 13 Mar 2020 13:57:58 +0000 Received: from irsmsx604.ger.corp.intel.com (163.33.146.137) by IRSMSX604.ger.corp.intel.com (163.33.146.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 13 Mar 2020 13:57:58 +0000 Received: from irsmsx604.ger.corp.intel.com ([163.33.146.137]) by IRSMSX604.ger.corp.intel.com ([163.33.146.137]) with mapi id 15.01.1713.004; Fri, 13 Mar 2020 13:57:58 +0000 From: "Lisovskiy, Stanislav" To: =?iso-8859-1?Q?Ville_Syrj=E4l=E4?= Thread-Topic: [PATCH v19 3/8] drm/i915: Add intel_bw_get_*_state helpers Thread-Index: AQHV9i4Tk0u3HzOHN0aWu4NbMnQsiahDklwAgAKozoaAAE5mgIAABDK0 Date: Fri, 13 Mar 2020 13:57:58 +0000 Message-ID: <93708764786145ff9c8ee2c84af6ff41@intel.com> References: <20200309161204.17792-1-stanislav.lisovskiy@intel.com> <20200309161204.17792-4-stanislav.lisovskiy@intel.com> <20200311160854.GB13686@intel.com> <9ffa74c26bc349aab1bd2fe8f427f451@intel.com>, <20200313132611.GK13686@intel.com> In-Reply-To: <20200313132611.GK13686@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.184.70.1] MIME-Version: 1.0 Subject: Re: [Intel-gfx] [PATCH v19 3/8] drm/i915: Add intel_bw_get_*_state helpers 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" Content-Type: multipart/mixed; boundary="===============0131154532==" Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" --===============0131154532== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_93708764786145ff9c8ee2c84af6ff41intelcom_" --_000_93708764786145ff9c8ee2c84af6ff41intelcom_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable >> >> Add correspondent helpers to be able to get old/new bandwidth >> >> global state object. >> >> >> >> v2: - Fixed typo in function call >> >> v3: - Changed new functions naming to use convention proposed >> >> by Jani Nikula, i.e intel_bw_* in intel_bw.c file. >> >> >Still nak on the rename. >> >> Cool. Discuss it with Jani Nikula then, to have at least some common str= ategy on how to be picky on me. >The strategy is either rename all of these functions or none so that we >don't end up with random inconsistencies all over the place. Initially Jani Nikula wrote that he is trying to encourage people to call f= unctions starting with the module name. OK. Done it. You say that the opposite and nack. Now it just turns out that it is again = _me_ - poor minded, who didn't understand that I need to rename all functions now here as well, including those completely unrelated to tha= t patch. Sure - we have "plenty" of time! Or may be I shouldn't rename - kind of confused now. Best Regards, Lisovskiy Stanislav ________________________________ From: Ville Syrj=E4l=E4 Sent: Friday, March 13, 2020 3:26:11 PM To: Lisovskiy, Stanislav Cc: intel-gfx@lists.freedesktop.org; Ausmus, James; Saarinen, Jani; Roper, = Matthew D Subject: Re: [PATCH v19 3/8] drm/i915: Add intel_bw_get_*_state helpers On Fri, Mar 13, 2020 at 08:49:30AM +0000, Lisovskiy, Stanislav wrote: > >> Add correspondent helpers to be able to get old/new bandwidth > >> global state object. > >> > >> v2: - Fixed typo in function call > >> v3: - Changed new functions naming to use convention proposed > >> by Jani Nikula, i.e intel_bw_* in intel_bw.c file. > > >Still nak on the rename. > > Cool. Discuss it with Jani Nikula then, to have at least some common stra= tegy on how to be picky on me. The strategy is either rename all of these functions or none so that we don't end up with random inconsistencies all over the place. > > Best Regards, > > Lisovskiy Stanislav > ________________________________ > From: Ville Syrj=E4l=E4 > Sent: Wednesday, March 11, 2020 6:08:54 PM > To: Lisovskiy, Stanislav > Cc: intel-gfx@lists.freedesktop.org; Ausmus, James; Saarinen, Jani; Roper= , Matthew D > Subject: Re: [PATCH v19 3/8] drm/i915: Add intel_bw_get_*_state helpers > > On Mon, Mar 09, 2020 at 06:11:59PM +0200, Stanislav Lisovskiy wrote: > > Add correspondent helpers to be able to get old/new bandwidth > > global state object. > > > > v2: - Fixed typo in function call > > v3: - Changed new functions naming to use convention proposed > > by Jani Nikula, i.e intel_bw_* in intel_bw.c file. > > Still nak on the rename. > > > > > Signed-off-by: Stanislav Lisovskiy > > --- > > drivers/gpu/drm/i915/display/intel_bw.c | 33 ++++++++++++++++++++++--- > > drivers/gpu/drm/i915/display/intel_bw.h | 9 +++++++ > > 2 files changed, 39 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/display/intel_bw.c b/drivers/gpu/drm/= i915/display/intel_bw.c > > index 58b264bc318d..bdad7476dc7b 100644 > > --- a/drivers/gpu/drm/i915/display/intel_bw.c > > +++ b/drivers/gpu/drm/i915/display/intel_bw.c > > @@ -374,8 +374,35 @@ static unsigned int intel_bw_data_rate(struct drm_= i915_private *dev_priv, > > return data_rate; > > } > > > > -static struct intel_bw_state * > > -intel_atomic_get_bw_state(struct intel_atomic_state *state) > > +struct intel_bw_state * > > +intel_bw_get_old_state(struct intel_atomic_state *state) > > +{ > > + struct drm_i915_private *dev_priv =3D to_i915(state->base.dev); > > + struct intel_global_state *bw_state; > > + > > + bw_state =3D intel_atomic_get_old_global_obj_state(state, &dev_pr= iv->bw_obj); > > + if (IS_ERR(bw_state)) > > + return ERR_CAST(bw_state); > > + > > + return to_intel_bw_state(bw_state); > > +} > > + > > +struct intel_bw_state * > > +intel_bw_get_new_state(struct intel_atomic_state *state) > > +{ > > + struct drm_i915_private *dev_priv =3D to_i915(state->base.dev); > > + struct intel_global_state *bw_state; > > + > > + bw_state =3D intel_atomic_get_new_global_obj_state(state, &dev_pr= iv->bw_obj); > > + > > + if (IS_ERR(bw_state)) > > + return ERR_CAST(bw_state); > > + > > + return to_intel_bw_state(bw_state); > > +} > > + > > +struct intel_bw_state * > > +intel_bw_get_state(struct intel_atomic_state *state) > > { > > struct drm_i915_private *dev_priv =3D to_i915(state->base.dev); > > struct intel_global_state *bw_state; > > @@ -420,7 +447,7 @@ int intel_bw_atomic_check(struct intel_atomic_state= *state) > > old_active_planes =3D=3D new_active_planes) > > continue; > > > > - bw_state =3D intel_atomic_get_bw_state(state); > > + bw_state =3D intel_bw_get_state(state); > > if (IS_ERR(bw_state)) > > return PTR_ERR(bw_state); > > > > diff --git a/drivers/gpu/drm/i915/display/intel_bw.h b/drivers/gpu/drm/= i915/display/intel_bw.h > > index a8aa7624c5aa..b5f61463922f 100644 > > --- a/drivers/gpu/drm/i915/display/intel_bw.h > > +++ b/drivers/gpu/drm/i915/display/intel_bw.h > > @@ -24,6 +24,15 @@ struct intel_bw_state { > > > > #define to_intel_bw_state(x) container_of((x), struct intel_bw_state, = base) > > > > +struct intel_bw_state * > > +intel_bw_get_old_state(struct intel_atomic_state *state); > > + > > +struct intel_bw_state * > > +intel_bw_get_new_state(struct intel_atomic_state *state); > > + > > +struct intel_bw_state * > > +intel_bw_get_state(struct intel_atomic_state *state); > > + > > void intel_bw_init_hw(struct drm_i915_private *dev_priv); > > int intel_bw_init(struct drm_i915_private *dev_priv); > > int intel_bw_atomic_check(struct intel_atomic_state *state); > > -- > > 2.24.1.485.gad05a3d8e5 > > -- > Ville Syrj=E4l=E4 > Intel -- Ville Syrj=E4l=E4 Intel --_000_93708764786145ff9c8ee2c84af6ff41intelcom_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

>> >> Add correspondent helpers to be a= ble to get old/new bandwidth
>> >> global state object.
>> >>
>> >> v2: - Fixed typo in function call
>> >> v3: - Changed new functions naming t= o use convention proposed
>> >>       = by Jani Nikula, i.e intel_bw_* in intel_bw.c file.
>>
>> >Still nak on the rename.
>>
>> Cool. Discuss it with Jani Nikula then, to ha= ve at least some common strategy on how to be picky on me.

>The strategy is either rename all of these functio= ns or none so that we
>don't end up with random inconsistencies all over = the place.


Initially Jani Nikula wrote that he is trying to encourage people to cal= l functions

starting with the module name. OK. Done it.


You say that the opposite and nack. Now it just turns out that it is again _me_ - poor minded, who didn't und= erstand that I need to rename

all functions now here as well, including those completely unrelated to = that patch.

Sure - we have "plenty" of time= !


Or may be I shouldn't rename - kind of confused now. 


Best Regards,

Lisovskiy Stanislav

From: Ville Syrj=E4l=E4 &= lt;ville.syrjala@linux.intel.com>
Sent: Friday, March 13, 2020 3:26:11 PM
To: Lisovskiy, Stanislav
Cc: intel-gfx@lists.freedesktop.org; Ausmus, James; Saarinen, Jani; = Roper, Matthew D
Subject: Re: [PATCH v19 3/8] drm/i915: Add intel_bw_get_*_state help= ers
 
On Fri, Mar 13, 2020 at 08:49:30AM +0000, Liso= vskiy, Stanislav wrote:
> >> Add correspondent helpers to be able to get old/new bandwidth=
> >> global state object.
> >>
> >> v2: - Fixed typo in function call
> >> v3: - Changed new functions naming to use convention proposed=
> >>       by Jani Nikula, i.e intel= _bw_* in intel_bw.c file.
>
> >Still nak on the rename.
>
> Cool. Discuss it with Jani Nikula then, to have at least some common s= trategy on how to be picky on me.

The strategy is either rename all of these functions or none so that we
don't end up with random inconsistencies all over the place.

>
> Best Regards,
>
> Lisovskiy Stanislav
> ________________________________
> From: Ville Syrj=E4l=E4 <ville.syrjala@linux.intel.com>
> Sent: Wednesday, March 11, 2020 6:08:54 PM
> To: Lisovskiy, Stanislav
> Cc: intel-gfx@lists.freedesktop.org; Ausmus, James; Saarinen, Jani; Ro= per, Matthew D
> Subject: Re: [PATCH v19 3/8] drm/i915: Add intel_bw_get_*_state helper= s
>
> On Mon, Mar 09, 2020 at 06:11:59PM +0200, Stanislav Lisovskiy wrot= e:
> > Add correspondent helpers to be able to get old/new bandwidth
> > global state object.
> >
> > v2: - Fixed typo in function call
> > v3: - Changed new functions naming to use convention proposed
> >       by Jani Nikula, i.e intel_bw_= * in intel_bw.c file.
>
> Still nak on the rename.
>
> >
> > Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.= com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_bw.c | 33 +++= ;+++++++++++++++= ;++++---
> >  drivers/gpu/drm/i915/display/intel_bw.h |  9 ++= ;+++++
> >  2 files changed, 39 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_bw.c b/drivers/gp= u/drm/i915/display/intel_bw.c
> > index 58b264bc318d..bdad7476dc7b 100644
> > --- a/drivers/gpu/drm/i915/display/intel_bw.c
> > +++ b/drivers/gpu/drm/i915/display/intel_bw.c
> > @@ -374,8 +374,35 @@ static unsigned int intel_bw_data_rate(s= truct drm_i915_private *dev_priv,
> >        return data_rate;
> >  }
> >
> > -static struct intel_bw_state *
> > -intel_atomic_get_bw_state(struct intel_atomic_state *state)
> > +struct intel_bw_state *
> > +intel_bw_get_old_state(struct intel_atomic_state *state)
> > +{
> > +     struct drm_i915_private *dev_priv = =3D to_i915(state->base.dev);
> > +     struct intel_global_state *bw_state= ;
> > +
> > +     bw_state =3D intel_atomic_get_old_g= lobal_obj_state(state, &dev_priv->bw_obj);
> > +     if (IS_ERR(bw_state))
> > +          =    return ERR_CAST(bw_state);
> > +
> > +     return to_intel_bw_state(bw_state);=
> > +}
> > +
> > +struct intel_bw_state *
> > +intel_bw_get_new_state(struct intel_atomic_state *state)
> > +{
> > +     struct drm_i915_private *dev_priv = =3D to_i915(state->base.dev);
> > +     struct intel_global_state *bw_state= ;
> > +
> > +     bw_state =3D intel_atomic_get_new_g= lobal_obj_state(state, &dev_priv->bw_obj);
> > +
> > +     if (IS_ERR(bw_state))
> > +          =    return ERR_CAST(bw_state);
> > +
> > +     return to_intel_bw_state(bw_state);=
> > +}
> > +
> > +struct intel_bw_state *
> > +intel_bw_get_state(struct intel_atomic_state *state)
> >  {
> >        struct drm_i915_private= *dev_priv =3D to_i915(state->base.dev);
> >        struct intel_global_sta= te *bw_state;
> > @@ -420,7 +447,7 @@ int intel_bw_atomic_check(struct intel_at= omic_state *state)
> >           =          old_active_planes =3D=3D n= ew_active_planes)
> >           =              co= ntinue;
> >
> > -          &nbs= p;  bw_state  =3D intel_atomic_get_bw_state(state);
> > +          =    bw_state  =3D intel_bw_get_state(state);
> >           =      if (IS_ERR(bw_state))
> >           =              re= turn PTR_ERR(bw_state);
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_bw.h b/drivers/gp= u/drm/i915/display/intel_bw.h
> > index a8aa7624c5aa..b5f61463922f 100644
> > --- a/drivers/gpu/drm/i915/display/intel_bw.h
> > +++ b/drivers/gpu/drm/i915/display/intel_bw.h
> > @@ -24,6 +24,15 @@ struct intel_bw_state {
> >
> >  #define to_intel_bw_state(x) container_of((x), struct intel= _bw_state, base)
> >
> > +struct intel_bw_state *
> > +intel_bw_get_old_state(struct intel_atomic_state *state); > > +
> > +struct intel_bw_state *
> > +intel_bw_get_new_state(struct intel_atomic_state *state); > > +
> > +struct intel_bw_state *
> > +intel_bw_get_state(struct intel_atomic_state *state);
> > +
> >  void intel_bw_init_hw(struct drm_i915_private *dev_priv); > >  int intel_bw_init(struct drm_i915_private *dev_priv);
> >  int intel_bw_atomic_check(struct intel_atomic_state *state)= ;
> > --
> > 2.24.1.485.gad05a3d8e5
>
> --
> Ville Syrj=E4l=E4
> Intel

--
Ville Syrj=E4l=E4
Intel
--_000_93708764786145ff9c8ee2c84af6ff41intelcom_-- --===============0131154532== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx --===============0131154532==--