Re: [Intel-gfx] [PATCH] drm/i915: Fix intel_dp_atomic_find_vcpi_slots function

2022-09-06 Thread Jani Nikula
On Tue, 06 Sep 2022, "Lisovskiy, Stanislav"  
wrote:
> On Tue, Sep 06, 2022 at 02:57:34PM +0300, Ville Syrjälä wrote:
>> On Tue, Sep 06, 2022 at 01:23:29PM +0300, Stanislav Lisovskiy wrote:
>> > drm_dp_atomic_find_vcpi_slots no longer exists and needs
>> > to be used as drm_dp_atomic_find_time_slots.
>> > Also rename the function itself.
>> > 
>> > Signed-off-by: Stanislav Lisovskiy 
>> > Fixes: 7ae5ab441402 ("Extract drm_dp_atomic_find_vcpi_slots cycle to 
>> > separate function")
>> 
>> The problem only exists in drm-tip. You need to revert the 
>> bad merge from rerere-cache and redo it.
>> 
>> And please always test build drm-tip after solving merge conflicts!
>
> I would really like to figure out how it did end like that.
>
> Here is the sequence of what I've been doing:
>
> 1) There was a series supposed to be merged which had this new
>change already in place i.e using drm_dp_atomic_find_time_slots.
> 2) Then using dim tools I started pushing according to workflow:
>a) dim update-branches
>b) dim checkout drm-intel-next
>c) wget those series mbox and run dim apply-branch drm-intel-next
>   Got conflict: it was complaining about those changes around
>   drm_dp_atomic_find_time_slots and after some checking I figured
>   out that drm_dp_atomic_find_time_slots doesn't exist anymore.
>   Here probably was my bad, as I wrongly assumed that those changes
>   were probably reverted as it was also mentioned, that there was
>   regression because of those.
>   
>   So I resolved this conflict by putting drm_dp_atomic_find_vcpi_slots
>   back instead of drm_dp_atomic_find_time_slots _and_ actually
>   built it even.

The rule of thumb is, don't resolve conflicts while applying
patches. Apply the patches as they were posted to the mailing list.

If your patches apply to drm-tip but not to drm-intel-next, you'll know
there's stuff in other branches that affect the lines. You'll end up
with problems both at patch apply and drm-tip rebuild if you don't get
the baseline right first.

>From the committer guidelines:

* As a general rule, do not modify the patches while applying, apart from the
  commit message. If the patch conflicts, or needs to be changed due to review,
  have the author rebase, update and resend. Any change at this stage is a
  potential issue bypassing CI.

BR,
Jani.

>
>d) I run dim push-branch drm-intel-next, it did complain about merge
>   conflict again with drm-intel-next which I fixed and results were
>   pushed.
>   I should have build at this moment as well probably. 
>  
>   Then I noticed that this function drm_dp_atomic_find_vcpi_slots
>   doesn't exist in drm. So basically patches should have been pushed
>   as they were initially, but why the conflict appeared initially - that 
> is my
>   question.
>
> Stan
>
>> 
>> -- 
>> Ville Syrjälä
>> Intel

-- 
Jani Nikula, Intel Open Source Graphics Center


Re: [Intel-gfx] [PATCH] drm/i915: Fix intel_dp_atomic_find_vcpi_slots function

2022-09-06 Thread Ville Syrjälä
On Tue, Sep 06, 2022 at 03:27:17PM +0300, Lisovskiy, Stanislav wrote:
> On Tue, Sep 06, 2022 at 02:57:34PM +0300, Ville Syrjälä wrote:
> > On Tue, Sep 06, 2022 at 01:23:29PM +0300, Stanislav Lisovskiy wrote:
> > > drm_dp_atomic_find_vcpi_slots no longer exists and needs
> > > to be used as drm_dp_atomic_find_time_slots.
> > > Also rename the function itself.
> > > 
> > > Signed-off-by: Stanislav Lisovskiy 
> > > Fixes: 7ae5ab441402 ("Extract drm_dp_atomic_find_vcpi_slots cycle to 
> > > separate function")
> > 
> > The problem only exists in drm-tip. You need to revert the 
> > bad merge from rerere-cache and redo it.
> > 
> > And please always test build drm-tip after solving merge conflicts!
> 
> I would really like to figure out how it did end like that.
> 
> Here is the sequence of what I've been doing:
> 
> 1) There was a series supposed to be merged which had this new
>change already in place i.e using drm_dp_atomic_find_time_slots.
> 2) Then using dim tools I started pushing according to workflow:
>a) dim update-branches
>b) dim checkout drm-intel-next
>c) wget those series mbox and run dim apply-branch drm-intel-next
>   Got conflict: it was complaining about those changes around
>   drm_dp_atomic_find_time_slots and after some checking I figured
>   out that drm_dp_atomic_find_time_slots doesn't exist anymore.
>   Here probably was my bad, as I wrongly assumed that those changes
>   were probably reverted as it was also mentioned, that there was
>   regression because of those.
>   
>   So I resolved this conflict by putting drm_dp_atomic_find_vcpi_slots
>   back instead of drm_dp_atomic_find_time_slots _and_ actually
>   built it even.
>
>d) I run dim push-branch drm-intel-next, it did complain about merge
>   conflict again with drm-intel-next which I fixed and results were
>   pushed.
>   I should have build at this moment as well probably. 

Yes. You didn't resolve the conflict correctly, thus the build failure.

-- 
Ville Syrjälä
Intel


Re: [Intel-gfx] [PATCH] drm/i915: Fix intel_dp_atomic_find_vcpi_slots function

2022-09-06 Thread Lisovskiy, Stanislav
On Tue, Sep 06, 2022 at 02:57:34PM +0300, Ville Syrjälä wrote:
> On Tue, Sep 06, 2022 at 01:23:29PM +0300, Stanislav Lisovskiy wrote:
> > drm_dp_atomic_find_vcpi_slots no longer exists and needs
> > to be used as drm_dp_atomic_find_time_slots.
> > Also rename the function itself.
> > 
> > Signed-off-by: Stanislav Lisovskiy 
> > Fixes: 7ae5ab441402 ("Extract drm_dp_atomic_find_vcpi_slots cycle to 
> > separate function")
> 
> The problem only exists in drm-tip. You need to revert the 
> bad merge from rerere-cache and redo it.
> 
> And please always test build drm-tip after solving merge conflicts!

I would really like to figure out how it did end like that.

Here is the sequence of what I've been doing:

1) There was a series supposed to be merged which had this new
   change already in place i.e using drm_dp_atomic_find_time_slots.
2) Then using dim tools I started pushing according to workflow:
   a) dim update-branches
   b) dim checkout drm-intel-next
   c) wget those series mbox and run dim apply-branch drm-intel-next
  Got conflict: it was complaining about those changes around
  drm_dp_atomic_find_time_slots and after some checking I figured
  out that drm_dp_atomic_find_time_slots doesn't exist anymore.
  Here probably was my bad, as I wrongly assumed that those changes
  were probably reverted as it was also mentioned, that there was
  regression because of those.
  
  So I resolved this conflict by putting drm_dp_atomic_find_vcpi_slots
  back instead of drm_dp_atomic_find_time_slots _and_ actually
  built it even.
   
   d) I run dim push-branch drm-intel-next, it did complain about merge
  conflict again with drm-intel-next which I fixed and results were
  pushed.
  I should have build at this moment as well probably. 
 
  Then I noticed that this function drm_dp_atomic_find_vcpi_slots
  doesn't exist in drm. So basically patches should have been pushed
  as they were initially, but why the conflict appeared initially - that is 
my
  question.

Stan

> 
> -- 
> Ville Syrjälä
> Intel


Re: [Intel-gfx] [PATCH] drm/i915: Fix intel_dp_atomic_find_vcpi_slots function

2022-09-06 Thread Ville Syrjälä
On Tue, Sep 06, 2022 at 01:23:29PM +0300, Stanislav Lisovskiy wrote:
> drm_dp_atomic_find_vcpi_slots no longer exists and needs
> to be used as drm_dp_atomic_find_time_slots.
> Also rename the function itself.
> 
> Signed-off-by: Stanislav Lisovskiy 
> Fixes: 7ae5ab441402 ("Extract drm_dp_atomic_find_vcpi_slots cycle to separate 
> function")

The problem only exists in drm-tip. You need to revert the 
bad merge from rerere-cache and redo it.

And please always test build drm-tip after solving merge conflicts!

-- 
Ville Syrjälä
Intel


[Intel-gfx] [PATCH] drm/i915: Fix intel_dp_atomic_find_vcpi_slots function

2022-09-06 Thread Stanislav Lisovskiy
drm_dp_atomic_find_vcpi_slots no longer exists and needs
to be used as drm_dp_atomic_find_time_slots.
Also rename the function itself.

Signed-off-by: Stanislav Lisovskiy 
Fixes: 7ae5ab441402 ("Extract drm_dp_atomic_find_vcpi_slots cycle to separate 
function")
---
 drivers/gpu/drm/i915/display/intel_dp_mst.c | 18 --
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c 
b/drivers/gpu/drm/i915/display/intel_dp_mst.c
index 8869b7707cda..54a7b31162c2 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
@@ -44,7 +44,7 @@
 #include "intel_hotplug.h"
 #include "skl_scaler.h"
 
-static int intel_dp_mst_find_vcpi_slots_for_bpp(struct intel_encoder *encoder,
+static int intel_dp_mst_find_time_slots_for_bpp(struct intel_encoder *encoder,
struct intel_crtc_state 
*crtc_state,
int max_bpp,
int min_bpp,
@@ -64,7 +64,6 @@ static int intel_dp_mst_find_vcpi_slots_for_bpp(struct 
intel_encoder *encoder,
_state->hw.adjusted_mode;
int bpp, slots = -EINVAL;
int ret = 0;
-   int pbn_div;
 
mst_state = drm_atomic_get_mst_topology_state(state, 
_dp->mst_mgr);
if (IS_ERR(mst_state))
@@ -73,9 +72,9 @@ static int intel_dp_mst_find_vcpi_slots_for_bpp(struct 
intel_encoder *encoder,
crtc_state->lane_count = limits->max_lane_count;
crtc_state->port_clock = limits->max_rate;
 
-   pbn_div = drm_dp_get_vc_payload_bw(_dp->mst_mgr,
-  crtc_state->port_clock,
-  crtc_state->lane_count);
+   mst_state->pbn_div = drm_dp_get_vc_payload_bw(_dp->mst_mgr,
+ crtc_state->port_clock,
+ crtc_state->lane_count);
 
for (bpp = max_bpp; bpp >= min_bpp; bpp -= step) {
crtc_state->pipe_bpp = bpp;
@@ -84,10 +83,9 @@ static int intel_dp_mst_find_vcpi_slots_for_bpp(struct 
intel_encoder *encoder,
   dsc ? bpp << 4 : 
crtc_state->pipe_bpp,
   dsc);
 
-   slots = drm_dp_atomic_find_vcpi_slots(state, _dp->mst_mgr,
+   slots = drm_dp_atomic_find_time_slots(state, _dp->mst_mgr,
  connector->port,
- crtc_state->pbn,
- pbn_div);
+ crtc_state->pbn);
if (slots == -EDEADLK)
return slots;
 
@@ -126,7 +124,7 @@ static int intel_dp_mst_compute_link_config(struct 
intel_encoder *encoder,
bool constant_n = drm_dp_has_quirk(_dp->desc, 
DP_DPCD_QUIRK_CONSTANT_N);
int slots = -EINVAL;
 
-   slots = intel_dp_mst_find_vcpi_slots_for_bpp(encoder, crtc_state, 
limits->max_bpp,
+   slots = intel_dp_mst_find_time_slots_for_bpp(encoder, crtc_state, 
limits->max_bpp,
 limits->min_bpp, limits,
 conn_state, 2 * 3, false);
 
@@ -184,7 +182,7 @@ static int intel_dp_dsc_mst_compute_link_config(struct 
intel_encoder *encoder,
drm_dbg_kms(>drm, "DSC Sink supported min bpp %d max bpp %d\n",
min_bpp, max_bpp);
 
-   slots = intel_dp_mst_find_vcpi_slots_for_bpp(encoder, crtc_state, 
max_bpp,
+   slots = intel_dp_mst_find_time_slots_for_bpp(encoder, crtc_state, 
max_bpp,
 min_bpp, limits,
 conn_state, 2 * 3, true);
 
-- 
2.37.3