Back to chats Brian Kardell and Eric Meyer chat with fellow Igalian Melissa Wen about layers and layers of things around colors.

0:00

Transcription

  • Brian Kardell: I am Brian Kardell. I am a developer advocate at Igalia.
  • Eric Meyer: And I'm Eric Meyer. I'm also a developer advocate at Igalia.
  • Melissa Wen: And I am Melissa Wen. I am a kernel developer at Igalia.
  • Brian Kardell: And on today's show we're going to talk about colors. So there's lots of exciting stuff happening with color around the web, and it's a topic that a lot of people are talking about now and getting excited about. I wrote a post about this called Unlocking Color in 2019, and I published it literally on New Year's Day in 2020. So it was a little over four years ago, and in that time we have a colleague, Felipe, who gave a nice presentation that made me think about all different kinds of aspects of this. Yeah, we can add the color to this, but it needs support sort of all the way down. So if we add it to Chromium, there's a lot. So his post was called Toward Richer Colors on the Web, and he gave some talks. And then a little while later I noticed that our colleague Melissa was suddenly writing and publishing all these things. And it was like, 'Wow, we're just getting started digging into this.' So Melissa is coming at it from the other end. Tell us what you're working on.
  • Melissa Wen: Yeah, I understand this perception of, wow, we are talking about it as a new thing today, but it's well-established, and I see that. And the thing is I am working in the kernel side, but mostly to enable the hardware capabilities that we have. We are advancing in the hardware side to get many of these color transformations and all the needs that we have in the color space for color expert. So we can offload this to the hardware to do that. We will get more responsive results from all this transformation then if we do that on the user space side in the software level. So this is why I am working on exposing all the hardware capabilities to the users, real users take advantage of this.
  • Eric Meyer: So when you say you're pushing it to the hardware side, is that CPU, GPU, both?
  • Melissa Wen: GPU. I mean, on display hardware. We say that, because sometimes we have this confusion about GPU as 3D rendering and graphics and also display hardware IPs. So we have a dedicated hardware for display to manage display needs, connectors, and all the composition, plane compositions, things like that. And we have it on hardware and we have it in our board. So we can use hardware blocks dedicated to do each of this color transformation that we already use and know as color expert.
  • Brian Kardell: So can I ask a naive question?
  • Melissa Wen: Yeah.
  • Brian Kardell: You talk about color transformations, so this means basically we're giving some data about a color. I have the CSS color keyword or the ANSI keyword, red. Well, what does that mean? It means something concrete, and it doesn't mean that... You might have to display that on even a black and white screen, right? These color transformations are like you've expressed a color, but somewhere along the way it's decided, because either it's not capable or for maybe for some other reason, that that color profile isn't available and we need to change what is displayed. Is that what the transformations-
  • Melissa Wen: Exactly. It's one of the things that we do when we are talking about color transformation. One is we have a range of colors that one device is capable to, for example, capture, but we have another range of colors that the display device will reproduce. So we need some color transformation to kind of adapt or match different color ranges between all these device. And we also have the standards, like sRGB, PQ, different standards, different content that we need to match, for example, in the input and the range that we have in the output. So it's one of the situation that we apply color transformation. But we also apply color transformation, for example, to improve the user experience when watching a video or playing a game in the scenario to add some kind of different feeling, like subjectiveness, like if we want a scenario more calm or with more action and we can change colors to another, a different space that match the feeling that we want to catch the audience for free. So I see different things. Also, for example, night mode when we are watching something in a black room or when we are reading something with the sunlight, so we can resort color transformation and calibration to improve the user experience.
  • Brian Kardell: That's fascinating. I didn't even think of that. I guess let me ask a question just to make sure that I understand what you're saying there.
  • Melissa Wen: Yeah, sorry.
  • Brian Kardell: So I know with my phone or my laptop, they have auto color sensing. Not color sensing, I guess light sensing. And I guess they can detect the color temperature and make auto adjustments of the brightness. Do they also potentially, I guess, because you've changed the brightness, it would change the matching of colors too?
  • Melissa Wen: Yeah. To be honest, I am not completely sure how this device would be connected to the color features that we have on the other side. But yeah, we can do it. We can also do it manually. We can as a user and I feel the temperature is not comfortable to me, so I can try to use features in my system to calibrate for something that is good for me because what is good for me, maybe it's not good for you, but you can also let the system to decide automatically. I think it makes sense. It's a use case. I don't actually know how the communication happens, but yeah, it's one of the use case.
  • Eric Meyer: Yeah, just an example from my mobile device, I have an iPhone, and I'm pretty sure this is what you're talking about. On my iPhone, under display and brightness, there are two different color-changing things. One is what's called True Tone that says, 'Automatically adapt iPhone display based on ambient lighting conditions to make colors appear consistent in different environments.' So somehow it is sensing the nature of the ambient light, just not just the level, I think, and trying to make the color of the display appear consistent, whether or not I'm inside, not very well-lit room or I'm outside in the sunlight. And then I also have a thing set on my phone called Night Shift, which is after a certain time, in my case it's 11:00 at night, the display kind of reddens. It gradually shifts from sort of the daytime to this warmer set of tones, which is supposed to be more relaxing. And it's purely a color shift. And I'm sure that Android phones have similar capabilities and other devices. The Night Shift is the one that I think of the most, because while it's gradual, it's gradual over 15 or 30 seconds or something like that so it's noticeable. Even if I'm not looking at the time or if I'm doing something where if I'm doing a crossword on my phone, which I sometimes do and suddenly it starts to redden a little bit, the display, all the whites become this... give this orange tint, I'm like, 'Oh, it's 11:00. It's later than I thought.' It's easy as a user or even as an author, as a CSS author, I work with colors all the time and I manipulate colors all the time, but I don't ever really think about what it takes to combine all of these colors and to display them well in various situations. And that sounds like what you're working on, Melissa. And also, not just that, but making it more performant so that hopefully my phone has hardware to handle color transformations, and that would be less power draining than doing it all on the CPU and at the software layer, having to write your own code to do all that stuff.
  • Melissa Wen: It's actually what we are trying to do with the kernel work right now, that is save resource power from one side and do it in dedicated and specific hardware parts that can already know what to do and can do it in a very smart way.
  • Eric Meyer: Yeah. And this is the Linux kernel specifically?
  • Melissa Wen: It's hardware capabilities. I am working on Linux kernel, yes. And for example, you will already find many of these capabilities enabled in other operating system. And on the Linux we have other challenge. For example, we have different compositors. We need a generic API on Linux that fits all hardware vendors that we have, all capabilities that vary a lot. So that's why I can see that, for example, a past discussion seems like, 'Oh, we are talking about it just right now and it's not actually what happened.' And for example, these discussions around color capabilities from enable, I mean hardware capabilities is also old in our side and our kernel community, but we have all these combinations to do and consensus to reach that take a lot of time to find the best and the right solutions and something that we can cover all needs from the hardware side, but also from the user space side. And for example, when I talk about the variety of compositor that we have, that the desktop that we use to display our content on our laptop, so we have different compositor, we have different projects, like GNOME, like KDE and Sway and many compositors, like Weston on Linux and they have their infrastructure and they have different implementations to do the same thing, to get a content and then to display it in the right way considering the output technology that a user has. So that's one of the variety of things that we have in the user space side. But we also have on the kernel side different hardware vendors, GPU vendors, like AMD, Intel, Nvidia, Qualcomm, et cetera. So we need to provide a generic solution that cover and embrace all this need, and it's not that easy.
  • Brian Kardell: I don't know, Eric, if you had the same feeling when Melissa was talking about, it takes a very long time. Yeah, we can relate to that. We work in web standards, right?
  • Eric Meyer: Yeah, it takes a long time to get consensus and decide what the right way forward is. Yeah.
  • Brian Kardell: One of our favorite topics has been going since 1991, so it's kind of a slow process we can appreciate. Yeah, it's difficult. But when we talk about Linux, I think it's one thing to talk about the Linux desktop. It's important but also considerably small in the population. But there's all these other things that are Linux that people use, like everyday consumers use, and this affects those things too. This would affect televisions or maybe Steam Deck. Is this something that would affect the Steam Deck?
  • Melissa Wen: Yeah. And also, for example, on Steam Deck that we have the first device using LCD display and now we have the OLED device. So the technology has a different need from the previous one, the display technology. So OLED, we can get, I say more color, it's not right, but we can get a larger range of colors with OLED display than we get from the LCD display. So my work on AMD GPU was actually like a base to have this OLED screen on Steam Deck. It was not only my work, it was many layers in the Linux display stack with contributions from AMD developers, from the community, the Linux display community from, for example, Joshua that work together with me to enable it on GameScope. And then we have Jeremy Selan as a color expert that provide the requirements, check if we are reaching this requirement. So it was a lot of work to get, for example, this device with this new technology. And I can see for all the others device that we have, all this color concept, all this research around colors apply not only on the hardware side but also in this different display technology that we now available in the market.
  • Brian Kardell: It's fascinating how much there is that goes into this. I think as a consumer or even as a developer who's like, 'Oh, I got to use this color in CSS,' and it's like this really hyper pink that is super saturated, and what goes into, what has to all agree to make that happen and to make that really a common thing is amazing. So even at the very top level, it's not just CSS, it's like can you use those in your images? Can you use those colors in canvas or all kinds of things in there? And everything only benefits when all of the pieces are in place. And so once you have that, then the question is, can Chromium or WebKit or whatever, can it send it down to the next layer, and then can that send that down to the next layer, and then can that coordinate with the hardware and the color management and the operating system level stuff? And it's so many layers of things that have to agree. It's really fascinating. It's hard to really appreciate just how many people and how many aspects of the technology have to go into this.
  • Melissa Wen: Yeah.
  • Brian Kardell: There's a simpler thing that I think is a nice illustration, which is just if you ever go to paint your living room or something and you go to the store and you see all the paints and then you bring them home and then they look nothing like they looked in the store. That is an illustration of where just even in the physical world that the lighting doesn't match, the surrounding colors don't match. Two colors will look different if they're next to one another.
  • Eric Meyer: Yeah. Color is not the constant that we think it is.
  • Brian Kardell: Right. So maybe Melissa can sell for us once and for all, what color was the dress? Do you remember the dress? The viral-
  • Melissa Wen: Yeah. Yeah. For me, it was white and gold.
  • Brian Kardell: I thought it was a hoax. I thought people were trolling on the internet. I was like, 'How can you... It's blue. It's clearly blue.' I had to ask a bunch of people. I opened it on several devices until I finally found one where it looked, 'Wow. Yeah, that doesn't look blue. That's amazing.'
  • Melissa Wen: Yeah, for example, I can imagine a situation that two people looking to the same device and seeing different colors of the same thing.
  • Brian Kardell: Absolutely.
  • Melissa Wen: And I think sometimes it's what happened. For example, when I am talking with a friend and I talk about, 'Oh, can you pick this blue thing?' And they say, 'No, it's green.' And I say, 'No, it's blue.' And we are in this kind of discussion of what is the name of this color for each of us. And I can't imagine this, but also there are other factors that I learned during this journey. For example, if we are a person that usually work during the daylight, so we usually have a different perception of the same colors in comparison with other that prefer to work during the whole night, for example. And sometimes when we are watching to a specific side of the display, we need time to accommodate our eyes to see. For example, also issues, when we have some issues, some compositions issues on display that I need to, for example, fix it or try to find the bug and try to find the solution. First time I can't see any issue, and then I need to replay many times to, and really with the right focus on the screen to actually catch the issue that someone reported. So we have this time to, I think, not only our eyes but our brain, of course, accommodate and focus on the right thing to actually see what we are looking for. So I see many nuances I can say like that, and the same scenario in the same situation
  • Eric Meyer: That hadn't even occurred to me that color compositing and color rendering bugs can literally depend on what time of day it was and what the lighting situation was and what angle the person was looking at the display from. I thought dealing with web layout bug reports was difficult, but I generally don't have to ask, 'Okay, what kind of monitor was it? What year was it? What angle is your monitor at? What kind of light bulbs do you use in your office? How many do you have? Were they on?' Et cetera, et cetera, et cetera. Oh, wow. I don't envy you that work.
  • Melissa Wen: I just remember a situation that during the last XDC during my presentation, I used different colors to describe each feature that we have currently on the AMD driver. And I was talking about this difference of how we see colors on different device and screens. And then one of the audience just after the presentation told me, 'Oh, my God, it was amazing because you were talking about this issue, and then I was actually seeing it in real time in runtime, because I was in front using a display that was showing a set of colors.' But in another TV that was near that guy, he just told me, 'Oh, my god, the color was different. And sometimes I can't see it was no colors, was completely white.' And it was, 'Oh, my god. Yeah, such difference.'
  • Brian Kardell: There's so much here. I was just looking back at some of your... You have two or three talks and a bunch of blog posts about work on AMD, the Steam Deck work, right?
  • Melissa Wen: Yeah. I am not very comfortable for public speaking. I prefer write things in my time and then I can review it, think again and think. And yeah, I don't feel very comfortable or confident to speak in public. So that's why it was a hard time, to be honest, during this talk that I gave. It was only one talk and one lighting talk to summarize a workshop that I led about colors in the same conference. And we are also organizing this year, Igalia is organizing the Linux Display Hackfest this year, next month. And our goal is keep the same, that is we need to push the addition of new features to take advantage of all the hardware capabilities and to understand also all the variety of hardware capabilities that we have. Because for example, I know a little of AMD hardware, but I see different vendors doing different things to get the same result or better result to Inyan's color result. I can say like that. And then we are trying to find consensus across the stack, but also to understand what is this diversity that we are talking about. This will be a time to get more information of the needs requirements and the goals to try to put everybody together and just improve and move.
  • Brian Kardell: I wanted to mention that I know I think I reached out to you about this actually, Melissa, that you have great titles, and I like the way that you write and present. So your talk was called the Rainbow Treasure Map and had treasure map and magic frogs and Steam Deck rainbow. It was really entertaining. But then when I start to look at the thing in the post, my eyes glaze over because I'm like, 'Wow, there's so many terms I don't understand.' So I have questions because I want to understand it better. So there's this word that gets thrown around in all these, the user space. Can you tell me what does that mean?
  • Melissa Wen: Oh, do you mean what user space is, is that?
  • Brian Kardell: Yeah, so this is the user space can use the GPU-accelerated power management.
  • Melissa Wen: Okay. Okay, okay. Oh, it's hard to describe. We actually divide, for example, when we see the operating system, we actually split this into sides, the kernel side and the user space side. So everything that is in the kernel side, that's basically the core of the operating system work. I mean, the communication between the software level with the hardware. The kernel is the layer that communicates directly with the hardware. And then we have another layer on top of the kernels. That is what I call user space side. So we kind of communicate with the hardware. We have a layer to protect the hardware, so everything is in the kernel. And then we expose as API's to another level of software that we use this capability after all this intermediation between operating system and hardware. So the kernel side is this layer very close to the hardware. And then we have user space. So user space comprises of the compositor that I mentioned, but also applications, all these different open source project that we have on Linux. So basically it's that. I don't know if was-
  • Brian Kardell: Yeah, that's good. That's pretty good. There's another part of this that consumer and somebody who does certain kinds of programming, I don't think about, but there is built in DRM here. And that's actually at the kernel level. Is that right?
  • Melissa Wen: Yeah, the DRM. Yeah. What is DRM? Okay.
  • Brian Kardell: No, no, but where does that fit? I wouldn't expect it to be a part of this as a... Yeah, I guess maybe it is a little bit what is DRM? Because for me, I think of DRM as something that is just like encryption key almost. If you have the key, then you can unlock. But somehow it has to do with this, so it's in your presentations. And I'm curious to understand how and why, if it's possible to explain it to a layperson.
  • Eric Meyer: Right. Why does a color space need DRM?
  • Brian Kardell: Yeah.
  • Melissa Wen: Yeah. So that's weird, because DRM is an abbreviation to two different things.
  • Brian Kardell: Really?
  • Melissa Wen: Yeah. So when I talk about Linux DRM, we are talking about the subsystem on Linux, a part of the Linux kernel dedicated to GPU drivers. So it's a subsystem of the Linux kernel when we will find all GPU drivers that Linux support. So this is the DRM and is direct.
  • Brian Kardell: It has nothing to do with digital rights management?
  • Melissa Wen: Yeah, no.
  • Brian Kardell: What? Today I learned.
  • Melissa Wen: So it's a subsystem. We have a library, the libdrm, that is the layer used by user space to communicate with the interface between the Linux kernel subsystem called DRM and any project that need to get resource from the GPU or needs mode settings that display.
  • Eric Meyer: Yeah. So DRM in this case, I just looked it up, stands for direct rendering manager.
  • Melissa Wen: Yeah, exactly.
  • Eric Meyer: That's fascinating.
  • Melissa Wen: It hasn't nothing related with the other DRM.
  • Eric Meyer: Like you, Brian, today I learned. I'm literally learning this by looking at the Wikipedia article while we talk.
  • Brian Kardell: There's another part of this that I didn't really... I mean, you would think that I would have thought of it, but I haven't. Blending, right? We're talking about compositor, and I guess we need to have two layers that could sit on top of one another, and then you only see one in the end, right?
  • Melissa Wen: Yeah, yeah, exactly.
  • Brian Kardell: And that must add a lot of complexity, because can't those two colors even be in different color spaces?
  • Melissa Wen: Yes. This is one of the thing that we need this color management, when I call pre-blending, that is before blending, because we have different planes on our KMS framework. We have a lot-
  • Brian Kardell: Can you explain what you mean by planes?
  • Melissa Wen: Yeah. For example, it's an abstraction for content from the frame buffer that will be displayed on the screen. So this abstraction we have, for example, the size, rotation. We have different properties on this plane. For example, we have a plane for cursor, only for the cursor.
  • Brian Kardell: Oh, okay.
  • Melissa Wen: And this is moving around the screen with a specific size, the size of the cursor. And then we have the primary plane that we can say... I will use this. This is not actually right, but I use this term, the background, the layer in the bottom.
  • Brian Kardell: The zero index in the stack.
  • Melissa Wen: Yeah. And then, well, for example, we have a video, and to use a resource in the best way we usually detach a plane specific to play a video from your Windows system, your desktop environment. And then we only have one screen, right?
  • Brian Kardell: Yeah.
  • Melissa Wen: We are not using many screens, like transparent screen in a stack, so we only see everything blend. That is what we call blend. So we collect all these plane, like the cursor, the video, and the desktop, and then we blend it in one stream. And then we can do color transformation before this blending, because, for example, as you said, we can have different content, different range of colors in each of these planes. For example, we can have also one SDR and other HDR plane, for example, content. And then we need to put everything in the same light space, color space, different also gamut. So we need to put everything in the same. Usually we put everything in the linear light space before blending to get the correct values of each colors. And then after that, we can also do other color transformation according to, for example, the display that we will output it. So this is what I call blending and pre-blending, post-blending. During my talks and in my blog posts you'll find these terms, and this is what I am talking about.
  • Brian Kardell: So I'm imagining now, so I have my document and I have a background, and that background is a lab color. And then I have several divs that are each their own layers. They have their own Z-index, stacking context, and they're maybe this one is sRGB and this one is lab, and this one has an HDR image inside that. Another one has a video that's HDR. And then I put those and I do them into a 3D transformation so that they're like a cube that's rotating. And then that gets put on an area of my screen where I have a split monitor, and half of it's on one monitor and half is on the other monitor. Wow. The amount of things that are being calculated in that and the transformations and the blending and everything that happen in real time, at least 60 frames per second, is amazing. And I guess it's people like Melissa that make it amazing all the time. So thanks for that, because I like seeing cool demos that do things like that.
  • Melissa Wen: And if you think about, for example, I call about a feature called 3D lookup tables, 3D LUT, and it's the best what we have right now to do color transformation, but it needs a lot of resource and it's very complex, because it's a cube that we map a color from one part of this cube to another side of it. And this is why it's important to have this kind of feature as a capability in the hardware, because we can do a very powerful color transformation, but in a time that doesn't compromise the experience, the usability of, for example, a game that we are in a very high refresh rate. So this is why it's important to have it in hardware because on software it would be slow, for example.
  • Eric Meyer: Yeah. So the mapping, what you're saying is that the best available technique for this particular thing is essentially doing 3D transformations, transformations in 3D space, which is what GPUs are engineered to excel at, is that sort of calculation. So being able to offload that to the hardware is just an all around win, because the chips that are being used to do the calculations have been optimized at the hardware level to do those things quickly and efficiently.
  • Melissa Wen: Yeah.
  • Brian Kardell: But is it specifically that sort of a lookup function, this lookup table, having that specifically built into the hardware? Is that what you're saying?
  • Melissa Wen: Yeah, in the hardware we kind of receive, for example, the 3D LUT, we would need many elements in this lookup table. If we want this 3D lookup table, you can imagine one lookup table, but in three dimensions. Then if we have it, for example, RGB system, all the combinations, it's a lot of combinations, and it's impossible to do it in a useful time. I can say like that. So the mapping to go from a value of a color and go to another one in opposite side of the cube, and then why I think it's very powerful, because we can kind of manage RGB, the three channels in one time.
  • Brian Kardell: Okay.
  • Melissa Wen: So we have it on hardware. For example, AMD use uses tetrahedral interpolation to get its value. So what we do on user space, we send to the hardware, our lookup table, our transformation with only 17 elements to each dimension. And then we send it to the hardware. And the hardware does all the mathematical calculation and interpolation, everything needed to reach the final result, the expected result from this input. So this is how we save a lot of CPU time, a lot of calculation using the hardware capabilities.
  • Eric Meyer: And all of this has to happen if someone just says something like color pink, but then that goes out onto the web and onto billions of devices, and this sort of color management is happening everywhere effectively. Right?
  • Melissa Wen: And we actually need color management, because we have a variety of input and output device. So we actually need some kind of color transformation, or we will have very awful result of a color to watch something. So color management is everywhere.
  • Brian Kardell: So our work, you've been working on the graphics team here at Igalia, and the work that you're talking about here, a lot of it is upstream. Is it all upstream, or is some of it not upstream?
  • Melissa Wen: Everything that I did is upstream right now, and we started with this, what I call a driver-specific solution. So we have this color management pipeline for AMD and only for this GPU right now. And our main goal is find the generic API solution, and the community is already working on this. So why we started with this driver-specific solution, one of the reasons is because we don't actually know all the capabilities that each hardware vendor provide to the system. So we need to know it, but also to play with it to understand better what we can do with each hardware block, for example. And we can only do that if we expose this capability to the users that will actually examine and use it in the right way for users, operating systems users. So we started with this driver-specific solution, but our goal is find a generic solution to expose the color management pipeline from each GPU vendor. And my work is upstream. We at Igalia work on upstream solutions and prioritize upstream work, and then I keep working on improvements and enrich the community needs, the Linux community needs around this topic.
  • Brian Kardell: So to ask a naive question-
  • Melissa Wen: Yeah.
  • Brian Kardell: Where is upstream? I mean, this is just in the Linux kernel?
  • Melissa Wen: Yeah, so we have Linux, we have the repository in different sites. We have the GitHub repository from what we call mainline kernel. It's managed by Linus Torvalds, but we also have, for example, subsystem repositories. Like we have one repository on GitLab, a free desktop instance managed by the maintainer, the DRM maintainers, and we have another specific branch for AMD. So it's three different repositories from different maintainers and different device drivers. For example, I submitted to the AMD-specific repository and it goes to the DRM branch, and then it goes up to the GPU maintainer branch, and then it goes up to the mainline kernel, the Linux server repository. But for example, my work already reached the mainline, so you can find it on mainline kernel and the official release of the kernel from 6.8 version, if I recall correctly.
  • Brian Kardell: And all of this work is for the Steam Deck, right?
  • Melissa Wen: This work on AMD driver-specific color management work was sponsored by Valve, yeah. We worked with Valve to find this solution for Steam Deck, but also all the community contribute with reviewing the work and asking more details and also asking some limitations according to the subsystem requirements for API, to enable something on API. For example, if you want to get this capabilities to have it listed as properties, if you are, for example, a compositor developer and want to play with these capabilities, AMD color capabilities, you need to compile the kernel with specific flags, C flags. Because it's not a generic solution, we were not able to expose it by default in the kernel. So you need to set up a specific flag and compile the kernel with this flag to see this property, for example.
  • Brian Kardell: I have so many questions about what it's like to do this kind of work really, because even just simple things. How long does this take to compile a kernel?
  • Melissa Wen: Depends on how many modules you need for your system. For me, it's around seven minutes in my laptop.
  • Brian Kardell: That's not bad.
  • Melissa Wen: Yeah. My laptop, it's a very common laptop. It's not this powerful laptop. It's a normal user laptop, so it's not that much. I see other projects that need much more time than I.
  • Brian Kardell: Yeah, 10 years ago or so, I tried to compile Chromium, and I think it took eight or nine hours, so a long time to wait to find out if your code even compiled.
  • Melissa Wen: Yeah, if you have, for example, many modules on the kernel, on my laptop, it takes like 20 minutes. It's not that much.
  • Brian Kardell: But then do you just simply run tests that are inputs and outputs, or do you replace the kernel in your running operating system? How does that work?
  • Melissa Wen: I have testing machines.
  • Brian Kardell: Okay.
  • Melissa Wen: And I replace the kernel in this testing machine using the same operating system that it already has. I just replace the kernel with my custom kernel with the things that I am developing. And then I can use both the, for example, compositors, I can use user space applications and projects to test it. But I also have some testing tools specific for GPUs that we... It's kind of a set of scripts that we check all the value that we get from the GPU when we submit a batch of elements to the GPU, and then we can check the output. We can compare the expected color values, for example, from user space composition with the color values that we get from the GPU, and then we can check if they match or not.
  • Brian Kardell: It's amazing. I don't even think about this stuff until we start talking about it. And then I realize there's so many things to think about. How do you even test that, like you were talking about? My head goes to like, 'Well, wow, I don't know. Are there headless GPUs? And you can throw values at them and see what they return?' And yeah, that's what a fascinating area that I give absolutely no thought to in my life, but makes everything in my life so much better.
  • Melissa Wen: Yeah. And you just mentioned about a headless GPU, and then I remember that, for example, on DRM, on the subsystem, we have the VKMS driver that I am also the maintainer of this driver. It's a virtual KMS driver, so it's like a GPU vendor-agnostic. So we are actually testing the subsystem helpers, the common code. And if what we have in the subsystem, the software level is doing what is expected, and we can test this layer without worrying about specific thing from each hardware vendor, for example. So we have also this virtual driver there, and so many things. I also, sometimes I also want to check something on my personal laptop, on my work laptop, so I just replace the kernel here and then... Because for example, it's a different hardware version or it's a different hardware vendor, and I want to check in multiple systems and setup. So I also do this kind of change replacement of the kernel in my laptop, so it's not very complicated. Sometimes you cannot boot your system if you do something wrong in your kernel.
  • Brian Kardell: I was just going to ask that. It seems scary, like a little bit like you're doing open heart surgery. What if you... Kind of want to be real careful with that or else you might not be able to boot it and see the screen.
  • Melissa Wen: Yeah. But on Linux you can just switch between the kernel. So you have the kernel from the distribution that you are using, and then you have your custom kernel, so you can select which kernel you want to use now. So if your custom kernel is not working as expected, you can just go back to your distribution.
  • Brian Kardell: I see.
  • Melissa Wen: Yeah, the distro kernel. We started to talk about kernel, we started to talk about kernel and not about colors.
  • Brian Kardell: I mean, this is fascinating. This is so outside my normal area of things that I think about, so I love when I get to talk to somebody who actually understands this. Hopefully other people-
  • Melissa Wen: I hope I'm explaining correctly. Sorry.
  • Brian Kardell: Well, I'm learning a lot. I don't know about you, Eric, but I've learned a lot on this.
  • Eric Meyer: Yeah.
  • Brian Kardell: So I don't even know how to ask this without sounding pretty silly, because you would think that I would know the answer to this question, but Linux kind of came from Unix, and then Mac is kind of forked off that. There's Darwin. So it's like it is sort of Linux, but then also Android is Linux based, but it's really AOS. It's not just Linux. So yeah, this fascinates me because we do things that are collectively good, so we do this work upstream and then it's not a single thing that benefits from that. I was trying to say, it's not just the Linux desktop, it's also the Steam Deck and also maybe some devices that are built even with WPE or something that are truly Linux based. What about Android devices? At that level, are they sharing similar code, do you know?
  • Melissa Wen: Yeah, I don't know. To be honest, I don't know much about Android development.
  • Brian Kardell: I'm very happy to hear that, because I felt like maybe I should know the answer to that. But if you don't know the answer to that, then I feel a lot less silly.
  • Melissa Wen: In general, we need specific developers and expert to deal with Android, I mean is what I understand from this topic. But I am actually not the best person to talk about Android. I don't have a full picture of this development. But for example, I know that around colors, talking about color topics, I know that Google, for example, we have the Chrome OS, and they are very interesting on improve color management on Linux, plan management for HDR support too. So they are engaged on this topic, at least for Chrome OS. But I don't actually know much about Android development.
  • Brian Kardell: So if you know the answer to that question, probably there's somebody at Igalia who knows the answer to this.
  • Melissa Wen: Yeah.
  • Brian Kardell: So we should probably just ask and get the answer. Eric, any final questions or comments for Melissa?
  • Eric Meyer: This will make me appreciate much more what goes into just displaying colors on screens, so thank you for that.
  • Melissa Wen: Thank you guys. I think color Linux is a collective work, and as we talk during this time about many layers, many contributions from different side, different point of views, expert people that just want the best for Linux for our project, so it's kind of a collective work. And I would like to thank everyone that each contribution is important for it, so I can see how everyone contributes to improve the state of display on Linux.
  • Brian Kardell: Excellent.
  • Eric Meyer: Thank you, Melissa. Really appreciate it.
  • Melissa Wen: Thank you.