00:41 anholt: jekstrand: we've got a bunch of arrays of BOs, and need to look up bo ptr index in those arrays. would you use sparse_arrays next to each of those with the bo ptr as the key to do that reverse mapping?
00:41 anholt: (we're using the HT right now, and I keep wishing we had something else for this.
00:42 jekstrand: I'm using sparse_array right now in ANV to manage our list of all BOs ever
00:42 jekstrand: The anv_bo struct lives in the sparse array
00:42 jekstrand: it's indexed by GEM handle
00:42 jekstrand: Not sure if that's the kind of thing you're thinking of
00:43 jekstrand: The primary reason for that is that it's thread-safe, more compact than a hash table of pointers, and the pointers survive forever unlike an array that you occasionally realloc.
00:44 jekstrand: anholt: I'm afraid I don't really understand your use-case. It sounds like a pretty good use of a hash table on the surface.
00:44 jekstrand: I'm sure there's some reason why it's not
00:46 anholt: the HT is sparse, and the data pointer is sparse, and the hashing of the pointer as a key is expensive and I've had this problem in multiple drivers ("how do I put together my list of BOs used in a submit, given many sets of BO pointers")
00:47 jekstrand: Right
00:47 jekstrand: We have that problem in ANV right now
00:47 jekstrand: I haven't done it yet, but I'm tempted, now that I have the sparse_array, to make them bitsets
00:47 jekstrand: Oh, no, they are bit sets
00:47 jekstrand: I did that
00:47 jekstrand: indexed on GEM handle
00:48 anholt: hmm. bitset by GEM handle for presence in the list. interesting.
00:48 anholt: there's still the lookup from BO ptr or handle to index, for ORing in some submit flags attached per BO.
00:48 jekstrand: b3c0b1b21880
00:49 jekstrand: Cut 3% off a benchmark
00:49 jekstrand: Yeah, at the end, once you've ORed them all together, you have to walk the bitset and look up each BO in the sparse_array
00:50 jekstrand: But the theory is that a bunch of sparse_array lookups at execbuf time is way less expensive than the hash table search/insert for every single BO reference.
00:50 jekstrand: FYI: On Intel, a util_sparse_array lookup is about 3x as expensive as a bare array lookup.
00:50 jekstrand: I have no idea what the expense is like on ARM
00:51 anholt: we avoid the HT search in the common case by having a uint32_t in the BO for a "likely index" set by the last thread doing a lookup in its array
00:51 jekstrand: Yeah, that's what iris does, roughly.[
00:51 jekstrand: Actually, iris falls back to a linear array search if the index is ever wrong
00:52 anholt: that's what I had in v3d
00:52 anholt: it sucked
00:52 jekstrand: Well, iris only has two batches going at a time and usually only one.
00:52 jekstrand: That helps keep the miss count low
00:52 anholt: (in vc4 for a long time at least I didn't even have the likely value!)
00:53 jekstrand: over-all, I think the bitsets work pretty well.
00:54 jekstrand: If you're using < 1/128 of your BOs in any given batch, it can be more space than the hash table.
00:54 jekstrand: But also, if that's the case then your batches are either really small or else your app has a *lot* of resources.
00:54 anholt: I think the bitset idea for us would be "when the likely value misses, check our bitset. if not, then add to the list and to the bitset. if we find a hit in the bitset, it means we're doing multithreaded submits with this BO, so go make the HT now"
00:54 jekstrand: Why bother with the hash table if you're going to use the bitset?
00:55 jekstrand: There's not that much advantage to building the array as-you-go.
00:55 jekstrand: Sounds unnecessarily complicated to me
00:55 anholt: because we still need to find our index, so this is keeping us from needing to ht in the common case of single threaded submits per bo
00:55 jekstrand: Why? Are you accumulating more than just a set of BOs?
00:56 jekstrand: Do you need to also accumulate per-BO usage flags or something like that?
00:56 anholt: right now each reloc finds the BO's location in the submit's array and ORs in its flags (or appends to the submit array with the BO and the flags
00:56 jekstrand: ORs its flags into what?
00:56 anholt: the submit array's flags
00:57 jekstrand: Ok, so you have some flags on the reloc that you need to collect per-BO like read/write or similar?
00:57 anholt: ("this buffer is written" and "this is a buffer you should dump in a hang")
00:57 jekstrand: Oh, in that case, I've got nothin'
00:57 anholt: there's a read flag too, and I'm wondering what a read flag possibly does
00:57 jekstrand: We make the "should dump in a hang" choice in ANV globally and don't bother tracking read/write.
00:59 jekstrand: We set EXEC_OBJECT_CAPTURE on batches, shader buffers, and state buffers.
00:59 jekstrand: All of which we know at allocation time
00:59 anholt: I like this idea a lot.
01:00 jekstrand: And if you really want to track "written", just have two bitsets. :-P
01:00 anholt: heh.
01:00 jekstrand: Or use two bits per bo
01:00 jekstrand: Or you can use a uint8_t * instead of a bitset and you get 8 bits!
01:43 bnieuwenhuizen: anholt: we track the used buffers by GEM handle directly in a weird hashtable in RADV
01:43 bnieuwenhuizen: if you store handle->flags we don't have any need to back to the actual struct
01:55 jekstrand: bnieuwenhuizen: We do have to go back to the original struct. :-(
01:55 jekstrand: Because we have to pass the kernel the address of each BO on every exec
02:00 pinchartl: now that Android is switching from .mk to .bp for the build system, has anyone given a thought to how this will be supported in mesa ? looking at what they did in https://android.googlesource.com/platform/external/mesa3d/+/refs/heads/master for aosp makes me cry
04:25 thaytan: airlied, ta
06:57 danvet: tzimmermann, I think samuel zou doesn't have commit rights, are you going to push that patch?
06:57 danvet: (good to leave a note to that effect to avoid coordination confusion)
06:57 tzimmermann: danvet, already working on it
06:57 danvet: cool
06:58 tzimmermann: i actually did leave a not
06:58 tzimmermann: note
06:58 danvet: hm the one I looked at only has r-b: you
06:58 danvet: but there's a bunch
06:59 tzimmermann: danvet, at the top of my reply (?)
06:59 danvet: oh indeed
06:59 danvet:obviously not awake yet
06:59 danvet: sry for the noise
06:59 tzimmermann: get a coffee :)
06:59 danvet: done, but I guess it's not kicked in yet
07:00 tzimmermann: danvet: btw, could you ack my ast suspend fix? unless you really want to have the check in the helpers
07:01 danvet: tzimmermann, oh just r-b stamped it
07:01 danvet: and that "maybe should be in helpers" was idle ranting
07:01 danvet: I dont' think we have a good solution for this
07:01 tzimmermann: i guess, i have to get some coffee myself :D
07:01 tzimmermann: danvet, thanks
07:02 tzimmermann: i think i'd like to have that in a helper. but i have no good idea about how to do it in a flexible and less-complex way that this simple test
07:04 danvet: it's kinda like suspend/resume helpers, we can boil it down to a oneliner, but drivers still need to wire it up correctly
07:07 tzimmermann: exactly, but wiring it up correctly requires driver writers to understand whats going on and why. at that point, testing for !state->enable is easy
07:08 tzimmermann: i could imagine something like drm_atomic_helper_check_plane_state(), but for crtcs. and it needs three types of return values: success, errno code, and early-out
07:10 danvet: yeah the plane version has the same problem, solved by filling out ->visible
07:10 danvet: same problem = needs a tree-kind return value
07:13 tzimmermann: danvet, oh right! there's ->visible. if they have the same problem to solve, maybe a consistent solution can be found. driver writers would only have to learn semantics one for all those functions. that's at least something
07:13 tzimmermann: s/one/once
08:35 emersion: agd5f, hwentlan: hi, would it be possible to get this patch merged? https://lists.freedesktop.org/archives/amd-gfx/2020-March/047825.html
08:38 kusma: How do I debug issues with marge-bot being broken on the inside?
08:38 airlied: kusma: you wait for anholt :-P
08:38 kusma: :/
08:39 kusma: Then I'm tempted to bypass marge bot, but then I might get yelled at :P
08:43 daniels: hang on
08:44 daniels: let me look at her
08:45 daniels: kusma: she has nothing to merge; can you please do whatever it was that made her break again, so I can watch the logs
08:46 daniels: ah, got it
08:46 kusma: Yeah, just assigning https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4914 to marge
08:50 daniels: https://gitlab.freedesktop.org/snippets/999 - only one snippet to go to 1000
08:51 kusma: daniels: who cares about base 10 magic? :P
08:52 kusma: Only 25 snippets to go to 1024!
08:52 emersion: i like how marge is referred to as if she was a regular human
08:59 MrCooper: daniels kusma: seems to be something about that particular MR, Marge has merged others up to 1h ago
08:59 kusma: MrCooper: yeah, indeed.
09:01 MrCooper: no idea what it could be though :(
09:05 daniels: gitlab hasn't changed at all, but for this particular branch, it's returning '#<API::Entities::Branch:0x00007f6a9c756170>' instead of JSON ...
09:06 daniels: i think it's the '.txt' suffix throwing it
09:12 daniels: yeah
09:12 daniels: this bug literally only happens if you have a branch which ends in '.txt'
09:12 daniels: '.txt.foo' is fine, '.html' is fine
09:13 kusma: daniels: haha, should I resubmit to test that hypothesis? :)
09:34 daniels: kusma: sure, if you just use a different branch name, it works
09:36 arora: Hey tlwoerner, jekstrand I was wondering if there was a mismatch with my skills and the project requirements? If so, what skill areas can I work on to be better qualified next year?
09:41 kusma: daniels: OK, done
10:10 daniels: kusma: thanks
10:11 kusma: daniels: and yeah, surprise, surpris, that worked. Was this a marge-bot or gitab bug, you think?
10:12 daniels: kusma: definitely a gitlab bug, cf. the snippet
10:13 daniels: when you ask the GitLab API to describe a branch name, it returns a JSON blob. unless the branch name is suffixed '.txt', in which case the HTTP response is the string '#<API::Entities::Branch:0xdeadbeef>', which is how Ruby prints objects by default
10:15 kusma: This is kinda what's great and at the same time horrible about high-level languages; they tend to never crash properly, so you more often get a bizarre path of "huh, how could this even happen" kind of behavior to go through ;)
10:16 kusma: ref: watman.
10:17 danvet: kusma, ime linux kernel also has a mad ability to keep limping along forever, despite massive corruption and races
10:17 danvet: and the eventual death is pretty good wtf
10:19 kusma: danvet: Right. Yeah, there's often cases where you want that, but maybe you want to "fork out" something that is allowed to die properly from times to times. Forking probably means something slightly different in kernel land here ;)
10:20 daniels: implicit coercion and magic behaviour is _always_ helpful
10:20 kusma: daniels: ALWAYS!
10:22 kusma: This is kinda the reason why it's not always bad that we have fifteen gazillion programming languages out there, specialized for different tasks. It's just sad that we also get stuff like fifteen gazillion UTF-8 decoders that are slightly different in how they deal with incorrect encodings at the same time.
14:27 agd5f: emersion, Nick merged it yesterday: https://cgit.freedesktop.org/~agd5f/linux/commit/?h=drm-next&id=e133020f92b9397eaad83ff1dada6d9786edcbd0
14:27 emersion: agd5f: oh, thanks a bunch!
14:59 alyssa: robclark (et al): what do you for perf counters on the userspace side?
14:59 alyssa: I know there are efforts to pipe GPU counters into common interfaces, but in the meantime..
15:00 robclark: "common interfaces" == amd perfcounter extension..
15:00 alyssa: ...Right, yes.
15:01 alyssa: I guess first question is, how important is counters-over-time for driver-side work? (as opposed to just accumulating samples for a frame and dumping)
15:03 robclark: umm, well per draw is useful.. if you can't read counters from cmdstream, then you are kinda limited in what you can do
15:03 alyssa: (counters for us are systemlevel right now)
15:04 robclark: I have fdperf which does free-running counter reading.. which is sometimes useful for getting an overall view (ie. how busy is gpu, is it bottlenecked on CP, etc)
15:05 robclark: but if you can read counters from cmdstream then tools like framemetrics/frameretrace are useful to drill down into things at a draw level
15:06 alyssa: curses UI, I see :)
15:24 pcercuei: drm_mode_config.prefer_shadow_fbdev looks pretty broken... It doesn't support double/triple buffering
15:31 ajax: do i remember correctly that some gpus have zlib engines now, or has lockdown loosened my grip on reality?
15:43 imirkin: ajax: i do seem to recall some sort compression accelerator on some older nvidia gpu's
15:44 jekstrand: arora: Not really as far as I know
15:45 imirkin: ajax: https://github.com/skeggsb/nouveau/blob/master/drm/nouveau/nvkm/engine/ce/gf100.c#L51
15:48 imirkin: i don't think anyone's really played with it much. it was available on some but not all fermi chips.
15:50 imirkin: (the higher-end ones ... GF100, GF104, GF110, GF114)
17:24 tlwoerner: arora: hey! i'm glad to hear you're interested in applying again next year! :-)
17:27 tlwoerner: arora: one thing that we liked about the person who was chosen this year was that they had a number of code patches submitted and applied to not only a graphics project, but the linux kernel
17:27 tlwoerner: arora: someone who is already active writing code anywhere in the free software community is going to be a huge bonus to a gsoc application
17:28 jekstrand: The kernel isn't a requirement but we do look for an open-source contribution history.
17:28 tlwoerner: arora: also, this person already had a blog and had posted a number of their thoughts learning about the various projects to which they contributed
17:29 tlwoerner: oh yes, thanks for clarifying, i'm not saying any particular project (e.g. kernel) is a requirement, just that they were already showing they could contribute code to free software, anywhere
17:30 tlwoerner: arora: so the combination of past contributions and a blog made that application very strong
17:31 tlwoerner: arora: i look forward to your application next year, and hope that we hear from you between now and then! :-D
17:37 alyssa: tlwoerner: oh hi :)
17:38 tlwoerner: alyssa: hey! things good?
17:38 alyssa: frosting pans full time :)
17:38 tlwoerner: lol
17:38 imirkin: mmmm frosting
17:40 jekstrand:usually puts cake in the pan before frosting it.
17:40 imirkin: times are tough
17:40 jekstrand: But, hey, if you want to skip the middle-man, who am I to say differently?
17:40 imirkin: also ... usually?
17:41 imirkin: iow you *have* just frosted the pan
17:41 alyssa: jekstrand: cake is a lot of calories, skipping to the frosting is healthier
17:42 jekstrand: imirkin: I can neither confirm nor deny whether I may have frosted just a pan at some point in the past.
17:43 imirkin: =]
17:52 imirkin: i feel like there's a simpsons where they pull some prank that involves frosting pans...
17:54 HdkR: "Simpsons did it! Simpsons did it!"
17:54 imirkin: =]
17:54 imirkin: replace the filling of donuts with mayonnaise?
17:55 imirkin: that was the sea people episode, right? good one...
17:56 arora: tlwoerner: thanks a lot for the detailed feedback!
17:57 arora: I will surely be sticking around and try my best to contribute :D
17:59 tlwoerner: arora: excellent!
18:26 robclark: hmm, for gitlab notification emails.. if you subscribe to label, are the notifications in addition to the configured notification levels (ie. watch/participate/on-mention/etc)? It seems like I'm not seeing issue/mr notifications for some of the labels I've subscribed to
18:26 jekstrand: I think it notifies you when that label is added to the MR
18:26 jekstrand: It doesn't auto-subscribe you to the MR
18:27 robclark: hmm.. ok.. maybe that explains it.. it also wasn't quite what I was hoping for..
18:59 pcercuei: my HW doesn't give me vblank interrupts when the two planes (primary + overlay) are disabled
18:59 pcercuei: it triggers warnings in drm_atomic_helper_wait_for_vblanks()
19:00 pcercuei: I expected the CRTC to be disabled when all attached planes were disabled, this is not the case?
19:05 imirkin: pcercuei: iirc that's an awkward case
19:05 imirkin: i don't think many drivers support that well ... i think they tend to turn the crtc off or something. not sure.
19:40 HdkR: `Asynchronous wait on fence 0000:00:02.0:compton[2326]:17d84c timed out (hint:intel_atomic_commit_ready+0x0/0x54 [i915])` That's a first. A hang with my Intel iGPU
19:41 HdkR: Sadly it's a new Ice Lake laptop so I didn't have ssh-server installed
19:41 jekstrand: HdkR: You clearly haven't been doing the right things on your laptop. :P
19:41 HdkR: :)
19:42 imirkin: jekstrand: where "right things" are defined as intel driver development?
19:44 jekstrand: imirkin: Hanging the GPU doesn't require driver development. :-P
19:44 imirkin: but it certainly helps!
19:44 jekstrand: Oh, it's truly the best way!
19:45 imirkin: also making declarations like "the kernel driver is unhangable" is a great way to ... obtain counterexamples :)
19:46 airlied:has seen some recovered hangs where gnome-shell gets stuck flipping between two frames
19:54 pcercuei: Is it possible to attach a "scaling mode" property to a plane?
19:54 pcercuei: the doc says it's for connectors, so I wonder
19:55 pcercuei: I guess I'd need to handle it in my driver instead
19:56 imirkin: pcercuei: planes can have scaling
19:56 imirkin: that's the difference between fb size and crtc size
19:56 pcercuei: imirkin: yes. My plane does scale
19:57 imirkin: i mean in drm :)
19:57 pcercuei: my DRM plane does scale :)
19:57 imirkin: but then there's also the question of what to do for like an LCD screen
19:57 imirkin: that has a native size
19:57 imirkin: and your application is generating a less-than-full-size thing
19:57 pcercuei: but I have a sysfs property (not drm_property) to choose the scaling mode: keep aspect ratio, or respect the aspect ratio of the source
19:58 imirkin: some drivers provide the option to (a) center, (b) scale, (c) scale while maintaining aspect
19:58 imirkin: but that's done on a per-crtc level
19:58 imirkin: since presumably this happens at the very end
19:58 imirkin: and/or because that's how some of the other hw works :)
19:58 pcercuei: well that's how my plane works
19:59 imirkin: the drm-level scaling is where the application supplies the target crtc size
19:59 imirkin: the "scaling property" is for when the application just provides the fb and that's it
19:59 pcercuei: yes
20:00 pcercuei: my sysfs property is used to override the application's chosen crtc_w / crtc_h
20:00 pcercuei: depending on whether or not you want to maintain the aspect ratio
20:00 vsyrjala: can you have more than one plane on the same crtc?
20:01 pcercuei: vsyrjala: yes
20:01 vsyrjala: can all of them scale all the time?
20:01 pcercuei: only one can scale, the other (overlay) cannot
20:01 pcercuei: in my case, that is
20:02 vsyrjala: then emulating scaling mode via plane scaling is not for you. it needs to scale everything coming out of the crtc
20:02 imirkin: interesting. normally it's the overlay that supports scaling
20:02 imirkin: perhaps rename them and all is well? :)
20:03 pcercuei: vsyrjala: I do want to change the scaling mode *before* it's composed by the CRTC
20:04 vsyrjala: that's plane scaling and there's no scaling mode for htat. the application specifies the coordinates exactly
20:05 pcercuei: that'd be an enormous amount of work
20:05 vsyrjala: what? doing what the application asked for?
20:06 pcercuei: "the application" is SDL1 rendering to fbdev
20:07 vsyrjala: sounds like one of those "doctor it hurts..." cases
20:11 pcercuei: it requests a given resolution, and knows nothing about what's done behind the scenes
20:12 imirkin: so if you have a 1024x768 panel
20:12 imirkin: and you request a 640x480 mode
20:12 imirkin: and then behind your back, the driver actually drives at 1024x768 and fills in all the details
20:12 imirkin: then that's what the scaling property is meant to do
20:13 imirkin: this is done at the crtc level
20:13 pcercuei: exactly, except that I do it at the plane level
20:13 imirkin: do it however you like, but the property is on the crtc
20:14 pcercuei: the doc seems to say that it's on the connector actually
20:14 imirkin: erm
20:14 imirkin: that's probably right.
20:14 imirkin: trust the doc.
20:14 imirkin: (can you have crtc properties? probably not)
20:14 pcercuei: of course
20:14 imirkin: since you want it on e.g. the LVDS/eDP connector, and not HDMI, and there's no tight binding between crtc and connector
20:15 pcercuei: but again, that's not where it happens
20:16 imirkin: i get that your hw is odd, but that's how it happens in the drm model
20:16 pcercuei: my plane does scaling, the CRTC composes the picture, then the connector can scale again
20:17 imirkin: i think you have all the information necessary.
20:18 imirkin: plane scaling is not controlled by properties.
20:18 pcercuei: I understand that
20:18 pcercuei: but that's not optimal
20:19 pcercuei: especially with fbdev emulation
20:19 pcercuei: anyway. I'll just send my patchset and see what's the feedback on it
20:19 imirkin: just make fbdev be the size the application wants
20:19 imirkin: and then use the connector-level scaling
20:20 imirkin: (or don't use fbdev, but i'm guessing you already thought of that one)
20:20 pcercuei: I have no connector-level scaling
20:20 imirkin: if there's no overlay, is there a difference?
20:21 imirkin: and if there is, fail the modeset
20:21 imirkin: or you can add a bunch of stuff to debugfs that only applies to your driver anyways
20:21 imirkin: any sysfs additions are unlikely to be welcomed
20:22 pcercuei: let's say your application requests 256x256
20:22 imirkin: is that a valid mode?
20:22 pcercuei: the CRTC is the LCD's size, so 320x240
20:23 imirkin: i.e. do you support a 256x256 mode?
20:23 pcercuei: yes
20:23 imirkin: ok
20:23 imirkin: the CRTC in reality, or as far as the kms client is concerned?
20:23 pcercuei: so there are two ways to scale it to 320x240. Either fullscreen, or fullscreen but keep the aspect ratio
20:24 imirkin: sure
20:24 imirkin: or center it
20:24 pcercuei: the CRTC is the size of the attached screen
20:25 vsyrjala: emulating scaling mode via plane scaling will fail when you have more than one plane if you can't scale them all. you'd need to check for that and return an error
20:25 pcercuei: why would it fail? The second plane has a fixed mode which corresponds to the size of the screen
20:26 imirkin: vsyrjala: he basically just wants to get fbdev to pass different parameters to kms
20:26 pcercuei: I only care about scaling mode on the primary plane, so I'm not trying to emulate scaling mode the way you understand it
20:27 vsyrjala: plane input and output size is specified by userspace. you can't just ignore it
20:27 imirkin: or in this case, fbdev
20:27 pcercuei: I can't ignore the input size
20:27 pcercuei: I can ignore the output size
20:27 vsyrjala: no
20:29 pcercuei: why not?
20:30 pcercuei: I don't ignore the output size, I tweak it
20:31 imirkin: sounds like you don't want a drm driver
20:31 imirkin: but instead an fbdev driver
20:31 vsyrjala: it's not allowed. you promised the app to put the planes at specific coordinates. if you don't then the app doesn't get the output it expects
20:31 imirkin: (of course those aren't allowed anymore... fbdev is deprecated)
20:31 pcercuei: imirkin: yes. I'm between a rock and a hard place
20:32 imirkin: you're going to have a bunch of custom hacks for your application
20:32 pcercuei: vsyrjala: I didn't promise anything ;)
20:32 pcercuei: but again, this is for fbdev emulation
20:32 imirkin: so you'll have to have your own tree
20:32 vsyrjala: you did when you exposes the kms uapi
20:32 imirkin: so do whatever you like
20:32 pcercuei: no, that's not the plan
20:33 vsyrjala: one could do this tweaking in the fb_helper
20:33 imirkin: but if you want an upstream kms driver, then you have to implement the kms api the way it's written or convince people that it needs to be defined differently
20:33 vsyrjala: but making that nice and generic and clean code is a bit of work probably
20:33 imirkin: doing things behind the application's back is pretty much against the kms design though
20:33 imirkin: adding options to the fbdev integration layer ... meh
20:34 imirkin: (where the kms application is fbdev, basically)
20:35 anholt: jekstrand: huh, bitset didn't work out to be a win on drawoverhead. https://gitlab.freedesktop.org/anholt/mesa/-/commit/613ff758762c9655a59d99b72804c37883e4efdb (look at ringbuffer_sp.c, not ringbuffer.c)
20:36 pcercuei: vsyrjala: even for KMS apps, I do have to tweak the crtc_h/w but only slightly: crtc_w &= ~1
20:36 pcercuei: otherwise the hardware locks up
20:37 imirkin: pcercuei: i believe normally you just reject modesets which run afoul of such rules
20:37 vsyrjala: pcercuei: you need to return an error when the user asks the impossible
20:38 pcercuei: yeah, well. Then what? the userspace think "crtc_w++ and try again"?
20:38 vsyrjala: usually userspace has a fallback as in "just use one fullscreen plane and compose everything with gpu/software/whatever"
20:38 vsyrjala: if not it's broken anyway
20:39 jekstrand: anholt: Interesting...
20:39 jekstrand: anholt: Did it work out to be a wash or worse?
20:39 anholt: -0.635795% +/- 0.27689% throughput
20:39 pcercuei: and then the scaling etc. have to be done in software?
20:39 pcercuei: that sounds terrible
20:40 vsyrjala: less terrible than userspace getting essentially random output
20:41 jekstrand: anholt: :-(
20:41 imirkin: anholt: perhaps there are bitset optimizations that are done for x86 but not arm?
20:41 pcercuei: sorry, but that's BS
20:41 anholt: 160ish handles in the app
20:42 pcercuei: who cares if my image on screen is scaled to 320x240 instead of 320x239? Especially if it allows it to render at 60fps and not 12fps
20:42 imirkin: (either at the source level, by using intrinsics, or just isa being helpful)
20:43 imirkin: pcercuei: discovery of the "right" parameters to the application has been an ongoing topic
20:44 vsyrjala: if the image is composed with multiple planes then it may be crucial to get pixel perfect output. otherwise all kinds of artifacts may be visible
20:44 vsyrjala: the kernel can't make that determination and hence isn't allowed to overrule userspace
20:45 jekstrand: anholt: I have observed in the past that bitsets can have weird perf. For instance, uint64_t bitsets are way slower on x86_64 for some reason.
20:45 pcercuei: I understand your point of view
20:46 pcercuei: My point of view is, this device runs fullscreen games and emulators. It is absolutely not acceptable to lose performance because of something like that
20:47 pcercuei: fbdev had a "check_var" ioctl that allowed the kernel to tweak a mode to acceptable values
20:49 vsyrjala: fbdev never had to deal with multiple planes/atomic updates/all that good stuff
20:50 Lyude: danvet/vsyrjala - new vbl work + nv_crc patches on the ML btw, feel free to take a look when you get a chance
20:52 anholt: jekstrand: no obvious disaster in the asm, not that I'm great at arm64 asm
20:52 jekstrand: anholt: I still find that a bit surprising
20:53 jekstrand: anholt: Have you looked at it in perf? Maybe all the cost moved to sparse_array?
20:54 jekstrand: anholt: With ANV we have sub-allocation helping us so the number of objects shouldn't be high compared to the number of times they're added to the batch.
20:56 danvet: Lyude, I'd include your benchmark summary mail in the commit message for the drm vblank worker patch
20:56 Lyude: danvet: sure thing, btw - did that look sensible to you?
20:57 danvet: it's rather late on Fri
20:57 Lyude: ah, understandable :P
20:57 danvet: I dont think you want technical opinions from me :-)
20:57 danvet: but looks cool
20:59 danvet: ok, replied with one yolo r-b
21:02 danvet: Lyude, btw did you test the other sources?
21:02 danvet: iirc there was a fumble in the generic drm crc uapi
21:02 danvet: and source selection wasn't actually forwarded
21:04 danvet: oh the patch landed
21:04 danvet: 3cb6d8e5cf9811a62e27f366fd1c05f90310a8fd
21:04 danvet: but there might be other lols
21:05 Lyude: danvet: the branch I tested against was actually kind of old, but I don't really think we ever used any source other then the default
21:05 Lyude: well, not that old
21:05 danvet: yeah igt just goes with auto
21:05 Lyude: as long as auto was working it should be fine then
21:45 anholt: jekstrand: with the bitset, there's no sparse array (we still keep an array of BO pointers, along with the set)
21:45 jekstrand: Oh, so it's really just a replacement for your hash table
21:45 anholt: yep
21:45 jekstrand: Very weird that it's slower then
21:46 jekstrand: Like, unbelievably weird
21:46 anholt: right?
21:46 jekstrand:smells fish
21:48 anholt: driver shas match expected, a fresh sample reproduces the perf hit.
21:48 jekstrand: :(
21:48 jekstrand: 🤯
21:49 anholt: anyway, got other ideas to work on our overhead (particularly in the "too many separate allocations" vein)
21:56 anholt: I'm now at the third obvious CPU reduction patch producing reduced perf in this testcase, so I suspect I need something more CPU bound.
22:47 robclark: anholt: if you have a setup where you can do FD_MESA_DEBUG=nogmem with gfxbench gl_driver2, that will give you a CPU bound workload that is interesting
22:48 anholt: is gl_driver2 a set of many testcases getting at different areas of driver overhead?
22:49 robclark: it's a single benchmark.. with a gazillion tiny draws, and moderate mix of state changes between.. also a thing we actually have to care about
22:49 anholt: working with open source software is much nicer, and lets me see how a change impacts driver overhead in multiple ways.
22:49 robclark: mostly uniform updates, but there is a mix of other state changes... second most common is probably texture state
22:50 robclark: sure, ofc.. just pointing that out since it is CPU limited and at the end of the day it matters because for some reason people care about gfxbench
22:50 anholt: (for example, the big win I found is for changing a little bit of a large cb0 uniform buffer, or not changing it at all but changing program state, while hurting small uniform counts a little bit)
22:51 robclark: gl_driver2 does frequent uniform updates, updating a small subset of the uniform state (iirc just updating a single uniform)
22:51 anholt: that's one of the subcases of drawoverhead, with different uniform counts
22:52 robclark: although because of how SDS works, I'm not sure how we can sanely do partial uniform uploads.. there is the idea of appending more CP_LOAD_STATE to the end of a SDS stateobj, which might work out
22:53 anholt: I'm not doing anything on that front, it would be absolute horror to plumb through
22:53 robclark: (but other than that, later stateobj replace rather than amend prior stateobj's.. and stateobj's can be skipped due to binning)
22:53 robclark: ok
22:53 robclark: yeah, I agree
22:53 robclark: it's why I didn't try it yet :-P
22:53 anholt: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4971
22:55 robclark: hmm, not sure why I didn't get an email about that one
22:55 anholt: opened just a minute ago
22:58 robclark:wishes gitlab were a bit more clever about showing diff's of stacked MR's
23:02 Lord: i'm not sure here is the right place to talk about this but i try. On gentoo with a kernel 5.6.2 with latest mesa with mesa on a radeon r580, when i play some heavy games at 4k, after a while, the monitor shut down and the input stop responding. The computer continues to ping back so it's not a total freeze. I experience it in many different games (the witness, alien isolation, tomb raider). If
23:03 Lord: I play at 1080p i mostly never experience this behavior.
23:03 Lord: could this be attributed to mesa or amdgpu ?
23:04 imirkin: ultimately amdgpu, but mesa's not helping
23:04 anholt: Lord: that's basically going to be your kernel display driver.
23:05 Lord: i should try installing openssh and doing a "dmesg -w" in it while triggering this behavior
23:11 Lyude: anyone have an edid with interlaced modes?
23:16 Lyude: oh-looks like my tv has some, I'm all set
23:21 alyssa: Down to essentially no deqp regressions but mysterious app regression
23:21 alyssa: isn't fp16 fun :o
23:24 alyssa: (glmark2-es2 -bterrain, in this case)
23:29 robclark: hmm, terrain looks a bit diff in es2/fp16.. not sure offhand if that is us or them, don't really have a reference to compare to..
23:29 alyssa: robclark: more... bright, i guess?
23:30 alyssa: less dark green and more blinding yellow?
23:30 robclark: yeah
23:30 alyssa: So maybe that's two glmark bugs >:
23:31 robclark: possibly.. or a mesa bug..
23:31 alyssa: could be
23:31 anholt: I see only minor pixel differences between i965 and freedreno on terrain
23:32 robclark: need to use glmark2-es2
23:32 alyssa: making `lVector` highp on L109 of ` terrain.frag` makes the bug go away
23:32 anholt: sigh, yep
23:47 alyssa: I guess next is fixing my RA so I can actually extract benefit from fp16 :p