Re: [Intel-gfx] Developing a new backlight driver for specific OLED screen
Hi, I come back on my problem regarding the development of a specific driver which controls the brightness of my OLED device. > If it's eDP and uses some proprietary DPCD brightness control mechanism, > I think in practice it usually is somewhat dependent on the GPU. > > (OTOH I realize you don't mention eDP. If it's not eDP, DDC/CI is the > more likely way to control brightness than DPCD.) I succeed to control the brightness through the /dev/drm_dp_aux0 device. Since I only need access to the DP AUX channel, I would like to develop an independant (from the GPU) driver. Unfortunately I don't know how to get access to the DP AUX channel from this independant driver.. Do you have some ideas? I am totally agree with the fact that this display might only be used with an intel gfx card but I'm not sure that this code (which only use DP AUX read/write access) must be in the intel gfx driver code. >> Unfortunately I guess the mechanism is not shared with many OLED >> displays... > > Do you have a spec for it? How does it differ from the VESA eDP DPCD > brightness control? I don't have any specs but as far as I understood it configures some screen registers to scale the PWM of all OLED pixels depending on the display state. It uses its own vendor's ports and registers. And values sent on the display registers to set the desired brightness are computed with complex formulaes (and the calculation needs static tables of values and display information got from the display at startup).
Re: [Intel-gfx] Developing a new backlight driver for specific OLED screen
Hi, > + dri-devel mailing list that looks more appropriated. > + Hans and Lyude who were recently working to standardize some of the > backlight stuff. Thank you for these contacts. I'll try there if I need. > I don't believe you want to use the i915 API, but move the common functions > to the drm subsystem itself and then reuse as a drm device. If there is enough generic code I'll do everything with the DRM API. Unfortunately I can't spend too much time in order to generalize the i915 common functions. > Aurélien, are you aware of drivers/gpu/drm/display/drm_dp_helper.c and > all the functions around struct dp_aux_backlight and struct > drm_edp_backlight_info? Not yet. Since I'm not familiar with GPU/display drivers I didn't know what could be a good starting point. Indeed I already checked the intel_dp_aux_backlight.c code. That's why I told about using the "i915 API code" at first. But since this display is independent from the GPU i didn't want to link both code. Then that's a really good point if there is already an independant API. I'll have a look this evening. > Does the display use some proprietary, non-VESA DPCD registers? There's > already some of that in i915 for Intel proprietary interfaces. For sure. It's an OLED display. Thus there is no backlight. It uses specific registers to control the brightness of the screen. Unfortunately I guess the mechanism is not shared with many OLED displays... Thank you for your help. Aurélien