Re: [PATCH v5 2/4] drm: Expose wedge recovery methods

2024-09-19 Thread Andy Shevchenko
h Best Regards, Andy Shevchenko

Re: [PATCH 00/18] random: Include and resolve circular include dependency

2024-09-05 Thread Andy Shevchenko
On Thu, Sep 05, 2024 at 03:03:24PM +0200, Uros Bizjak wrote: > On Thu, Sep 5, 2024 at 2:41 PM Andy Shevchenko > wrote: > > > > On Thu, Sep 05, 2024 at 02:17:08PM +0200, Uros Bizjak wrote: > > > There were several attempts to resolve circular include dependency > >

Re: [PATCH 00/18] random: Include and resolve circular include dependency

2024-09-05 Thread Andy Shevchenko
e there are many useful changes already waiting for a couple of years to be applied. Because I haven't found any references nor mentions of that in the cover letter here and explanation why it was not taking into consideration. > [1] https://lore.kernel.org/lkml/20240812115945.484051-4-ubiz...@gmail.com/ -- With Best Regards, Andy Shevchenko

Re: [PATCH v1 0/2] drm/i915/fence: A couple of build fixes

2024-09-02 Thread Andy Shevchenko
> > I amended the commit message about clang, config options and commit > 6863f5643dd7 ("kbuild: allow Clang to find unused static inline > functions for W=1 build") while pushing. It all makes sense. Thank you! -- With Best Regards, Andy Shevchenko

Re: [PATCH v1 0/2] drm/i915/fence: A couple of build fixes

2024-08-29 Thread Andy Shevchenko
On Thu, Aug 29, 2024 at 07:53:25PM +0300, Andy Shevchenko wrote: > On Thu, Aug 29, 2024 at 07:38:08PM +0300, Jani Nikula wrote: > > On Thu, 29 Aug 2024, Andy Shevchenko > > wrote: > > > With CONFIG_WERROR=y and `make W=1` build fails on my x86_64 machine. > >

Re: [PATCH v1 0/2] drm/i915/fence: A couple of build fixes

2024-08-29 Thread Andy Shevchenko
On Thu, Aug 29, 2024 at 07:38:08PM +0300, Jani Nikula wrote: > On Thu, 29 Aug 2024, Andy Shevchenko > wrote: > > With CONFIG_WERROR=y and `make W=1` build fails on my x86_64 machine. > > This is due to some unused functions. Hence these quick fixes. > > Since when

[PATCH v1 2/2] drm/i915/fence: Mark debug_fence_free() with __maybe_unused

2024-08-29 Thread Andy Shevchenko
nce *fence) |^~~~ Fix this by marking debug_fence_free() with __maybe_unused. Fixes: fc1584059d6c ("drm/i915: Integrate i915_sw_fence with debugobjects") Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/i915/i915_sw_fence.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deleti

[PATCH v1 0/2] drm/i915/fence: A couple of build fixes

2024-08-29 Thread Andy Shevchenko
With CONFIG_WERROR=y and `make W=1` build fails on my x86_64 machine. This is due to some unused functions. Hence these quick fixes. Andy Shevchenko (2): drm/i915/fence: Mark debug_fence_init_onstack() with __maybe_unused drm/i915/fence: Mark debug_fence_free() with __maybe_unused drivers

[PATCH v1 1/2] drm/i915/fence: Mark debug_fence_init_onstack() with __maybe_unused

2024-08-29 Thread Andy Shevchenko
nce *fence) |^~~~ Fix this by marking debug_fence_init_onstack() with __maybe_unused. Fixes: 214707fc2ce0 ("drm/i915/selftests: Wrap a timer into a i915_sw_fence") Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/i915/i915_sw_fence.c | 4 ++-

Re: [PATCH v1] drm/i915/hwmon: expose package temperature

2024-08-28 Thread Andy Shevchenko
*val = REG_FIELD_GET(TEMP_MASK, reg_val) * > MILLIDEGREE_PER_DEGREE; > + return 0; > + } ...because here we may drop an indentation level by doing it opposite if (x != y) return -E...; ... > + return -EOPNOTSUPP; > +} -- With Best Regards, Andy Shevchenko

Re: [PATCH v6] drm/i915/hwmon: expose fan speed

2024-08-22 Thread Andy Shevchenko
On Thu, Aug 22, 2024 at 10:28:38AM +0300, Raag Jadav wrote: > On Tue, Aug 20, 2024 at 05:06:39PM +0300, Andy Shevchenko wrote: > > On Tue, Aug 20, 2024 at 04:12:46PM +0300, Raag Jadav wrote: > > > On Tue, Aug 20, 2024 at 01:23:35PM +0300, Andy Shevchenko wrote: > > > &

Re: [PATCH v4] drm/i915/hwmon: expose fan speed

2024-08-21 Thread Andy Shevchenko
ri, Aug 09, 2024 at 02:48:08PM +0300, Andy Shevchenko wrote: > > > > > On Fri, Aug 09, 2024 at 11:45:25AM +0530, Raag Jadav wrote: ... > > > > > I do not understand why we pollute Git history with changelogs, but > > > > > it's > > > >

Re: [PATCH v4] drm/i915/hwmon: expose fan speed

2024-08-21 Thread Andy Shevchenko
On Tue, Aug 20, 2024 at 05:49:23PM -0400, Rodrigo Vivi wrote: > On Tue, Aug 20, 2024 at 12:00:27PM +0300, Raag Jadav wrote: > > On Fri, Aug 09, 2024 at 12:57:54PM +0100, Andi Shyti wrote: > > > On Fri, Aug 09, 2024 at 02:48:08PM +0300, Andy Shevchenko wrote: ... > > &

Re: [PATCH v6] drm/i915/hwmon: expose fan speed

2024-08-20 Thread Andy Shevchenko
On Tue, Aug 20, 2024 at 04:12:46PM +0300, Raag Jadav wrote: > On Tue, Aug 20, 2024 at 01:23:35PM +0300, Andy Shevchenko wrote: > > On Tue, Aug 20, 2024 at 11:50:10AM +0530, Raag Jadav wrote: ... > > > v6: Drop overflow logic (Andy) > > > Aesthetic adjustments (B

Re: [PATCH v6] drm/i915/hwmon: expose fan speed

2024-08-20 Thread Andy Shevchenko
* > + * Calculate fan speed in RPM by time averaging two subsequent > + * readings in minutes. > + * RPM = number of rotations * msecs per minute / time in msecs > + */ > + *val = DIV_ROUND_UP(rotations * (MSEC_PER_SEC * 60), time); ...somewhere here? -- With Best Regards, Andy Shevchenko

Re: [PATCH v2 1/2] string: add mem_is_zero() helper to check if memory area is all zeros

2024-08-14 Thread Andy Shevchenko
; + * mem_is_zero - Check if an area of memory is all 0's. > + * @s: The memory area > + * @n: The size of the area > + * > + * Return: True if the area of memory is all 0's. > + */ > +static inline bool mem_is_zero(const void *s, size_t n) > +{ > + return

Re: [PATCH v4] drm/i915/hwmon: expose fan speed

2024-08-13 Thread Andy Shevchenko
On Tue, Aug 13, 2024 at 03:53:25PM +0300, Raag Jadav wrote: > On Tue, Aug 13, 2024 at 02:47:27PM +0300, Andy Shevchenko wrote: > > On Tue, Aug 13, 2024 at 02:23:13PM +0300, Raag Jadav wrote: > > > On Fri, Aug 09, 2024 at 02:48:08PM +0300, Andy Shevchenko wrote: > > > &

Re: [PATCH v4] drm/i915/hwmon: expose fan speed

2024-08-13 Thread Andy Shevchenko
On Tue, Aug 13, 2024 at 02:23:13PM +0300, Raag Jadav wrote: > On Fri, Aug 09, 2024 at 02:48:08PM +0300, Andy Shevchenko wrote: > > On Fri, Aug 09, 2024 at 11:45:25AM +0530, Raag Jadav wrote: ... > > > + /* > > > + * HW register value is accumulated count of pulses f

Re: [PATCH v5] drm/i915/hwmon: expose fan speed

2024-08-13 Thread Andy Shevchenko
On Tue, Aug 13, 2024 at 08:45:19AM +0300, Raag Jadav wrote: > On Mon, Aug 12, 2024 at 04:15:14PM +0300, Andy Shevchenko wrote: > > On Mon, Aug 12, 2024 at 01:45:38PM +0530, Raag Jadav wrote: ... > > > +static int > > > +hwm_fan_read(struct hwm_drvdata

Re: [PATCH v5] drm/i915/hwmon: expose fan speed

2024-08-12 Thread Andy Shevchenko
Convert to minutes for calculating RPM. > + * RPM = number of rotations * msecs per minute / time in msecs > + */ > + *val = DIV_ROUND_UP(rotations * (MSEC_PER_SEC * 60), time); > + > + fi->reg_val_prev = reg_val; > + fi->time_prev = time_now; > +exit: > + mutex_unlock(&hwmon->hwmon_lock); > + intel_runtime_pm_put(ddat->uncore->rpm, wakeref); > + return ret; > +} -- With Best Regards, Andy Shevchenko

Re: [PATCH v4] drm/i915/hwmon: expose fan speed

2024-08-09 Thread Andy Shevchenko
EC_PER_SEC), time); Have you considered to keep jiffies in the fi and use something from jiffies.h here? To me it feels like we multiply and divide when it can be avoided. Please, think about it (I haven't checked myself, just an idea to share). Also comment probably needs to be expanded to explain the formulas behind all this. -- With Best Regards, Andy Shevchenko

[PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string()

2024-06-04 Thread Andy Shevchenko
Make two APIs look similar. Hence convert match_string() to be a 2-argument macro. In order to avoid unneeded churn, convert all users as well. There is no functional change intended. Signed-off-by: Andy Shevchenko --- Compile tested with `make allyesconfig` and `make allmodconfig` on x86_64

Re: [PATCH 1/2] string: add mem_is_zero() helper to check if memory area is all zeros

2024-05-27 Thread Andy Shevchenko
ing to have a new function per byte in question, or do we come up with a common denominator, like mem_is_all_of(mem, byte)? -- With Best Regards, Andy Shevchenko

Re: [PATCH 2/2] drm: use mem_is_zero() instead of !memchr_inv(s, 0, n)

2024-05-27 Thread Andy Shevchenko
0], &tmp64, sizeof(u64)); > memcpy(&guid[8], &tmp64, sizeof(u64)); What is the type of guid? Shouldn't it be guid_t with the respective guid_is_null() ... > - if (memchr_inv(guid, 0, 16)) > + if (!mem_is_zero(guid, 16)) >

Re: [PATCH v3 1/3] bits: introduce fixed-type genmasks

2024-02-29 Thread Andy Shevchenko
On Thu, Feb 29, 2024 at 12:21:34PM -0600, Lucas De Marchi wrote: > On Thu, Feb 29, 2024 at 12:49:57PM +0200, Andy Shevchenko wrote: > > On Wed, Feb 28, 2024 at 05:39:21PM -0600, Lucas De Marchi wrote: > > > On Thu, Feb 22, 2024 at 06:49:59AM -0800, Yury Norov wrote: ... > &g

Re: [PATCH v3 1/3] bits: introduce fixed-type genmasks

2024-02-29 Thread Andy Shevchenko
On Wed, Feb 28, 2024 at 05:39:21PM -0600, Lucas De Marchi wrote: > On Thu, Feb 22, 2024 at 06:49:59AM -0800, Yury Norov wrote: > > On Wed, Feb 21, 2024 at 03:59:06PM -0600, Lucas De Marchi wrote: > > > On Wed, Feb 21, 2024 at 11:04:22PM +0200, Andy Shevchenko wrote: > > >

Re: [PATCH 01/12] drm/i915: Indicate which pipe failed the fastset check overall

2024-02-26 Thread Andy Shevchenko
On Mon, Feb 26, 2024 at 05:35:51PM +0200, Jani Nikula wrote: > On Mon, 26 Feb 2024, Andy Shevchenko > wrote: > > On Mon, Feb 26, 2024 at 04:57:58PM +0200, Jani Nikula wrote: > >> On Fri, 23 Feb 2024, Ville Syrjälä wrote: > >> > On Thu, Feb 22, 2024 at 04:

Re: [PATCH 01/12] drm/i915: Indicate which pipe failed the fastset check overall

2024-02-26 Thread Andy Shevchenko
ters/numbers after %pX (X is a letter which you proposed to have written as name AFAIU). > And then we could discuss adding support for drm specific things. I > guess one downside is that the functions to do this would have to be in > vsprintf.c instead of drm. Unless we add some co

Re: Re: [PATCH v3 1/3] bits: introduce fixed-type genmasks

2024-02-22 Thread Andy Shevchenko
left untouched for asm case, no? -- With Best Regards, Andy Shevchenko

Re: [PATCH v3 1/3] bits: introduce fixed-type genmasks

2024-02-21 Thread Andy Shevchenko
On Wed, Feb 21, 2024 at 11:06:10PM +0200, Andy Shevchenko wrote: > On Wed, Feb 21, 2024 at 10:37:30PM +0200, Dmitry Baryshkov wrote: > > On Wed, 21 Feb 2024 at 22:30, Dmitry Baryshkov > > wrote: ... > > Excuse me, it seems a c&p from gitlab didn't work as expecte

Re: [PATCH v3 1/3] bits: introduce fixed-type genmasks

2024-02-21 Thread Andy Shevchenko
iously wrong. Has to be dropped. If somebody wants that, it will be material for v6.10 cycle. -- With Best Regards, Andy Shevchenko

Re: [PATCH v3 1/3] bits: introduce fixed-type genmasks

2024-02-21 Thread Andy Shevchenko
27;, expected: ')' > 482arch/arm64/kernel/entry-fpsimd.S:98: Info: macro invoked from here > 483arch/arm64/kernel/entry-fpsimd.S:282: Error: unexpected characters > following instruction at operand 3 -- `bic x2,x1,(0+(((unsigned > long)~0ULL-((unsigned long)(1)<<(0))+1)&((unsigned > long)~0ULL>>((sizeof(unsigned long)*8)-1-(3)' > 484arch/arm64/kernel/entry-fpsimd.S:98: Info: macro invoked from here -- With Best Regards, Andy Shevchenko

Re: [PATCH v3 1/3] bits: introduce fixed-type genmasks

2024-02-09 Thread Andy Shevchenko
om here. In any case, nice patch: And it's at the bottom (among SoB lines), there is no violation with Submitting Patches. -- With Best Regards, Andy Shevchenko

Re: [Intel-gfx] [PATCH] drm/i915/dsi: Use devm_gpiod_get() for all GPIOs

2023-12-04 Thread Andy Shevchenko
to put the GPIO-descriptors. Fine by me, but I'm not to judge if it is a right approach or not. In my series I have reused existing call... Anyway, FWIW, Reviewed-by: Andy Shevchenko -- With Best Regards, Andy Shevchenko

[Intel-gfx] [PATCH v1 1/1] drm/i915/display: Don't use "proxy" headers

2023-11-29 Thread Andy Shevchenko
The driver uses math.h and not util_macros.h. Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/i915/display/intel_snps_phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_snps_phy.c b/drivers/gpu/drm/i915/display/intel_snps_phy.c index

Re: [Intel-gfx] [PATCH 1/3] drm: Add new DRM_IOCTL_MODE_GETPLANE2

2023-11-24 Thread Andy Shevchenko
since we do the same for formats anyway. But it did > occur to me (twice at least) that a kmemdup_array() might a nice thing > to have for things like this. But that's a separate topic. JFYI: https://lore.kernel.org/all/20231017052322.2636-2-kkar...@nvidia.com/ -- With Best Regards, Andy Shevchenko

Re: [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/dsi: 4th attempt to get rid of IOSF GPIO (rev2)

2023-11-22 Thread Andy Shevchenko
; [1] https://intel-gfx-ci.01.org/queue/index.html#fullshards-queue > > -Original Message- > > From: Jani Nikula > > Sent: Thursday, November 16, 2023 10:29 PM > > To: LGCI Bug Filing ; Andy Shevchenko > > > > Cc: intel-gfx@lists.freedesktop.org >

Re: [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/dsi: 4th attempt to get rid of IOSF GPIO (rev2)

2023-11-22 Thread Andy Shevchenko
, but should > >> not be considered as completely accurate. > > OK. So could have been in the list but not sure. > > Okay, timeout. > > I just pushed the series. I trust Hans' testing here, considering the > likely platform impact of the series and CI

Re: [Intel-gfx] [rft, PATCH v4 00/16] drm/i915/dsi: 4th attempt to get rid of IOSF GPIO

2023-11-17 Thread Andy Shevchenko
On Thu, Nov 16, 2023 at 09:58:06AM +0100, Hans de Goede wrote: > On 11/3/23 21:18, Andy Shevchenko wrote: > > DSI code for VBT has a set of ugly GPIO hacks, one of which is direct > > talking to GPIO IP behind the actual driver's back. A second attempt > > to fix t

Re: [Intel-gfx] [rft, PATCH v4 00/16] drm/i915/dsi: 4th attempt to get rid of IOSF GPIO

2023-11-17 Thread Andy Shevchenko
e been > a bit flaky recently, so needed to do a rerun. > > That said, I'm not sure if we have any hardware in CI that would > actually exercise the modifications, so in that sense I trust Hans' > testing much more. Thank you! Should I fix checkpatch warnings CI reported about? -- With Best Regards, Andy Shevchenko

[Intel-gfx] [PATCH v4 16/16] drm/i915/iosf: Drop unused APIs

2023-11-03 Thread Andy Shevchenko
Drop unused vlv_iosf_sb_read() and vlv_iosf_sb_write(). Signed-off-by: Andy Shevchenko Acked-by: Jani Nikula --- drivers/gpu/drm/i915/vlv_sideband.c | 17 - drivers/gpu/drm/i915/vlv_sideband.h | 3 --- 2 files changed, 20 deletions(-) diff --git a/drivers/gpu/drm/i915

[Intel-gfx] [PATCH v4 07/16] drm/i915/dsi: Get rid of redundant 'else'

2023-11-03 Thread Andy Shevchenko
In the snippets like the following if (...) return / goto / break / continue ...; else ... the 'else' is redundant. Get rid of it. Reviewed-by: Andi Shyti Signed-off-by: Andy Shevchenko Acked-by: Jani Nikula --- drivers/gpu/drm/i9

[Intel-gfx] [PATCH v4 13/16] drm/i915/dsi: Prepare soc_gpio_set_value() to distinguish GPIO communities

2023-11-03 Thread Andy Shevchenko
Currently soc_gpio_set_value() supports only a single indexing for GPIO pin. For CHV case, for example, we will need to distinguish community based index from the one that VBT is using. Introduce an additional parameter to soc_gpio_set_value() and its callers. Signed-off-by: Andy Shevchenko

[Intel-gfx] [PATCH v4 08/16] drm/i915/dsi: Replace check with a (missing) MIPI sequence name

2023-11-03 Thread Andy Shevchenko
Names of the MIPI sequence steps are sequential and defined, no need to check for the gaps. However in seq_name the MIPI_SEQ_END is missing. Add it there, and drop unneeded NULL check in sequence_name(). Reviewed-by: Andi Shyti Signed-off-by: Andy Shevchenko Acked-by: Jani Nikula --- drivers

[Intel-gfx] [PATCH v4 14/16] drm/i915/dsi: Replace poking of CHV GPIOs behind the driver's back

2023-11-03 Thread Andy Shevchenko
Taking all this into consideration replace the hack with proper GPIO APIs being used. Signed-off-by: Andy Shevchenko Acked-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 47 +--- 1 file changed, 10 insertions(+), 37 deletions(-) diff --git a/drivers/

[Intel-gfx] [PATCH v4 11/16] drm/i915/dsi: Extract common soc_gpio_set_value() helper

2023-11-03 Thread Andy Shevchenko
Extract a common soc_gpio_set_value() helper that may be used by a few SoCs. Signed-off-by: Andy Shevchenko Acked-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 46 +++- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/i915

[Intel-gfx] [PATCH v4 15/16] drm/i915/dsi: Combine checks in mipi_exec_gpio()

2023-11-03 Thread Andy Shevchenko
For a couple of cases the branches call the same bxt_gpio_set_value(). As Ville suggested they can be combined by dropping the DISPLAY_VER() check from Gen 11 to Gen 9. Do it that way. Suggested-by: Ville Syrjälä Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/i915/display/intel_dsi_vbt.c

[Intel-gfx] [PATCH v4 09/16] drm/i915/dsi: Remove GPIO lookup table at the end of intel_dsi_vbt_gpio_init()

2023-11-03 Thread Andy Shevchenko
ed. After getting the "backlight" and "panel" GPIOs the lookup table registered by intel_dsi_vbt_gpio_init() is no longer necessary, remove it so that another temporary lookup-table for the ":00:02.0" device can be added. Signed-off-by: Hans de Goede Signed-off-by

[Intel-gfx] [rft, PATCH v4 00/16] drm/i915/dsi: 4th attempt to get rid of IOSF GPIO

2023-11-03 Thread Andy Shevchenko
le of precursor patches by Hans - added Rb tag for used to be first three patches (Andi) - rebased on top of the above changes - fixed indexing for multi-community devices, such as Cherry View In v2: - added a few cleanup patches - reworked to use dynamic GPIO lookup tables - converted CHV as well

[Intel-gfx] [PATCH v4 06/16] drm/i915/dsi: Replace while(1) with one with clear exit condition

2023-11-03 Thread Andy Shevchenko
Move existing condition to while(), so it will be clear on what circumstances the loop is successfully finishing. Reviewed-by: Andi Shyti Signed-off-by: Andy Shevchenko Acked-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 5 + 1 file changed, 1 insertion(+), 4

[Intel-gfx] [PATCH v4 12/16] drm/i915/dsi: Replace poking of VLV GPIOs behind the driver's back

2023-11-03 Thread Andy Shevchenko
Taking all this into consideration replace the hack with proper GPIO APIs being used. Signed-off-by: Andy Shevchenko Acked-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 98 ++-- 1 file changed, 28 insertions(+), 70 deletions(-) diff --git a/drivers/gpu/drm/i915/displa

[Intel-gfx] [PATCH v4 05/16] drm/i915/dsi: bxt/icl GPIO set value do not need gpio source

2023-11-03 Thread Andy Shevchenko
From: Jani Nikula Drop the unused parameter. Cc: Andy Shevchenko Cc: Hans de Goede Signed-off-by: Jani Nikula Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915

[Intel-gfx] [PATCH v4 01/16] drm/i915/dsi: assume BXT gpio works for non-native GPIO

2023-11-03 Thread Andy Shevchenko
From: Jani Nikula Purely a guess. Drop the nop function. Cc: Andy Shevchenko Cc: Hans de Goede Signed-off-by: Jani Nikula Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers

[Intel-gfx] [PATCH v4 10/16] drm/i915/dsi: Fix wrong initial value for GPIOs in bxt_gpio_set_value()

2023-11-03 Thread Andy Shevchenko
From: Hans de Goede Fix wrong initial value for GPIOs in bxt_gpio_set_value(). Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko Acked-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers

[Intel-gfx] [PATCH v4 04/16] drm/i915/dsi: rename platform specific *_exec_gpio() to *_gpio_set_value()

2023-11-03 Thread Andy Shevchenko
From: Jani Nikula The lowest level functions are about setting GPIO values, not about executing any sequences anymore. Cc: Andy Shevchenko Cc: Hans de Goede Signed-off-by: Jani Nikula Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 20

[Intel-gfx] [PATCH v4 03/16] drm/i915/dsi: clarify GPIO exec sequence

2023-11-03 Thread Andy Shevchenko
From: Jani Nikula With the various sequence versions and pointer increments interleaved, it's a bit hard to decipher what's going on. Add separate paths for different sequence versions. Cc: Andy Shevchenko Cc: Hans de Goede Signed-off-by: Jani Nikula Signed-off-by: Andy

[Intel-gfx] [PATCH v4 02/16] drm/i915/dsi: switch mipi_exec_gpio() from dev_priv to i915

2023-11-03 Thread Andy Shevchenko
From: Jani Nikula Follow the contemporary conventions. Cc: Andy Shevchenko Cc: Hans de Goede Signed-off-by: Jani Nikula Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers

Re: [Intel-gfx] [PATCH v3 01/15] drm/i915/dsi: assume BXT gpio works for non-native GPIO

2023-11-02 Thread Andy Shevchenko
On Thu, Nov 02, 2023 at 07:10:09PM +0200, Ville Syrjälä wrote: > On Thu, Nov 02, 2023 at 05:12:14PM +0200, Andy Shevchenko wrote: ... > > if (native) > > icl_native_gpio_set_value(dev_priv, gpio_number, value); > > else if (DISPLA

[Intel-gfx] [PATCH v3 15/15] drm/i915/iosf: Drop unused APIs

2023-11-02 Thread Andy Shevchenko
Drop unused vlv_iosf_sb_read() and vlv_iosf_sb_write(). Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/i915/vlv_sideband.c | 17 - drivers/gpu/drm/i915/vlv_sideband.h | 3 --- 2 files changed, 20 deletions(-) diff --git a/drivers/gpu/drm/i915/vlv_sideband.c b/drivers/gpu

Re: [Intel-gfx] [PATCH v3 14/15] drm/i915/dsi: Replace poking of CHV GPIOs behind the driver's back

2023-11-02 Thread Andy Shevchenko
On Thu, Nov 02, 2023 at 04:47:41PM +0100, Hans de Goede wrote: > On 11/2/23 16:12, Andy Shevchenko wrote: ... > > + soc_exec_opaque_gpio(connector, gpio_index, > > "INT33FF:03", "Panel SE", > > +

[Intel-gfx] [PATCH v3 11/15] drm/i915/dsi: Extract common soc_gpio_set_value() helper

2023-11-02 Thread Andy Shevchenko
Extract a common soc_gpio_set_value() helper that may be used by a few SoCs. Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 46 +++- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dsi_vbt.c b

[Intel-gfx] [PATCH v3 12/15] drm/i915/dsi: Replace poking of VLV GPIOs behind the driver's back

2023-11-02 Thread Andy Shevchenko
Taking all this into consideration replace the hack with proper GPIO APIs being used. Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 98 ++-- 1 file changed, 28 insertions(+), 70 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dsi_vbt.c b/

[Intel-gfx] [PATCH v3 03/15] drm/i915/dsi: clarify GPIO exec sequence

2023-11-02 Thread Andy Shevchenko
From: Jani Nikula With the various sequence versions and pointer increments interleaved, it's a bit hard to decipher what's going on. Add separate paths for different sequence versions. Cc: Andy Shevchenko Cc: Hans de Goede Signed-off-by: Jani Nikula Signed-off-by: Andy

[Intel-gfx] [PATCH v3 14/15] drm/i915/dsi: Replace poking of CHV GPIOs behind the driver's back

2023-11-02 Thread Andy Shevchenko
Taking all this into consideration replace the hack with proper GPIO APIs being used. Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 47 +--- 1 file changed, 10 insertions(+), 37 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dsi_vbt.

Re: [Intel-gfx] [PATCH v3 10/15] drm/i915/dsi: Fix wrong initial value for GPIOs in bxt_exec_gpio()

2023-11-02 Thread Andy Shevchenko
On Thu, Nov 02, 2023 at 05:12:23PM +0200, Andy Shevchenko wrote: > From: Hans de Goede > > Fix wrong initial value for GPIOs in bxt_exec_gpio(). Oh, and forgot to update the function name in this patch. In any case I would wait for Hans to confirm it works (and probably he may give

[Intel-gfx] [PATCH v3 07/15] drm/i915/dsi: Get rid of redundant 'else'

2023-11-02 Thread Andy Shevchenko
In the snippets like the following if (...) return / goto / break / continue ...; else ... the 'else' is redundant. Get rid of it. Reviewed-by: Andi Shyti Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/i915/display/intel_dsi_

Re: [Intel-gfx] [rft, PATCH v3 00/15] drm/i915/dsi: 2nd attempt to get rid of IOSF GPIO

2023-11-02 Thread Andy Shevchenko
On Thu, Nov 02, 2023 at 05:12:13PM +0200, Andy Shevchenko wrote: > DSI code for VBT has a set of ugly GPIO hacks, one of which is direct > talking to GPIO IP behind the actual driver's back. A second attempt > to fix that is here. > > If I understood correctly, my approac

[Intel-gfx] [PATCH v3 10/15] drm/i915/dsi: Fix wrong initial value for GPIOs in bxt_exec_gpio()

2023-11-02 Thread Andy Shevchenko
From: Hans de Goede Fix wrong initial value for GPIOs in bxt_exec_gpio(). Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/display

[Intel-gfx] [rft, PATCH v3 00/15] drm/i915/dsi: 2nd attempt to get rid of IOSF GPIO

2023-11-02 Thread Andy Shevchenko
unity devices, such as Cherry View In v2: - added a few cleanup patches - reworked to use dynamic GPIO lookup tables - converted CHV as well Andy Shevchenko (8): drm/i915/dsi: Replace while(1) with one with clear exit condition drm/i915/dsi: Get rid of redundant 'else' drm/i915/dsi

[Intel-gfx] [PATCH v3 06/15] drm/i915/dsi: Replace while(1) with one with clear exit condition

2023-11-02 Thread Andy Shevchenko
Move existing condition to while(), so it will be clear on what circumstances the loop is successfully finishing. Reviewed-by: Andi Shyti Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a

[Intel-gfx] [PATCH v3 08/15] drm/i915/dsi: Replace check with a (missing) MIPI sequence name

2023-11-02 Thread Andy Shevchenko
Names of the MIPI sequence steps are sequential and defined, no need to check for the gaps. However in seq_name the MIPI_SEQ_END is missing. Add it there, and drop unneeded NULL check in sequence_name(). Reviewed-by: Andi Shyti Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/i915/display

[Intel-gfx] [PATCH v3 13/15] drm/i915/dsi: Prepare soc_gpio_set_value() to distinguish GPIO communities

2023-11-02 Thread Andy Shevchenko
Currently soc_gpio_set_value() supports only a single indexing for GPIO pin. For CHV case, for example, we will need to distinguish community based index from the one that VBT is using. Introduce an additional parameter to soc_gpio_set_value() and its callers. Signed-off-by: Andy Shevchenko

[Intel-gfx] [PATCH v3 09/15] drm/i915/dsi: Remove GPIO lookup table at the end of intel_dsi_vbt_gpio_init()

2023-11-02 Thread Andy Shevchenko
ed. After getting the "backlight" and "panel" GPIOs the lookup table registered by intel_dsi_vbt_gpio_init() is no longer necessary, remove it so that another temporary lookup-table for the ":00:02.0" device can be added. Signed-off-by: Hans de Goede Signed-off-b

[Intel-gfx] [PATCH v3 05/15] drm/i915/dsi: bxt/icl GPIO set value do not need gpio source

2023-11-02 Thread Andy Shevchenko
From: Jani Nikula Drop the unused parameter. Cc: Andy Shevchenko Cc: Hans de Goede Signed-off-by: Jani Nikula Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915

[Intel-gfx] [PATCH v3 01/15] drm/i915/dsi: assume BXT gpio works for non-native GPIO

2023-11-02 Thread Andy Shevchenko
From: Jani Nikula Purely a guess. Drop the nop function. Cc: Andy Shevchenko Cc: Hans de Goede Signed-off-by: Jani Nikula Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers

[Intel-gfx] [PATCH v3 02/15] drm/i915/dsi: switch mipi_exec_gpio() from dev_priv to i915

2023-11-02 Thread Andy Shevchenko
From: Jani Nikula Follow the contemporary conventions. Cc: Andy Shevchenko Cc: Hans de Goede Signed-off-by: Jani Nikula Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers

[Intel-gfx] [PATCH v3 04/15] drm/i915/dsi: rename platform specific *_exec_gpio() to *_gpio_set_value()

2023-11-02 Thread Andy Shevchenko
From: Jani Nikula The lowest level functions are about setting GPIO values, not about executing any sequences anymore. Cc: Andy Shevchenko Cc: Hans de Goede Signed-off-by: Jani Nikula Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 20

Re: [Intel-gfx] [PATCH v2 6/7] drm/i915/dsi: Replace poking of CHV GPIOs behind the driver's back

2023-11-02 Thread Andy Shevchenko
On Wed, Nov 01, 2023 at 11:20:23AM +0100, Hans de Goede wrote: > On 11/1/23 10:32, Andy Shevchenko wrote: > > On Tue, Oct 31, 2023 at 10:15:52PM +0100, Hans de Goede wrote: > >> On 10/31/23 17:07, Hans de Goede wrote: > >>> On 10/24/23 18:11, Andy Shevchenko wrote:

Re: [Intel-gfx] [PATCH 5/5] drm/i915/dsi: bxt/icl GPIO set value do not need gpio source

2023-11-02 Thread Andy Shevchenko
With Best Regards, Andy Shevchenko

Re: [Intel-gfx] [PATCH v2 6/7] drm/i915/dsi: Replace poking of CHV GPIOs behind the driver's back

2023-11-02 Thread Andy Shevchenko
to do minimum in that sense with less possible invasion into existing flow. -- With Best Regards, Andy Shevchenko

Re: [Intel-gfx] [PATCH v2 6/7] drm/i915/dsi: Replace poking of CHV GPIOs behind the driver's back

2023-11-01 Thread Andy Shevchenko
On Tue, Oct 31, 2023 at 10:15:52PM +0100, Hans de Goede wrote: > On 10/31/23 17:07, Hans de Goede wrote: > > On 10/24/23 18:11, Andy Shevchenko wrote: > >> On Tue, Oct 24, 2023 at 06:57:38PM +0300, Andy Shevchenko wrote: ... > > As for the CHT support, I have not adde

Re: [Intel-gfx] [PATCH v2 6/7] drm/i915/dsi: Replace poking of CHV GPIOs behind the driver's back

2023-10-31 Thread Andy Shevchenko
On Tue, Oct 31, 2023 at 05:07:39PM +0100, Hans de Goede wrote: > On 10/24/23 18:11, Andy Shevchenko wrote: > > On Tue, Oct 24, 2023 at 06:57:38PM +0300, Andy Shevchenko wrote: > >> It's a dirty hack in the driver that pokes GPIO registers behind > >> the driv

Re: [Intel-gfx] [PATCH v2 6/7] drm/i915/dsi: Replace poking of CHV GPIOs behind the driver's back

2023-10-24 Thread Andy Shevchenko
On Tue, Oct 24, 2023 at 06:57:38PM +0300, Andy Shevchenko wrote: > It's a dirty hack in the driver that pokes GPIO registers behind > the driver's back. Moreoever it might be problematic as simultaneous > I/O may hang the system, see the commit 0bd50d719b00 ("pinctr

[Intel-gfx] [PATCH v2 2/7] drm/i915/dsi: Get rid of redundant 'else'

2023-10-24 Thread Andy Shevchenko
In the snippets like the following if (...) return / goto / break / continue ...; else ... the 'else' is redundant. Get rid of it. Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 58 ++

[Intel-gfx] [rft, PATCH v2 0/7] drm/i915/dsi: 2nd attempt to get rid of IOSF GPIO

2023-10-24 Thread Andy Shevchenko
vices that use this piece of code, is it possible to give a test run on (one of) them? In v2: - added a few cleanup patches - reworked to use dynamic GPIO lookup tables - converted CHV as well Andy Shevchenko (7): drm/i915/dsi: Replace while(1) with one with clear exit condition drm/i915/dsi: Ge

[Intel-gfx] [PATCH v2 5/7] drm/i915/dsi: Replace poking of VLV GPIOs behind the driver's back

2023-10-24 Thread Andy Shevchenko
Taking all this into consideration replace the hack with proper GPIO APIs being used. Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 98 ++-- 1 file changed, 28 insertions(+), 70 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dsi_vbt.c b/

Re: [Intel-gfx] [rft, PATCH v1 0/2] drm/i915/dsi: An attempt to get rid of IOSF GPIO on VLV

2023-10-24 Thread Andy Shevchenko
On Wed, Oct 18, 2023 at 03:52:36PM +0300, Andy Shevchenko wrote: > On Wed, Oct 18, 2023 at 11:09:35AM +0200, Hans de Goede wrote: > > On 10/18/23 07:10, Andy Shevchenko wrote: ... > > Yes I should be able to find a device or 2 which poke GPIOs from the > > VBT MIPI seque

[Intel-gfx] [PATCH v2 4/7] drm/i915/dsi: Extract common soc_gpio_exec() helper

2023-10-24 Thread Andy Shevchenko
Extract a common soc_gpio_exec() helper that may be used by a few SoCs. Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 49 +++- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dsi_vbt.c b

[Intel-gfx] [PATCH v2 6/7] drm/i915/dsi: Replace poking of CHV GPIOs behind the driver's back

2023-10-24 Thread Andy Shevchenko
Taking all this into consideration replace the hack with proper GPIO APIs being used. Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 47 +--- 1 file changed, 10 insertions(+), 37 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dsi_vbt.

[Intel-gfx] [PATCH v2 7/7] drm/i915/iosf: Drop unused APIs

2023-10-24 Thread Andy Shevchenko
Drop unused vlv_iosf_sb_read() and vlv_iosf_sb_write(). Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/i915/vlv_sideband.c | 17 - drivers/gpu/drm/i915/vlv_sideband.h | 3 --- 2 files changed, 20 deletions(-) diff --git a/drivers/gpu/drm/i915/vlv_sideband.c b/drivers/gpu

[Intel-gfx] [PATCH v2 3/7] drm/i915/dsi: Replace check with a (missing) MIPI sequence name

2023-10-24 Thread Andy Shevchenko
Names of the MIPI sequence steps are sequential and defined, no need to check for the gaps. However in seq_name the MIPI_SEQ_END is missing. Add it there, and drop unneeded NULL check in sequence_name(). Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 3 ++- 1

[Intel-gfx] [PATCH v2 1/7] drm/i915/dsi: Replace while(1) with one with clear exit condition

2023-10-24 Thread Andy Shevchenko
Move existing condition to while(), so it will be clear on what circumstances the loop is successfully finishing. Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/display

Re: [Intel-gfx] [rft, PATCH v1 0/2] drm/i915/dsi: An attempt to get rid of IOSF GPIO on VLV

2023-10-18 Thread Andy Shevchenko
On Wed, Oct 18, 2023 at 11:09:35AM +0200, Hans de Goede wrote: > On 10/18/23 07:10, Andy Shevchenko wrote: > > DSI code for VBT has a set of ugly GPIO hacks, one of which is direct > > talking to GPIO IP behind the actual driver's back. An attempt to fix > > that is here

[Intel-gfx] [PATCH v1 1/2] drm/i915/dsi: Extract common soc_gpio_exec() helper

2023-10-17 Thread Andy Shevchenko
Extract a common soc_gpio_exec() helper that may be used by a few SoCs. Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 49 +++- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dsi_vbt.c b

[Intel-gfx] [rft, PATCH v1 0/2] drm/i915/dsi: An attempt to get rid of IOSF GPIO on VLV

2023-10-17 Thread Andy Shevchenko
that use this piece of code, is it possible to give a test run on (one of) them? Andy Shevchenko (2): drm/i915/dsi: Extract common soc_gpio_exec() helper drm/i915/dsi: Replace poking of VLV GPIOs behind the driver's back drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 150 +++--

[Intel-gfx] [PATCH v1 2/2] drm/i915/dsi: Replace poking of VLV GPIOs behind the driver's back

2023-10-17 Thread Andy Shevchenko
Taking all this into consideration replace the hack with proper GPIO APIs being used. Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 101 ++- 1 file changed, 31 insertions(+), 70 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dsi_vbt.c b/

Re: [Intel-gfx] [PATCH v4 1/1] drm/i915: Move abs_diff() to math.h

2023-08-03 Thread Andy Shevchenko
On Thu, Aug 03, 2023 at 10:24:46AM -0700, Andrew Morton wrote: > On Thu, 3 Aug 2023 16:19:18 +0300 Andy Shevchenko > wrote: ... > > +#define abs_diff(a, b) ({ \ > > + typeof(a) __a = (a);\ > > + typeof(b) __b = (b);

[Intel-gfx] [PATCH v4 1/1] drm/i915: Move abs_diff() to math.h

2023-08-03 Thread Andy Shevchenko
abs_diff() belongs to math.h. Move it there. This will allow others to use it. Reviewed-by: Jiri Slaby # tty/serial Acked-by: Jani Nikula Acked-by: Greg Kroah-Hartman Reviewed-by: Andi Shyti Reviewed-by: Philipp Zabel # gpu/ipu-v3 Signed-off-by: Andy Shevchenko --- v4: - Cc'ed to Andre

[Intel-gfx] [PATCH v3 1/1] drm/i915: Move abs_diff() to math.h

2023-07-24 Thread Andy Shevchenko
abs_diff() belongs to math.h. Move it there. This will allow others to use it. Signed-off-by: Andy Shevchenko Reviewed-by: Jiri Slaby # tty/serial --- v3: added tag (Jiri), removed space after a cast (fdo CI) drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 1 + drivers/gpu/drm/i915/display

Re: [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [v2,1/1] drm/i915: Move abs_diff() to math.h

2023-07-21 Thread Andy Shevchenko
amend this in case a new version will be needed. -- With Best Regards, Andy Shevchenko

  1   2   3   4   >