[Intel-gfx] [PATCH] drm: Only select I2C_ALGOBIT for drivers that actually need it

2021-05-14 Thread Uwe Kleine-König
r the individual drivers. Signed-off-by: Uwe Kleine-König --- drivers/gpu/drm/Kconfig | 5 - drivers/gpu/drm/ast/Kconfig | 2 ++ drivers/gpu/drm/gma500/Kconfig | 2 ++ drivers/gpu/drm/hisilicon/hibmc/Kconfig | 2 ++ drivers/gpu/drm/i915/Kconfig

Re: [Intel-gfx] ✗ Fi.CI.IGT: failure for drm: Only select I2C_ALGOBIT for drivers that actually need it

2021-05-17 Thread Uwe Kleine-König
256.html I have problems understanding this mail, but I assume that my patch is not the problem here as these are all runtime errors if I'm not mistaken. If my patch has a problem it should result in a build failure instead. Am I missing something? Best regards Uwe -- Peng

[Intel-gfx] [PATCH] pwm: Rename pwm_get_state() to better reflect its semantic

2021-04-06 Thread Uwe Kleine-König
in reply to the last request). To make this semantic obvious rename the function. Signed-off-by: Uwe Kleine-König --- Documentation/driver-api/pwm.rst | 6 +++- drivers/clk/clk-pwm.c | 2 +- drivers/gpu/drm/i915/display/intel_panel.c | 4 +-- drivers/input/misc

Re: [Intel-gfx] [PATCH] pwm: Rename pwm_get_state() to better reflect its semantic

2021-04-06 Thread Uwe Kleine-König
Hello Thierry, On Tue, Apr 06, 2021 at 01:16:31PM +0200, Thierry Reding wrote: > On Tue, Apr 06, 2021 at 09:30:36AM +0200, Uwe Kleine-König wrote: > > Given that lowlevel drivers usually cannot implement exactly what a > > consumer requests with pwm_apply_state() there is some ro

Re: [Intel-gfx] [PATCH] drm: Only select I2C_ALGOBIT for drivers that actually need it

2022-02-22 Thread Uwe Kleine-König
Hello, On Fri, May 14, 2021 at 12:01:42PM +0200, Uwe Kleine-König wrote: > While working on a drm driver that doesn't need the i2c algobit stuff I > noticed that DRM selects this code even tough only 8 drivers actually use > it. While also only some drivers use i2c, keep the sele

Re: [Intel-gfx] [PATCH v2 11/15] pwm: crc: Implement get_state() method

2020-06-12 Thread Uwe Kleine-König
state->duty_cycle = duty_cycle_reg * state->period / PWM_MAX_LEVEL; > + state->polarity = PWM_POLARITY_NORMAL; > + state->enabled= !!(clk_div_reg & PWM_OUTPUT_ENABLE); These aligned = look strange (IMHO). If you don't feel strong here I'd like to see a single s

Re: [Intel-gfx] [PATCH v2 03/15] pwm: lpss: Add range limit check for the base_unit register value

2020-06-12 Thread Uwe Kleine-König
ng low. I didn't follow the complete discussion but note that the general rule is: round period down to the next possible implementable period round duty_cycle down to the next possible implementable duty_cycle so if a small enough period (and so a small duty_cycle) is req

Re: [Intel-gfx] [PATCH v2 09/15] pwm: crc: Enable/disable PWM output on enable/disable

2020-06-12 Thread Uwe Kleine-König
utput is the right thing for a disabled PWM. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König| Industrial Linux Solutions | https://www.pengutronix.de/ | signature.asc Description: PGP signature __

Re: [Intel-gfx] pwm/i915: Convert pwm-crc and i915 driver's PWM code to use the atomic PWM API

2020-06-12 Thread Uwe Kleine-König
m-intel can both pull > in. > > Up to the two maintainer teams to figure this one out. I'm unclear about the dependencies, but the changes to drivers/pwm need an ack (or processing) by the PWM team. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König

Re: [Intel-gfx] [PATCH v2 03/15] pwm: lpss: Add range limit check for the base_unit register value

2020-06-15 Thread Uwe Kleine-König
Hello Andy, On Fri, Jun 12, 2020 at 02:57:32PM +0300, Andy Shevchenko wrote: > On Fri, Jun 12, 2020 at 12:12:42AM +0200, Uwe Kleine-König wrote: > > I didn't follow the complete discussion but note that the general rule > > is: > > > > round period down to

Re: [Intel-gfx] [PATCH v3 11/15] pwm: crc: Implement get_state() method

2020-06-22 Thread Uwe Kleine-König
iewed-by tag > - Remove extra whitespace to align some code after assignments (requested by > Uwe Kleine-König) > --- > drivers/pwm/pwm-crc.c | 29 + > 1 file changed, 29 insertions(+) > > diff --git a/drivers/pwm/pwm-crc.c b/drivers/pwm/pwm-crc.c

Re: [Intel-gfx] [PATCH v3 03/15] pwm: lpss: Fix off by one error in base_unit math in pwm_lpss_prepare()

2020-06-22 Thread Uwe Kleine-König
ASE_UNIT_SHIFT); > + base_unit &= (base_unit_range - 1); > ctrl |= (u32) base_unit << PWM_BASE_UNIT_SHIFT; > ctrl |= on_time_div; I willing to believe your change is right, what I don't like is that the calculation is really hard to follow. But that's

Re: [Intel-gfx] [PATCH v3 04/15] pwm: lpss: Add range limit check for the base_unit register value

2020-06-22 Thread Uwe Kleine-König
base_unit_range - 1); .get_state seems to handle base_unit == 0 just fine?! Though this doesn't look right either ... Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König| Industrial Linux Solutions | https://www.peng

Re: [Intel-gfx] [PATCH v3 09/15] pwm: crc: Enable/disable PWM output on enable/disable

2020-06-22 Thread Uwe Kleine-König
Pengutronix e.K. | Uwe Kleine-König| Industrial Linux Solutions | https://www.pengutronix.de/ | signature.asc Description: PGP signature ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org htt

Re: [Intel-gfx] [PATCH v3 04/15] pwm: lpss: Add range limit check for the base_unit register value

2020-07-07 Thread Uwe Kleine-König
ate method, > as mentioned above I wrote that when I did not fully understood > how the controller works. > > We really should never encounter this. > > But if we do then I think closest to the truth would be: > > state->period = UINT_MAX; > state->duty_cycle =

Re: [Intel-gfx] [PATCH v3 11/15] pwm: crc: Implement get_state() method

2020-07-07 Thread Uwe Kleine-König
one would appear with a datasheet. Given that this probably won't happen I can take a look at the remaining patches. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König| Industrial Linux Solutions | https://www.pengutronix.de/ |

Re: [Intel-gfx] [PATCH v3 09/15] pwm: crc: Enable/disable PWM output on enable/disable

2020-07-07 Thread Uwe Kleine-König
p, PWM0_CLK_DIV, div); > } > > static int crc_pwm_config(struct pwm_chip *c, struct pwm_device *pwm, In the absence of documentation this looks reasonable. Acked-by: Uwe Kleine-König Best regards Uwe -- Pengutronix e.K.

Re: [Intel-gfx] [PATCH v3 15/15] drm/i915: panel: Use atomic PWM API for devs with an external PWM controller

2020-07-07 Thread Uwe Kleine-König
el = DIV_ROUND_UP(panel->backlight.pwm_state.duty_cycle * > + 100, panel->backlight.pwm_state.period); > + level = intel_panel_compute_brightness(connector, level); In pwm_enable_backlight() the order of these

Re: [Intel-gfx] [PATCH v3 04/15] pwm: lpss: Add range limit check for the base_unit register value

2020-07-07 Thread Uwe Kleine-König
Hello Hans, On Tue, Jul 07, 2020 at 07:31:29PM +0200, Hans de Goede wrote: > On 7/7/20 9:34 AM, Uwe Kleine-König wrote: > > On Mon, Jul 06, 2020 at 10:53:08PM +0200, Hans de Goede wrote: > > > But if we do then I think closest to the truth would be: > > > > &g

Re: [Intel-gfx] [PATCH v4 00/15] acpi/pwm/i915: Convert pwm-crc and i915 driver's PWM code to use the atomic PWM API

2020-07-13 Thread Uwe Kleine-König
xplicitly and others using the PWM API" can be seen as "unified manner" compared to "provide a pwm driver for whatever might be in the GPU and then use generic code (PWM API, pwm_bl) to drive it". Maybe I'm not understanding some involved complexity here?

Re: [Intel-gfx] [PATCH v4 16/16] drm/i915: panel: Use atomic PWM API for devs with an external PWM controller

2020-07-13 Thread Uwe Kleine-König
prepared to fixup here. > + get_vbt_pwm_freq(dev_priv), level); > + } else { > + /* Set period from VBT frequency, leave other settings at 0. */ > + panel->backlight.pwm_state.period = > +

Re: [Intel-gfx] [PATCH v4 06/16] pwm: lpss: Correct get_state result for base_unit == 0

2020-07-13 Thread Uwe Kleine-König
this a problem of the consumer that we don't need to solve? Are there known consumers running into this problem? pwm_lpss_prepare() is buggy here, a request for a too low period should be refused. Best regards Uwe -- Pengutronix e.K.

[Intel-gfx] [PATCH RFC] drm/i915: reduce cursor size for GEN5 hardware

2017-01-31 Thread Uwe Kleine-König
From: Chris Wilson As the introduced comment admits this is clearly a workaround, but for me this is the only known way to make my Lenovo X201 work without flickering and crashing. Signed-off-by: Uwe Kleine-König [uwe: added changelog, comment and restrict to GEN5] --- Hello, as I don't

Re: [Intel-gfx] [PATCH RFC] drm/i915: reduce cursor size for GEN5 hardware

2017-01-31 Thread Uwe Kleine-König
Hello, On Tue, Jan 31, 2017 at 10:03:26AM +0100, Maarten Lankhorst wrote: > Op 31-01-17 om 09:09 schreef Uwe Kleine-König: > > From: Chris Wilson > > > > As the introduced comment admits this is clearly a workaround, but for > > me this is the only known way to make

Re: [Intel-gfx] [PATCH RFC] drm/i915: reduce cursor size for GEN5 hardware

2017-02-07 Thread Uwe Kleine-König
Hello, On 02/01/2017 03:37 PM, Ville Syrjälä wrote: > On Wed, Feb 01, 2017 at 01:41:08PM +0100, Maarten Lankhorst wrote: >> Op 31-01-17 om 20:13 schreef Uwe Kleine-König: >>> On Tue, Jan 31, 2017 at 10:03:26AM +0100, Maarten Lankhorst wrote: >>>> Op 31-01-17 om

Re: [Intel-gfx] [PATCH RFC] drm/i915: reduce cursor size for GEN5 hardware

2017-02-17 Thread Uwe Kleine-König
On 02/07/2017 04:35 PM, Ville Syrjälä wrote: > On Tue, Feb 07, 2017 at 05:03:09PM +0200, Martin Peres wrote: >> On 07/02/17 15:22, Uwe Kleine-König wrote: >>> Hello, >>> >>> On 02/01/2017 03:37 PM, Ville Syrjälä wrote: >>>> On Wed, Feb 01, 2

Re: [Intel-gfx] [PATCH] drm/i915: Fix legacy cursor vs. watermarks for ILK-BDW

2017-02-17 Thread Uwe Kleine-König
Lankhorst > Cc: Daniel Vetter > Cc: Uwe Kleine-König > Reported-by: Uwe Kleine-König > Fixes: f79f26921ee1 ("drm/i915: Add a cursor hack to allow converting legacy > page flip to atomic, v3.") > Signed-off-by: Ville Syrjälä Is this supposed to fix https://bugs.freed

Re: [Intel-gfx] linux-next: manual merge of the drm-misc tree with Linus' tree

2023-09-13 Thread Uwe Kleine-König
c ) <(git show 90c95c3892dd) --- /dev/fd/63 2023-09-13 10:22:37.368055450 +0200 +++ /dev/fd/62 2023-09-13 10:22:37.372055516 +0200 @@ -1,46 +1,36 @@ -commit c04ca6bbb7ea6ea7cba9ba8d3d4d4c767008d189 -Author: Uwe Kleine-König -Date: Sun May 7 18:25:52 2023 +0200 +commit 90c95c3892dd

Re: [Intel-gfx] [PATCH RFC v1 00/52] drm/crtc: Rename struct drm_crtc::dev to drm_dev

2023-07-13 Thread Uwe Kleine-König
On Thu, Jul 13, 2023 at 12:03:05PM +0300, Jani Nikula wrote: > On Wed, 12 Jul 2023, Uwe Kleine-König wrote: > > Hello Jani, > > > > On Wed, Jul 12, 2023 at 05:34:28PM +0300, Jani Nikula wrote: > >> On Wed, 12 Jul 2023, Uwe Kleine-König > >> wrote: > >

Re: [Intel-gfx] [PATCH RFC v1 00/52] drm/crtc: Rename struct drm_crtc::dev to drm_dev

2023-07-13 Thread Uwe Kleine-König
On Thu, Jul 13, 2023 at 08:52:12AM +0200, Geert Uytterhoeven wrote: > Hi Uwe, > > Let's add some fuel to keep the thread alive ;-) > > On Wed, Jul 12, 2023 at 6:13 PM Uwe Kleine-König > wrote: > > On Wed, Jul 12, 2023 at 05:34:28PM +0300, Jani Nikula wrote: > &g

[Intel-gfx] [PATCH RFC v1 00/52] drm/crtc: Rename struct drm_crtc::dev to drm_dev

2023-07-13 Thread Uwe Kleine-König
4 using an allmodconfig (though I only build drivers/gpu/). Best regards Uwe Uwe Kleine-König (52): drm/crtc: Start renaming struct drm_crtc::dev to drm_dev drm/core: Use struct drm_crtc::drm_dev instead of struct drm_crtc::dev drm/amd: Use struct drm_crtc::drm_dev instead of struct drm_crtc:

Re: [Intel-gfx] [PATCH RFC v1 00/52] drm/crtc: Rename struct drm_crtc::dev to drm_dev

2023-07-13 Thread Uwe Kleine-König
Hello Thomas, On Wed, Jul 12, 2023 at 12:19:37PM +0200, Thomas Zimmermann wrote: > Am 12.07.23 um 11:46 schrieb Uwe Kleine-König: > > Hello, > > > > while I debugged an issue in the imx-lcdc driver I was constantly > > irritated about struct drm_device pointer

Re: [Intel-gfx] [PATCH RFC v1 00/52] drm/crtc: Rename struct drm_crtc::dev to drm_dev

2023-07-13 Thread Uwe Kleine-König
Hello Maxime, On Wed, Jul 12, 2023 at 02:52:38PM +0200, Maxime Ripard wrote: > On Wed, Jul 12, 2023 at 01:02:53PM +0200, Uwe Kleine-König wrote: > > > Background is that this makes merge conflicts easier to handle and detect. > > > > Really? > > FWIW, I agree wi

Re: [Intel-gfx] [PATCH RFC v1 00/52] drm/crtc: Rename struct drm_crtc::dev to drm_dev

2023-07-13 Thread Uwe Kleine-König
Hello Jani, On Wed, Jul 12, 2023 at 05:34:28PM +0300, Jani Nikula wrote: > On Wed, 12 Jul 2023, Uwe Kleine-König wrote: > > Hello, > > > > while I debugged an issue in the imx-lcdc driver I was constantly > > irritated about struct drm_device pointer variables being n

Re: [Intel-gfx] [PATCH RFC v1 00/52] drm/crtc: Rename struct drm_crtc::dev to drm_dev

2023-07-13 Thread Uwe Kleine-König
On Wed, Jul 12, 2023 at 12:46:33PM +0200, Christian König wrote: > Am 12.07.23 um 11:46 schrieb Uwe Kleine-König: > > Hello, > > > > while I debugged an issue in the imx-lcdc driver I was constantly > > irritated about struct drm_device pointer variables being named

Re: [Intel-gfx] [Freedreno] [PATCH RFC v1 00/52] drm/crtc: Rename struct drm_crtc::dev to drm_dev

2023-07-17 Thread Uwe Kleine-König
On Thu, Jul 13, 2023 at 10:41:45AM -0400, Sean Paul wrote: > On Thu, Jul 13, 2023 at 9:04 AM Uwe Kleine-König > > But even with the one-patch-per-rename approach I'd consider the > > renaming a net win, because ease of understanding code has a big value. > > It's val

Re: [Intel-gfx] [Freedreno] [PATCH RFC v1 00/52] drm/crtc: Rename struct drm_crtc::dev to drm_dev

2023-07-17 Thread Uwe Kleine-König
alue. It's value is not so easy measurable as "conflicts when backporting", but it also matters in say two years from now, while backporting shouldn't be an issue then any more. Thanks for your input, best regards Uwe -- Pengutronix e.K. | Uwe Kleine-Köni

intel-gfx@lists.freedesktop.org

2023-07-21 Thread Uwe Kleine-König
to_i915 is defined as container_of(dev, struct drm_i915_private, drm); So for a struct drm_device *dev, to_i915(dev)->drm is just dev. Simplify accordingly. Signed-off-by: Uwe Kleine-König --- drivers/gpu/drm/i915/display/intel_display_debugfs.c | 6 ++ drivers/gpu/drm/i915

intel-gfx@lists.freedesktop.org

2023-07-24 Thread Uwe Kleine-König
reduce false positives in CI. I don't think my patch results in regressions. But I fail to understand the indications reported by patchwork, so I might miss something. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König| Industrial Linux Solutions

Re: [Intel-gfx] [PATCH v3 1/3] pwm: make it possible to apply pwm changes in atomic context

2023-10-19 Thread Uwe Kleine-König
port_atomic() and scmi_handle::is_transport_atomic() (Is this also about sleeping?) - There are quite a lot more symbols ending in _atomic and in _cansleep, but several of them don't exists to differentiate a slow and a fast procedure. (e.g. drm_mode_atomic) Not entirely su

Re: [Intel-gfx] [PATCH v3 1/3] pwm: make it possible to apply pwm changes in atomic context

2023-10-25 Thread Uwe Kleine-König
()? I know we've talked about > pwm_apply_atomic in the past, however I think this this the best > option I've seen so far. > > > 2. If there is an API rename can we make sure the patch contains no > >other changes (e.g. don't introduce any new API in the

Re: [PATCH v6 1/4] pwm: rename pwm_apply_state() to pwm_apply_might_sleep()

2023-12-09 Thread Uwe Kleine-König
ng Not a in-detail-review, but I just noticed again, that we have K: pwm_(config|apply_state|ops) in MAINTAINERS. That one needs adaption, too. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König| Industrial Linux Solutions

Re: [PATCH v7 1/4] pwm: Rename pwm_apply_state() to pwm_apply_might_sleep()

2023-12-11 Thread Uwe Kleine-König
ed-by: Lee Jones > Signed-off-by: Sean Young Acked-by: Uwe Kleine-König Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König| Industrial Linux Solutions | https://www.pengutronix.de/ | signature.asc Description: PGP signature

Re: [PATCH v8 1/6] pwm: Rename pwm_apply_state() to pwm_apply_might_sleep()

2023-12-12 Thread Uwe Kleine-König
ed-by: Lee Jones > Signed-off-by: Sean Young Acked-by: Uwe Kleine-König Several affected maintainers already acked, so I guess it's fine to take this via the pwm tree. An Ack from the remaining maintainers would be very welcome, an alternative would be to split the patch. Missing Ac

[Intel-gfx] [PATCH v3] drm: Only select I2C_ALGOBIT for drivers that actually need it

2022-12-21 Thread Uwe Kleine-König
r the individual drivers. Signed-off-by: Uwe Kleine-König --- drivers/gpu/drm/Kconfig | 1 - drivers/gpu/drm/amd/amdgpu/Kconfig | 2 ++ drivers/gpu/drm/ast/Kconfig | 2 ++ drivers/gpu/drm/gma500/Kconfig | 2 ++ drivers/gpu/drm/hisilicon/hibmc/Kconfi