Re: HEADS UP: Merging drm update

2021-12-19 Thread Kengo NAKAHARA

Hi,

On 2021/12/19 21:48, Taylor R Campbell wrote:

Date: Sun, 19 Dec 2021 01:42:53 +
From: Taylor R Campbell 


Date: Sat, 18 Dec 2021 17:06:13 +
From: Taylor R Campbell 

I'm planning to merge the drm update this weekend -- a cvs import and
merge commit, plus about 1300 commits on top of that from the git
repository.


The update is in progress, but my commitbomb script isn't perfect and
sometimes requires manual intervention, which won't happen while I'm
asleep.  The tree might not build for a few hours in that event.
Apologies in advance!


The commitbomb is done -- drm update merged.  There may be build
fallout; let me know if so and I'll try to take care of it.


GENERIC kernel without DIAGNOSTIC option fails to build.
Could you apply the following patch?

https://github.com/knakahara/netbsd-src/commit/b1c93870ef5689201b6eb7e08811bc40e3e1543e

Here is the same patch.

diff --git a/sys/external/bsd/drm2/dist/drm/i915/gt/intel_lrc.c 
b/sys/external/bsd/drm2/dist/drm/i915/gt/intel_lrc.c
index ac348156cd0..4464bc69dce 100644
--- a/sys/external/bsd/drm2/dist/drm/i915/gt/intel_lrc.c
+++ b/sys/external/bsd/drm2/dist/drm/i915/gt/intel_lrc.c
@@ -2248,7 +2248,7 @@ gen12_csb_parse(const struct intel_engine_execlists 
*execlists, const u32 *csb)
 {
u32 lower_dw = csb[0];
u32 upper_dw = csb[1];
-   bool ctx_to_valid = GEN12_CSB_CTX_VALID(lower_dw);
+   bool ctx_to_valid __diagused = GEN12_CSB_CTX_VALID(lower_dw);
bool ctx_away_valid = GEN12_CSB_CTX_VALID(upper_dw);
bool new_queue = lower_dw & GEN12_CTX_STATUS_SWITCHED_TO_NEW_QUEUE;
 
diff --git a/sys/external/bsd/drm2/dist/drm/i915/gt/intel_reset.c b/sys/external/bsd/drm2/dist/drm/i915/gt/intel_reset.c

index be7b47e3828..b0948d7b8e1 100644
--- a/sys/external/bsd/drm2/dist/drm/i915/gt/intel_reset.c
+++ b/sys/external/bsd/drm2/dist/drm/i915/gt/intel_reset.c
@@ -1120,7 +1120,7 @@ static inline int intel_gt_reset_engine(struct 
intel_engine_cs *engine)
  */
 int intel_engine_reset(struct intel_engine_cs *engine, const char *msg)
 {
-   struct intel_gt *gt = engine->gt;
+   struct intel_gt *gt __diagused = engine->gt;
bool uses_guc = intel_engine_in_guc_submission_mode(engine);
int ret;
 
diff --git a/sys/external/bsd/drm2/dist/drm/i915/gt/intel_ring_submission.c b/sys/external/bsd/drm2/dist/drm/i915/gt/intel_ring_submission.c

index 1becea96e4b..26e7d097dea 100644
--- a/sys/external/bsd/drm2/dist/drm/i915/gt/intel_ring_submission.c
+++ b/sys/external/bsd/drm2/dist/drm/i915/gt/intel_ring_submission.c
@@ -1946,7 +1946,7 @@ static void setup_bcs(struct intel_engine_cs *engine)
 
 static void setup_vecs(struct intel_engine_cs *engine)

 {
-   struct drm_i915_private *i915 = engine->i915;
+   struct drm_i915_private *i915 __diagused = engine->i915;
 
 	GEM_BUG_ON(INTEL_GEN(i915) < 7);
 
diff --git a/sys/external/bsd/drm2/dist/drm/i915/gt/uc/intel_guc_fw.c b/sys/external/bsd/drm2/dist/drm/i915/gt/uc/intel_guc_fw.c

index 33af59c0fab..440ecc6a9b7 100644
--- a/sys/external/bsd/drm2/dist/drm/i915/gt/uc/intel_guc_fw.c
+++ b/sys/external/bsd/drm2/dist/drm/i915/gt/uc/intel_guc_fw.c
@@ -64,7 +64,7 @@ static void guc_xfer_rsa(struct intel_uc_fw *guc_fw,
 struct intel_uncore *uncore)
 {
u32 rsa[UOS_RSA_SCRATCH_COUNT];
-   size_t copied;
+   size_t copied __diagused;
int i;
 
 	copied = intel_uc_fw_copy_rsa(guc_fw, rsa, sizeof(rsa));

diff --git a/sys/external/bsd/drm2/dist/drm/i915/gt/uc/intel_huc.c 
b/sys/external/bsd/drm2/dist/drm/i915/gt/uc/intel_huc.c
index 1bb5944efab..23d8fb22577 100644
--- a/sys/external/bsd/drm2/dist/drm/i915/gt/uc/intel_huc.c
+++ b/sys/external/bsd/drm2/dist/drm/i915/gt/uc/intel_huc.c
@@ -64,7 +64,7 @@ static int intel_huc_rsa_data_create(struct intel_huc *huc)
struct intel_gt *gt = huc_to_gt(huc);
struct intel_guc *guc = >->uc.guc;
struct i915_vma *vma;
-   size_t copied;
+   size_t copied __diagused;
void *vaddr;
int err;
 
diff --git a/sys/external/bsd/drm2/dist/drm/i915/i915_request.c b/sys/external/bsd/drm2/dist/drm/i915/i915_request.c

index e3ba11e16cc..9030365c689 100644
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_request.c
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_request.c
@@ -1290,7 +1290,7 @@ __i915_request_add_to_timeline(struct i915_request *rq)
 struct i915_request *__i915_request_commit(struct i915_request *rq)
 {
struct intel_engine_cs *engine = rq->engine;
-   struct intel_ring *ring = rq->ring;
+   struct intel_ring *ring __diagused = rq->ring;
u32 *cs;
 
 	RQ_TRACE(rq, "\n");

diff --git a/sys/external/bsd/drm2/dist/drm/i915/i915_scheduler.c 
b/sys/external/bsd/drm2/dist/drm/i915/i915_scheduler.c
index 30e63daa6a6..af3489bbdc7 100644
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_scheduler.c
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_scheduler.c
@@ -55,7 +55,7 @@ static inline struct i915_priolist *to_p

re: HEADS UP: Merging drm update

2021-12-19 Thread matthew green
> Please update and try again?  (I've only compile-tested the changes,
> will take a closer look tomorrow if it doesn't fix the problem.)

seems to work for me.  i can once again mostly play 720p video
with "mpv -vo x11".

thanks!


.mrg.


Re: HEADS UP: Merging drm update

2021-12-19 Thread Taylor R Campbell
> Date: Sun, 19 Dec 2021 23:51:58 +
> From: Taylor R Campbell 
> 
> > Date: Sun, 19 Dec 2021 21:41:14 +0100
> > From: Benny Siegert 
> > 
> > Meanwhile, I built a new kernel from HEAD on my Pinebook Pro. There is
> > a bit of a pause when DRM is initialized during boot, and X is
> > basically unusable -- it takes a minute or so to draw the login screen
> > (slim).
> > [...]
> > This is not working as intended, I suppose? :)
> 
> Oops -- the rockchip vblank logic got lost in the shuffle to elide
> debug commits from the commitbomb.  The necessary logic is in
> 
> but I need to dust it off and commit it properly with a little less
> debugging crud!

Please update and try again?  (I've only compile-tested the changes,
will take a closer look tomorrow if it doesn't fix the problem.)


Re: HEADS UP: Merging drm update

2021-12-19 Thread Taylor R Campbell
> Date: Sun, 19 Dec 2021 21:41:14 +0100
> From: Benny Siegert 
> 
> Meanwhile, I built a new kernel from HEAD on my Pinebook Pro. There is
> a bit of a pause when DRM is initialized during boot, and X is
> basically unusable -- it takes a minute or so to draw the login screen
> (slim).
> [...]
> This is not working as intended, I suppose? :)

Oops -- the rockchip vblank logic got lost in the shuffle to elide
debug commits from the commitbomb.  The necessary logic is in

but I need to dust it off and commit it properly with a little less
debugging crud!


Re: HEADS UP: Merging drm update

2021-12-19 Thread Benny Siegert
On Sun, Dec 19, 2021 at 2:35 PM nia  wrote:
> > > > I'm planning to merge the drm update this weekend -- a cvs import and
> > > > merge commit, plus about 1300 commits on top of that from the git
> > > > repository.
>
> thank you Maya and Taylor for this monumental effort!

Yes, thank you, this is great!! :)

Meanwhile, I built a new kernel from HEAD on my Pinebook Pro. There is
a bit of a pause when DRM is initialized during boot, and X is
basically unusable -- it takes a minute or so to draw the login screen
(slim).

On the console, I see these:

[   5.3118036] video0 at uvideo0: Sonix Technology Co., Ltd. (0x0c45)
USB Camera (0x6321), rev 2.00/0.00, addr 3
[  12.4019283] {drm:netbsd:drm_atomic_helper_wait_for_dependencies+0x788}
*ERROR* [CRTC:38:crtc-1] flip_done timed out
[  22.4020997] {drm:netbsd:drm_atomic_helper_wait_for_dependencies+0x7f8}
*ERROR* [CONNECTOR:35:eDP-1] flip_done timed out
[  32.4022714] {drm:netbsd:drm_atomic_helper_wait_for_dependencies+0x824}
*ERROR* [PLANE:36:plane-1] flip_done timed out
[  32.4022714] warning:
/usr/src/src/sys/external/bsd/drm2/dist/drm/drm_atomic_helper.c:1083:
driver forgot to call drm_crtc_vblank_off()
[  32.4022714] warning:
/usr/src/src/sys/external/bsd/drm2/dist/drm/drm_atomic_helper.c:2313:
new_crtc_state->event
[  42.4024501] {drm:netbsd:drm_atomic_helper_wait_for_dependencies+0x788}
*ERROR* [CRTC:38:crtc-1] flip_done timed out
[  52.4026288] {drm:netbsd:drm_atomic_helper_wait_for_dependencies+0x7f8}
*ERROR* [CONNECTOR:35:eDP-1] flip_done timed out
[  62.4028023] {drm:netbsd:drm_atomic_helper_wait_for_dependencies+0x824}
*ERROR* [PLANE:36:plane-1] flip_done timed out
[  62.6028057] warning:
/usr/src/src/sys/external/bsd/drm2/dist/drm/drm_atomic_helper.c:2313:
new_crtc_state->event

[...]

[  78.4135804] {drm:netbsd:drm_atomic_helper_wait_for_dependencies+0x788}
*ERROR* [CRTC:38:crtc-1] flip_done timed out
[  88.4140717] {drm:netbsd:drm_atomic_helper_wait_for_dependencies+0x7f8}
*ERROR* [CONNECTOR:35:eDP-1] flip_done timed out
[  98.4146493] {drm:netbsd:drm_atomic_helper_wait_for_dependencies+0x824}
*ERROR* [PLANE:36:plane-1] flip_done timed out
[  98.4146493] warning:
/usr/src/src/sys/external/bsd/drm2/dist/drm/drm_atomic_helper.c:2313:
new_crtc_state->event
[ 109.6452513] {drm:netbsd:drm_atomic_helper_wait_for_dependencies+0x788}
*ERROR* [CRTC:38:crtc-1] flip_done timed out
[ 119.6458660] {drm:netbsd:drm_atomic_helper_wait_for_dependencies+0x7f8}
*ERROR* [CONNECTOR:35:eDP-1] flip_done timed out
[ 129.6464760] {drm:netbsd:drm_atomic_helper_wait_for_dependencies+0x824}
*ERROR* [PLANE:36:plane-1] flip_done timed out
[ 129.6464760] warning:
/usr/src/src/sys/external/bsd/drm2/dist/drm/drm_atomic_helper.c:2313:
new_crtc_state->event

This is not working as intended, I suppose? :)

-- 
Benny



-- 
Benny


Automated report: NetBSD-current/i386 build success

2021-12-19 Thread NetBSD Test Fixture
The NetBSD-current/i386 build is working again.

The following commits were made between the last failed build and the
successful build:

2021.12.19.16.01.29 riastradh src/sys/modules/viadrmums/Makefile,v 1.5

Logs can be found at:


http://releng.NetBSD.org/b5reports/i386/commits-2021.12.html#2021.12.19.16.01.29


Re: HEADS UP: Merging drm update

2021-12-19 Thread nia
On Sun, Dec 19, 2021 at 12:48:15PM +, Taylor R Campbell wrote:
> > Date: Sun, 19 Dec 2021 01:42:53 +
> > From: Taylor R Campbell 
> > 
> > > Date: Sat, 18 Dec 2021 17:06:13 +
> > > From: Taylor R Campbell 
> > > 
> > > I'm planning to merge the drm update this weekend -- a cvs import and
> > > merge commit, plus about 1300 commits on top of that from the git
> > > repository.
> > 
> > The update is in progress, but my commitbomb script isn't perfect and
> > sometimes requires manual intervention, which won't happen while I'm
> > asleep.  The tree might not build for a few hours in that event.
> > Apologies in advance!
> 
> The commitbomb is done -- drm update merged.  There may be build
> fallout; let me know if so and I'll try to take care of it.

thank you Maya and Taylor for this monumental effort!


Re: HEADS UP: Merging drm update

2021-12-19 Thread Taylor R Campbell
> Date: Sun, 19 Dec 2021 01:42:53 +
> From: Taylor R Campbell 
> 
> > Date: Sat, 18 Dec 2021 17:06:13 +
> > From: Taylor R Campbell 
> > 
> > I'm planning to merge the drm update this weekend -- a cvs import and
> > merge commit, plus about 1300 commits on top of that from the git
> > repository.
> 
> The update is in progress, but my commitbomb script isn't perfect and
> sometimes requires manual intervention, which won't happen while I'm
> asleep.  The tree might not build for a few hours in that event.
> Apologies in advance!

The commitbomb is done -- drm update merged.  There may be build
fallout; let me know if so and I'll try to take care of it.