Call it from the higher level function, as it will be shared between two
code paths.
Cc: Uma Shankar
Cc: Ville Syrjälä
Signed-off-by: Jani Nikula
---
drivers/gpu/drm/i915/display/intel_dp_link_training.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm
Add some of the new additions from DP 2.0 E11.
Cc: Uma Shankar
Cc: Ville Syrjälä
Signed-off-by: Jani Nikula
---
include/drm/dp/drm_dp_helper.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/drm/dp/drm_dp_helper.h b/include/drm/dp/drm_dp_helper.h
index c499d735b992..69487bd8ed56
128b/132b updates to reflect DP 2.0 errata changes, plus some other DP
updates.
Jani Nikula (8):
drm/dp: add drm_dp_128b132b_read_aux_rd_interval()
drm/dp: add 128b/132b link status helpers from DP 2.0 E11
drm/dp: add some new DPCD macros from DP 2.0 E11
drm/i915/dp: move
Try to avoid the timeout during debugging.
Cc: Uma Shankar
Cc: Ville Syrjälä
Signed-off-by: Jani Nikula
---
drivers/gpu/drm/i915/display/intel_dp_link_training.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/i915/display/intel_dp_link_training.c
b/drivers/gpu/drm
The DP 2.0 errata changes DP_128B132B_TRAINING_AUX_RD_INTERVAL (DPCD
0x2216) completely. Add a new function to read that. Follow-up will need
to clean up existing functions.
v2: fix reversed interpretation of bit 7 meaning (Uma)
Cc: Uma Shankar
Cc: Ville Syrjälä
Signed-off-by: Jani Nikula
n global mode config .atomic_check. Fingers crossed.
v2:
- Update in .compute_config() not .atomic_check (Ville)
Cc: Bhawanpreet Lakha
Cc: Lyude Paul
Cc: Uma Shankar
Cc: Ville Syrjälä
Signed-off-by: Jani Nikula
---
drivers/gpu/drm/i915/display/intel_dp_mst.c | 29 +++--
1 file ch
gt; +#define PRINT_FLAG(name) drm_printf(p, "%s: %s\n", #name,
> yesno(info->display.name));
>
> Signed-off-by: Lucas De Marchi
Reviewed-by: Jani Nikula
> ---
> drivers/gpu/drm/i915/intel_device_info.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>
On Wed, 26 Jan 2022, Lucas De Marchi wrote:
> Sort includes alphabetically so it's easier to add/remove includes and
> know when that is needed.
>
> Signed-off-by: Lucas De Marchi
Reviewed-by: Jani Nikula
> ---
> drivers/gpu/drm/drm_gem.c | 20 ++-
264 100029 186bd dp/drm_dp_helper.ko.old
> 981291636 264 100029 186bd dp/drm_dp_helper.ko
> 1973432 1096402352 2085424 1fd230 nouveau/nouveau.ko.old
> 1973432 1096402352 2085424 1fd230 nouveau/nouveau.ko
>
> Signed-off-by: Lucas De Marchi
Reviewed-by: Ja
On Wed, 26 Jan 2022, Andy Shevchenko wrote:
> And basically create a MIPI based driver for I2C.
What does that even mean?
BR,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
77941411..72c90b432e87 100644
> --- a/drivers/gpu/drm/i915/i915_ttm_buddy_manager.h
> +++ b/drivers/gpu/drm/i915/i915_ttm_buddy_manager.h
> @@ -20,6 +20,7 @@ struct drm_buddy;
> *
> * @base: struct ttm_resource base class we extend
> * @blocks: the list of struct i915_buddy_block for this resource/allocation
> + * @flags: DRM_BUDDY_*_ALLOCATION flags
> * @mm: the struct i915_buddy_mm for this resource
> *
> * Extends the struct ttm_resource to manage an address space allocation with
> @@ -28,6 +29,7 @@ struct drm_buddy;
> struct i915_ttm_buddy_resource {
> struct ttm_resource base;
> struct list_head blocks;
> + unsigned long flags;
> struct drm_buddy *mm;
> };
>
> diff --git a/include/drm/drm_buddy.h b/include/drm/drm_buddy.h
> index f524db152413..865664b90a8a 100644
> --- a/include/drm/drm_buddy.h
> +++ b/include/drm/drm_buddy.h
> @@ -13,15 +13,22 @@
>
> #include
>
> -#define range_overflows(start, size, max) ({ \
> +#define check_range_overflow(start, end, size, max) ({ \
Random drive-by comment, why the rename? The old one is understandable,
it's a bool, while "check", to me, implies it might *do* something in
case of overflow.
> typeof(start) start__ = (start); \
> + typeof(end) end__ = (end);\
> typeof(size) size__ = (size); \
> typeof(max) max__ = (max); \
> (void)(&start__ == &size__); \
> (void)(&start__ == &max__); \
> - start__ >= max__ || size__ > max__ - start__; \
> + (void)(&start__ == &end__); \
> + (void)(&end__ == &size__); \
> + (void)(&end__ == &max__); \
> + start__ >= max__ || end__ > max__ || \
> + size__ > end__ - start__; \
> })
>
> +#define DRM_BUDDY_RANGE_ALLOCATION (1 << 0)
> +
> struct drm_buddy_block {
> #define DRM_BUDDY_HEADER_OFFSET GENMASK_ULL(63, 12)
> #define DRM_BUDDY_HEADER_STATE GENMASK_ULL(11, 10)
> @@ -131,12 +138,11 @@ int drm_buddy_init(struct drm_buddy *mm, u64 size, u64
> chunk_size);
>
> void drm_buddy_fini(struct drm_buddy *mm);
>
> -struct drm_buddy_block *
> -drm_buddy_alloc_blocks(struct drm_buddy *mm, unsigned int order);
> -
> -int drm_buddy_alloc_range(struct drm_buddy *mm,
> - struct list_head *blocks,
> - u64 start, u64 size);
> +int drm_buddy_alloc_blocks(struct drm_buddy *mm,
> +u64 start, u64 end, u64 size,
> +u64 min_page_size,
> +struct list_head *blocks,
> +unsigned long flags);
>
> void drm_buddy_free_block(struct drm_buddy *mm, struct drm_buddy_block
> *block);
--
Jani Nikula, Intel Open Source Graphics Center
ache.c support\n");
> WARN_ON_ONCE(1);
> #endif
> }
> @@ -177,7 +175,6 @@ drm_clflush_virt_range(void *addr, unsigned long length)
> if (wbinvd_on_all_cpus())
> pr_err("Timed out waiting for cache flush\n");
> #else
> - pr_err("Architecture has no drm_cache.c support\n");
> WARN_ON_ONCE(1);
> #endif
> }
--
Jani Nikula, Intel Open Source Graphics Center
RROR=y which depends on
COMPILE_TEST=n. We use the "HDRTEST" and -Werror for development and CI
to keep the driver clean, but it's not really intended for general
consumption. Usually when something like this even hits the tree it's
because of a merge mishap somewhere down the line.
BR,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
{
>> + return dev->of_node == data;
>> +}
>> +
>> +static inline void release_of(struct device *dev, void *data)
>> +{
>> +of_node_put(data);
>> +}
>> +
>> +static inline int compare_dev(struct device *dev, void *data)
>> +{
>> +return dev == data;
>> +}
>> +
>> void component_master_del(struct device *,
>> const struct component_master_ops *);
>>
--
Jani Nikula, Intel Open Source Graphics Center
isc is group maintained, I expect that to continue like
> we've done before, so no new expectations that patches all go through
> my hands. That would be silly. This also means I'm happy to put any
> other volunteer's name in the M: line, but otherwise git log says I'm
&
On Wed, 26 Jan 2022, Ville Syrjälä wrote:
> On Tue, Jan 25, 2022 at 07:03:43PM +0200, Jani Nikula wrote:
>> The DP 2.0 errata completely overhauls the 128b/132b link training, with
>> no provisions for backward compatibility with the original DP 2.0
>> specification.
>&
On Thu, 27 Jan 2022, Ville Syrjälä wrote:
> On Tue, Jan 25, 2022 at 07:03:43PM +0200, Jani Nikula wrote:
>
>> +static bool
>> +intel_dp_128b132b_lane_cds(struct intel_dp *intel_dp,
>> + const struct intel_crtc_state *crtc_state,
>> +
gt;encoder;
>> +wb_conn->encoder->possible_crtcs = 1 << drm_crtc_index(&rcrtc->crtc);
>> +drm_connector_helper_add(wb_conn->base,
>> &rcar_du_wb_conn_helper_funcs);
>>
>> return drm_writeback_connector_init(&rcdu->ddev, wb_conn,
>> @@ -220,7 +222,7 @@ void rcar_du_writeback_setup(struct rcar_du_crtc *rcrtc,
>> struct drm_framebuffer *fb;
>> unsigned int i;
>>
>> -state = rcrtc->writeback.base.state;
>> +state = rcrtc->writeback.base->state;
>> if (!state || !state->writeback_job)
>> return;
>>
--
Jani Nikula, Intel Open Source Graphics Center
rivers/gpu/drm/i915/gt/intel_timeline.c | 4 ++--
drivers/gpu/drm/i915/i915_reg.h | 8
drivers/gpu/drm/i915/i915_trace.h| 7 ++-
drivers/gpu/drm/i915/intel_dram.c| 30 ++
5 files changed, 9 insertions(+), 43 deletions(-)
--
Jani Nikula, Intel Open Source Graphics Center
On Thu, 28 Oct 2021, Ville Syrjälä wrote:
> On Thu, Oct 28, 2021 at 01:29:21PM +0300, Jani Nikula wrote:
>>
>> Hi Dave & Daniel -
>>
>> Certainly more than I'd like at this stage, but it's mostly Cc: stable
>> material, and the tracepoint change
/dc_stream.h | 13 +
> drivers/gpu/drm/drm_dp_mst_topology.c | 42 ++-
> drivers/gpu/drm/i915/display/intel_dp_mst.c | 4 +-
> drivers/gpu/drm/nouveau/dispnv50/disp.c | 2 +-
> drivers/gpu/drm/radeon/radeon_dp_mst.c | 4 +-
> include/drm/drm_dp_mst_helper.h | 5 +-
> 13 files changed, 425 insertions(+), 16 deletions(-)
--
Jani Nikula, Intel Open Source Graphics Center
On Fri, 29 Oct 2021, Jani Nikula wrote:
> On Wed, 27 Oct 2021, Lyude Paul wrote:
>> topic/amdgpu-dp2.0-mst-2021-10-27:
>> UAPI Changes:
>> Nope!
>>
>> Cross-subsystem Changes:
>> drm_dp_update_payload_part1() takes a new argument for specifying what the
&
n4i_tcon_get_connector(encoder));
> + connector = sun4i_tcon_get_connector(encoder);
> + sun4i_tcon0_mode_set_dithering(tcon, connector);
> + drm_connector_put(connector);
>
> /* Adjust clock delay */
> clk_delay = sun4i_tcon_get_clk_delay(mode, 0);
>
*aux, u8
> request,
> msg.buffer = buffer;
> msg.size = size;
>
> + /* No transfer function is set, so not an available DP connector */
> + if (!aux->transfer)
> + return -EINVAL;
> +
> mutex_lock(&aux->hw_mutex);
>
> /*
--
Jani Nikula, Intel Open Source Graphics Center
On Tue, 02 Nov 2021, He Ying wrote:
> 在 2021/11/1 21:02, Jani Nikula 写道:
>> On Mon, 01 Nov 2021, He Ying wrote:
>>> From the comments of drm_for_each_connector_iter(), we know
>>> that "connector is only valid within the list body, if you
>>
On Tue, 02 Nov 2021, "Yuan, Perry" wrote:
> [AMD Official Use Only]
>
> Hi Jani:
> Thanks for your comments.
>
>> -Original Message-
>> From: Jani Nikula
>> Sent: Monday, November 1, 2021 9:07 PM
>> To: Yuan, Perry ; Maarten Lankhorst
On Tue, 02 Nov 2021, Christoph Hellwig wrote:
> Remove the separately included Makefile and just use the relative
> reference from the main i915 Makefile as for source files in other
> subdirectories.
>
> Signed-off-by: Christoph Hellwig
Acked-by: Jani Nikula
> ---
>
On Wed, 03 Nov 2021, "Yuan, Perry" wrote:
> [AMD Official Use Only]
>
> Hi Jani:
>
>> -Original Message-
>> From: Jani Nikula
>> Sent: Tuesday, November 2, 2021 4:40 PM
>> To: Yuan, Perry ; Maarten Lankhorst
>> ; Maxime Ripard ;
&g
b/include/drm/drm_mode_config.h
> @@ -969,4 +969,10 @@ static inline int drm_mode_config_init(struct drm_device
> *dev)
> void drm_mode_config_reset(struct drm_device *dev);
> void drm_mode_config_cleanup(struct drm_device *dev);
>
> +#ifdef CONFIG_VGA_CONSOLE
> +extern bool vgacon_text_force(void);
> +#else
> +static inline bool vgacon_text_force(void) { return false; }
> +#endif
> +
As said, maybe the CONFIG_VGA_CONSOLE ifdef should be dropped.
Also, this seems like a completely arbitrary choice of header to place
this.
BR,
Jani.
> #endif
> diff --git a/include/linux/console.h b/include/linux/console.h
> index 20874db50bc8..d4dd8384898b 100644
> --- a/include/linux/console.h
> +++ b/include/linux/console.h
> @@ -217,12 +217,6 @@ extern atomic_t ignore_console_lock_warning;
> #define VESA_HSYNC_SUSPEND 2
> #define VESA_POWERDOWN 3
>
> -#ifdef CONFIG_VGA_CONSOLE
> -extern bool vgacon_text_force(void);
> -#else
> -static inline bool vgacon_text_force(void) { return false; }
> -#endif
> -
> extern void console_init(void);
>
> /* For deferred console takeover */
--
Jani Nikula, Intel Open Source Graphics Center
_nomodeset(void)
>
> /*
>* Enable KMS by default, unless explicitly overriden by
> - * either the i915.modeset prarameter or by the
> - * vga_text_mode_force boot option.
> + * either the i915.modeset parameter or by the
> + * nomodeset boot opti
e DRM core module initializes all global DRM objects and makes them
> diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
> index 0cd95953cdf5..48f2b6eec012 100644
> --- a/include/drm/drm_drv.h
> +++ b/include/drm/drm_drv.h
> @@ -598,5 +598,6 @@ static inline bool drm_drv_uses
On Wed, 03 Nov 2021, Thomas Zimmermann wrote:
> Hi
>
> Am 03.11.21 um 14:41 schrieb Jani Nikula:
>> On Wed, 03 Nov 2021, Javier Martinez Canillas wrote:
>>> DRM drivers can use this to determine whether they can be enabled or not.
>>>
>>> For now it
04,8 +104,9 @@ static int virtio_gpu_probe(struct virtio_device *vdev)
> struct drm_device *dev;
> int ret;
>
> - if (vgacon_text_force() && virtio_gpu_modeset == -1)
> - return -EINVAL;
> + ret = drm_drv_enabled(&driver);
> + if (r
erties(struct drm_plane
> *plane,
> enum drm_color_encoding default_encoding,
> enum drm_color_range default_range);
>
> -/**
> - * enum drm_color_lut_tests - hw-specific LUT tests to perform
> - *
> - * The drm_color_lut_check() function takes a bitmask of the values here to
> - * determine which tests to apply to a userspace-provided LUT.
> - */
> -enum drm_color_lut_tests {
> - /**
> - * @DRM_COLOR_LUT_EQUAL_CHANNELS:
> - *
> - * Checks whether the entries of a LUT all have equal values for the
> - * red, green, and blue channels. Intended for hardware that only
> - * accepts a single value per LUT entry and assumes that value applies
> - * to all three color components.
> - */
> - DRM_COLOR_LUT_EQUAL_CHANNELS = BIT(0),
> -
> - /**
> - * @DRM_COLOR_LUT_NON_DECREASING:
> - *
> - * Checks whether the entries of a LUT are always flat or increasing
> - * (never decreasing).
> - */
> - DRM_COLOR_LUT_NON_DECREASING = BIT(1),
> -};
> -
> -int drm_color_lut_check(const struct drm_property_blob *lut, u32 tests);
> #endif
--
Jani Nikula, Intel Open Source Graphics Center
amp;& i915_modparams.modeset == -1)
>> +ret = drm_drv_enabled(&driver);
>
> You pass the local driver variable here - which looks wrong as this is
> not the same as the driver variable declared in another file.
Indeed.
> Maybe move the check to new function you can add to init_funcs,
> and locate the new function in i915_drv - so it has access to driver?
We don't really want that, though. This check is pretty much as early as
it can be, and there's a ton of useless initialization that would happen
if we waited until drm_driver is available.
>From my POV, drm_drv_enabled() is a solution that creates a worse
problem for us than it solves.
BR,
Jani.
>
>
> Sam
--
Jani Nikula, Intel Open Source Graphics Center
name will clash.
>
> Just add a
> const drm_driver * i915_drm_driver(void)
> {
> return &driver;
> }
>
> And then use this function to access the drm_driver variable.
Agreed on the general principle of exposing interfaces over data.
But... why? I'm still at a loss what problem this solves. We pass
&driver to exactly one place, devm_drm_dev_alloc(), and it's neatly
hidden away.
BR,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
bled\n", driver->name);
> + return -ENODEV;
> + }
> +
> + return 0;
> +}
> +EXPORT_SYMBOL(drm_drv_enabled);
The name implies a bool return, but it's not.
if (drm_drv_enabled(...)) {
/* surprise, it's disabled! */
}
BR,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
ode_force;
>> static bool vga_hardscroll_enabled;
>> static bool vga_hardscroll_user_enable = true;
>>
>> -bool vgacon_text_force(void)
>> -{
>> -return vgacon_text_mode_force;
>> -}
>> -EXPORT_SYMBOL(vgacon_text_force);
>> -
>> -static int __init text_mode(char *str)
>> -{
>> -vgacon_text_mode_force = true;
>> -
>> -pr_warn("You have booted with nomodeset. This means your GPU drivers
>> are DISABLED\n");
>> -pr_warn("Any video related functionality will be severely degraded, and
>> you may not even be able to suspend the system properly\n");
>> -pr_warn("Unless you actually understand what nomodeset does, you should
>> reboot without enabling it\n");
>> -
>> -return 1;
>> -}
>> -
>> -/* force text mode - used by kernel modesetting */
>> -__setup("nomodeset", text_mode);
>> -
>> static int __init no_scroll(char *str)
>> {
>> /*
>> diff --git a/include/drm/drm_mode_config.h b/include/drm/drm_mode_config.h
>> index 48b7de80daf5..18982d3507e4 100644
>> --- a/include/drm/drm_mode_config.h
>> +++ b/include/drm/drm_mode_config.h
>> @@ -969,4 +969,10 @@ static inline int drm_mode_config_init(struct
>> drm_device *dev)
>> void drm_mode_config_reset(struct drm_device *dev);
>> void drm_mode_config_cleanup(struct drm_device *dev);
>>
>> +#ifdef CONFIG_VGA_CONSOLE
>> +extern int drm_check_modeset(void);
>> +#else
>> +static inline int drm_check_modeset(void) { return 0; }
>> +#endif
>> +
>> #endif
>> diff --git a/include/linux/console.h b/include/linux/console.h
>> index 20874db50bc8..d4dd8384898b 100644
>> --- a/include/linux/console.h
>> +++ b/include/linux/console.h
>> @@ -217,12 +217,6 @@ extern atomic_t ignore_console_lock_warning;
>> #define VESA_HSYNC_SUSPEND 2
>> #define VESA_POWERDOWN 3
>>
>> -#ifdef CONFIG_VGA_CONSOLE
>> -extern bool vgacon_text_force(void);
>> -#else
>> -static inline bool vgacon_text_force(void) { return false; }
>> -#endif
>> -
>> extern void console_init(void);
>>
>> /* For deferred console takeover */
>>
--
Jani Nikula, Intel Open Source Graphics Center
On Fri, 05 Nov 2021, Javier Martinez Canillas wrote:
> Hello Thomas,
>
> On 11/5/21 09:43, Thomas Zimmermann wrote:
>> Hi
>>
>> Am 04.11.21 um 21:09 schrieb Javier Martinez Canillas:
>>> Hello Jani,
>>>
>>> On 11/4/21 20:57, Jani Nikula wro
-misc
>> tree over the weeked :-(
>>
>> I have reapplied the above fix.
>
> So the above drm-misc commit is now in the drm tree, but its fix up
> commit vanished from the drm-misc tree over the past weekend :-(
Cc: drm-misc maintainers.
We normally point drm-misc/for-linux-next at drm-misc-next, *except* to
drm-misc-next-fixes during the merge window. This is because
drm-misc-next already starts accumulating stuff that's headed to one
release later, e.g. currently v5.17. I think that's part of the reason.
I probably should have pushed c4f08d7246a5 ("drm/locking: fix
__stack_depot_* name conflict") to drm-misc-next-fixes.
There's still something funny going on, because the drm-misc-next pull
request [1] isn't part of the drm pull request for v5.16 [2]. Is there
going to be another drm pull?
BR,
Jani.
[1] https://lore.kernel.org/r/20211014120452.2wicnt6hobu3kbwb@gilmour
[2]
https://lore.kernel.org/r/CAPM=9tyOyz4_-OdjDduFkponSXycO6maBDFsWGTLv+j=_vp...@mail.gmail.com
--
Jani Nikula, Intel Open Source Graphics Center
ables and
>>> function names don't reflect what they actually do and also are not in the
>>> same subsystem as the drivers that make use of them.
>>>
>>> This patch-set attempts to cleanup the code by moving the nomodseset param
>>> to the DRM sub
ables instead of code.
BR,
Jani.
>
> Cc: Joonas Lahtinen
> Cc: Jani Nikula
> Cc: Rodrigo Vivi
> Cc: Zhenyu Wang
> Cc: Zhi Wang
> Cc: Christoph Hellwig
> Cc: Jason Gunthorpe
> Signed-off-by: Zhi Wang
> ---
> drivers/gpu/drm/i915/gvt/handlers.c | 153
On Sat, 06 Nov 2021, Stephen Rothwell wrote:
> Hi Jani,
>
> On Fri, 05 Nov 2021 13:03:43 +0200 Jani Nikula wrote:
>>
>> I probably should have pushed c4f08d7246a5 ("drm/locking: fix
>> __stack_depot_* name conflict") to drm-misc-next-fixes.
>
> Please d
On Tue, 09 Nov 2021, "Wang, Zhi A" wrote:
> On 11/9/2021 9:00 AM, Jani Nikula wrote:
>> On Mon, 08 Nov 2021, Zhi Wang wrote:
>>> From: Zhi Wang
>>>
>>> To support the new mdev interfaces and the re-factor patches from
>>> Christoph, which
On Tue, 09 Nov 2021, Daniel Vetter wrote:
> On Tue, Nov 09, 2021 at 09:40:08AM +0200, Jani Nikula wrote:
>> On Sat, 06 Nov 2021, Stephen Rothwell wrote:
>> > Hi Jani,
>> >
>> > On Fri, 05 Nov 2021 13:03:43 +0200 Jani Nikula
>> > wrote:
>>
EN REG_BIT(12)
> +#define PER_PIXEL_ALPHA_BYPASS_EN REG_BIT(7)
>
> #define FF_MODE2 _MMIO(0x6604)
> #define FF_MODE2_GS_TIMER_MASK REG_GENMASK(31, 24)
--
Jani Nikula, Intel Open Source Graphics Center
>> >> - "drm" is the namespace
>> >> - "is" implies it is a read-only boolean inspection
>> >> - "modeset" is the feature being checked
>> >> - "driver" implies it is supposed gate driver loading or
>> >>initialization, rather than modesets after drivers have loaded
>> >> - "allowed" says it is asking about general policy rather than what a
>> >>driver does
>> >>
>> >
>> > I believe that name is more verbose than needed. But don't have a
>> > strong opinion and could use it if others agree.
>> >
>> >> Just a bikeshed, I'll leave it to actual kernel devs to say if this
>> >> would be more appropriate or worth it.
>> >>
>> >
>> > I think is worth it and better to do it now before the patches land, but
>> > we could wait for others to chime in.
>> >
>> > Best regards,
>> > --
>> > Javier Martinez Canillas
>> > Linux Engineering
>> > Red Hat
>> >
>>
>
--
Jani Nikula, Intel Open Source Graphics Center
ez Canillas
> Acked-by: Thomas Zimmermann
> Acked-by: Jani Nikula
> Acked-by: Pekka Paalanen
> ---
>
> (no changes since v1)
>
> drivers/gpu/drm/Kconfig | 6 ++
> drivers/gpu/drm/Makefile | 2 +-
> include/drm/drm_drv.h| 4
> 3 files changed, 7 ins
t; {
> - u32 states[] = {
> + static const u32 states[] = {
> DC_STATE_EN_UPTO_DC6,
> DC_STATE_EN_UPTO_DC5,
> DC_STATE_EN_DC3CO,
--
Jani Nikula, Intel Open Source Graphics Center
or \"%s\"\n", connector_name);
> + "for [CONNECTOR:%d:%s]\n",
> + connector->base.id, connector_name);
> return ERR_CAST(pdev);
> }
>
> @@ -243,8 +244,8 @@ static void *edid_load(struct drm_connector *connector,
> const char *name,
>
> edid[EDID_LENGTH-1] += edid[0x7e] - valid_extensions;
> DRM_INFO("Found %d valid extensions instead of %d in EDID data "
> - "\"%s\" for connector \"%s\"\n", valid_extensions,
> - edid[0x7e], name, connector_name);
> + "\"%s\" for [CONNECTOR:%d:%s]\n", valid_extensions,
> + edid[0x7e], name, connector->base.id, connector_name);
> edid[0x7e] = valid_extensions;
>
> new_edid = krealloc(edid, (valid_extensions + 1) * EDID_LENGTH,
> @@ -254,9 +255,9 @@ static void *edid_load(struct drm_connector *connector,
> const char *name,
> }
>
> DRM_INFO("Got %s EDID base block and %d extension%s from "
> - "\"%s\" for connector \"%s\"\n", (builtin >= 0) ? "built-in" :
> + "\"%s\" for [CONNECTOR:%d:%s]\n", (builtin >= 0) ? "built-in" :
> "external", valid_extensions, valid_extensions == 1 ? "" : "s",
> - name, connector_name);
> + name, connector->base.id, connector_name);
>
> out:
> release_firmware(fw);
> diff --git a/drivers/gpu/drm/drm_mode_config.c
> b/drivers/gpu/drm/drm_mode_config.c
> index 37b4b9f0e468..e46dcd31faa3 100644
> --- a/drivers/gpu/drm/drm_mode_config.c
> +++ b/drivers/gpu/drm/drm_mode_config.c
> @@ -504,7 +504,8 @@ void drm_mode_config_cleanup(struct drm_device *dev)
> if (WARN_ON(!list_empty(&dev->mode_config.connector_list))) {
> drm_connector_list_iter_begin(dev, &conn_iter);
> drm_for_each_connector_iter(connector, &conn_iter)
> - DRM_ERROR("connector %s leaked!\n", connector->name);
> + DRM_ERROR("[CONNECTOR:%d:%s] leaked!\n",
> + connector->base.id, connector->name);
> drm_connector_list_iter_end(&conn_iter);
> }
--
Jani Nikula, Intel Open Source Graphics Center
atch.
> For example, if your changes include both bug fixes and performance
> enhancements..."
>
>
> I will study and send a new separate patch with your suggestion.
I feel these logging changes are the types of changes where I'd err on
the side of fewer patches than strictly following the above guidelines.
BR,
Jani.
>
> Best regards,
> Claudio Suarez
>
>
>
--
Jani Nikula, Intel Open Source Graphics Center
On Mon, 15 Nov 2021, Simon Ser wrote:
> On Monday, November 15th, 2021 at 11:22, Jani Nikula
> wrote:
>
>> - Adding drm_dbg_connector() which would take drm_connector as context,
>> and do drm_dbg_kms() with the above prefix.
>
> This wouldn't work great in cas
if (ret != sizeof(tcon_cap))
> return false;
> @@ -204,6 +213,8 @@ intel_dp_aux_hdr_enable_backlight(const struct
> intel_crtc_state *crtc_state,
> int ret;
> u8 old_ctrl, ctrl;
>
> + wait_for_oui(i915, intel_dp);
> +
> ret = drm_dp_dpcd_readb(&intel_dp->aux,
> INTEL_EDP_HDR_GETSET_CTRL_PARAMS, &old_ctrl);
> if (ret != 1) {
> drm_err(&i915->drm, "Failed to read current backlight control
> mode: %d\n", ret);
--
Jani Nikula, Intel Open Source Graphics Center
f this.
BR,
Jani.
>
>> [1]
>> https://lore.kernel.org/lkml/20211005212634.3223113-1-lucas.demar...@intel.com/T/#u
--
Jani Nikula, Intel Open Source Graphics Center
tosuspend(kdev);
> }
>
> + /* Enable by default */
> + pm_runtime_allow(kdev);
> +
> /*
>* The core calls the driver load handler with an RPM reference held.
> * We drop that here and will reacquire it during unloading in
--
Jani Nikula, Intel Open Source Graphics Center
Took Andy's patch [1] and expanded on it a bit.
BR,
Jani.
[1]
https://patchwork.freedesktop.org/patch/msgid/2020102857.59604-1-andriy.shevche...@linux.intel.com
Cc: Andy Shevchenko
Andy Shevchenko (1):
agp/intel-gtt: Replace kernel.h with the necessary inclusions
Jani Niku
Only intel_gt.c and intel_ggtt.c need the interface.
Cc: Andy Shevchenko
Signed-off-by: Jani Nikula
---
drivers/gpu/drm/i915/gt/intel_ggtt.c | 1 +
drivers/gpu/drm/i915/gt/intel_gt.c | 2 ++
drivers/gpu/drm/i915/i915_drv.h | 1 -
3 files changed, 3 insertions(+), 1 deletion(-)
diff
From: Andy Shevchenko
When kernel.h is used in the headers it adds a lot into dependency hell,
especially when there are circular dependencies are involved.
Replace kernel.h inclusion with the list of what is really being used.
Signed-off-by: Andy Shevchenko
Signed-off-by: Jani Nikula
Don't include stuff on behalf of users if they're not strictly necessary
for the header.
Cc: Andy Shevchenko
Signed-off-by: Jani Nikula
---
drivers/char/agp/intel-gtt.c | 1 +
drivers/gpu/drm/i915/gt/intel_ggtt.c | 1 +
include/drm/intel-gtt.h | 3 +--
3 files
On Mon, 15 Nov 2021, Jani Nikula wrote:
> Took Andy's patch [1] and expanded on it a bit.
>
> BR,
> Jani.
>
>
> [1]
> https://patchwork.freedesktop.org/patch/msgid/2020102857.59604-1-andriy.shevche...@linux.intel.com
>
> Cc: Andy Shevchenko
>
&g
On Mon, 15 Nov 2021, Daniel Vetter wrote:
> On Mon, Nov 15, 2021 at 01:55:32PM +0200, Jani Nikula wrote:
>> On Mon, 15 Nov 2021, Jani Nikula wrote:
>> > Took Andy's patch [1] and expanded on it a bit.
>> >
>> > BR,
>> > Jani.
>> >
>&g
On Mon, 15 Nov 2021, Jani Nikula wrote:
> On Mon, 15 Nov 2021, Daniel Vetter wrote:
>> On Mon, Nov 15, 2021 at 01:55:32PM +0200, Jani Nikula wrote:
>>> On Mon, 15 Nov 2021, Jani Nikula wrote:
>>> > Took Andy's patch [1] and expanded on it a bit.
>>>
On Mon, 15 Nov 2021, Claudio Suarez wrote:
> On Mon, Nov 15, 2021 at 12:24:26PM +0200, Jani Nikula wrote:
>> On Sun, 14 Nov 2021, Claudio Suarez wrote:
>> > On Sat, Nov 13, 2021 at 09:39:46PM +0100, Sam Ravnborg wrote:
>> >> Hi Claudio,
>> >>
>
;status == connector_status_connected ||
> connector->status == connector_status_unknown))
> - count = drm_add_modes_noedid(connector, 1024, 768);
> + count = drm_add_modes_noedid(connector, 1920, 1080);
> count += drm_helper_prob
te the new naming scheme. Rename DG2's macro now for
> consistency with other platforms.
>
> Cc: Jani Nikula
> Signed-off-by: Matt Roper
Reviewed-by: Jani Nikula
> ---
> drivers/gpu/drm/i915/i915_drv.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
&g
uch
>> > > broken things.
>> >
>> > Yeah maybe even a compile-time check of the format table(s) to validate
>> > them properly and scream ... Or at least a selftest.
>>
>> I really wish C had (even very limited) compile time evaluation
>>
sed at all
Wow, the last user might have been removed by me. In 2012.
commit 6cb1612a7dc4c3d5ed86dba5dd21bb48a5c395af
Author: Jani Nikula
Date: Mon Oct 22 16:12:17 2012 +0300
drm/i915/sdvo: force GPIO bit-banging also on default pin
Reviewed-by: Jani Nikula
>
> Signed-
l of these patches as static
analyzer reports *only*. The "fixes" have often been completely wrong or
have missed the real issue and merely silenced the warning.
I really couldn't say anything about the "Zeal Robot" itself, but the
patches are giving it a bad reputation.
BR,
Jani.
>
> CJ
>
>
>> drm_printf(m, "%s%.*s%c %llx:%lld%s%s %s @ %dms: %s\n",
>> prefix, indent, "",
>> queue_status(rq),
>>
>
--
Jani Nikula, Intel Open Source Graphics Center
widely used intel_backlight_set_pwm_level() function.
>
> Drop the duplicate intel_panel_actually_set_backlight() function.
>
> Signed-off-by: Hans de Goede
Reviewed-by: Jani Nikula
> ---
> drivers/gpu/drm/i915/display/intel_backlight.c | 16 ++--
> 1 file changed, 2 insertions(+), 14 dele
ing the backlight, so this change also aligns
> ext_pwm_disable_backlight() with all the other disable() functions.
>
> Signed-off-by: Hans de Goede
I'll take your word for it.
Acked-by: Jani Nikula
> ---
> drivers/gpu/drm/i915/display/intel_backlight.c | 2 ++
> 1 file ch
let's see if this makes it thru email servers...
> ---
> block/fops.c | 1 +
> drivers/gpu/drm/drm_gem_shmem_helper.c| 1 +
> drivers/gpu/drm/i915/gt/intel_gtt.c | 1 +
> drivers/gpu/drm/i915/i915_request.c | 1 +
For the i915 parts,
Acked-by: Jani Nikula
--
Jani Nikula, Intel Open Source Graphics Center
15/gem/i915_gem_dmabuf.c
> @@ -17,9 +17,7 @@
>
> MODULE_IMPORT_NS(DMA_BUF);
>
> -#if defined(CONFIG_X86)
> -#include
> -#else
> +#if !defined(CONFIG_X86)
> #define wbinvd_on_all_cpus() \
> pr_warn(DRIVER_NAME ": Missing cache flush in %s\n", __func__)
> #endif
--
Jani Nikula, Intel Open Source Graphics Center
On Tue, 23 Nov 2021, Luis Chamberlain wrote:
> There is no need to user boiler plate code to specify a set of base
> directories we're going to stuff sysctls under. Simplify this by using
> register_sysctl() and specifying the directory path directly.
\o/
Acked-by: Jani Nikula
> new file mode 100644
>> index ..bbb8c3fc8eee
>> --- /dev/null
>> +++ b/Documentation/gpu/amdgpu-dc/amdgpu-dc-debug.rst
>> @@ -0,0 +1,4 @@
>> +Display Core Debug tools
>> +
>> +
>> +TODO
>> diff --git a/Documentation/gpu/amdgpu-dc/amdgpu-dc.rst
>> b/Documentation/gpu/amdgpu-dc/amdgpu-dc.rst
>> new file mode 100644
>> index ..3685b3b1ad64
>> --- /dev/null
>> +++ b/Documentation/gpu/amdgpu-dc/amdgpu-dc.rst
>
> While we bikeshed names, I think it'd would make sense to call this
> overview.rst or intro.rst or similar, since it's meant to contain the
> overall toctree for everything amdgpu related (maybe there will be more in
> the future).
index.rst?
--
Jani Nikula, Intel Open Source Graphics Center
> #include
> #include
> +#include
> #include
>
> #include
> @@ -2010,6 +2011,16 @@ intel_edp_init_source_oui(struct intel_dp *intel_dp,
> bool careful)
>
> if (drm_dp_dpcd_write(&intel_dp->aux, DP_SOURCE_OUI, oui, sizeof(oui))
> < 0)
>
TypeC ports following a non-blocking modeset
drm/i915: Fix DPT suspend/resume on !HAS_DISPLAY platforms
Jani Nikula (29):
Merge tag 'topic/drm-dp-training-delay-helpers-2021-10-19' of
git://anongit.freedesktop.org/drm/drm-intel into drm-intel-next
drm/i915/dp
us performing
> this delay on systems where we don't end up using the HDR backlight
> interface.
>
> V3:
> * Move last_oui_write into intel_dp
> V2:
> * Move panel delays into intel_pps
>
> Signed-off-by: Lyude Paul
> Reviewed-by: Jani Nikula
> Fixes: 4a8d79901d5b (
se
> - offset = intel_de_read(dev_priv,
> + intel_de_read(dev_priv,
> DSPLINOFF(i9xx_plane));
> base = intel_de_read(dev_priv, DSPSURF(i9xx_plane)) &
> 0xf000;
> } else {
--
Jani Nikula, Intel Open Source Graphics Center
t; + * Training Score: 0x208 through 0x20b
> + * AR Post Cursor2: 0x20c
> + */
> +#define DP_LINK_STATUS_SIZE 11
> bool drm_dp_channel_eq_ok(const u8 link_status[DP_LINK_STATUS_SIZE],
> int lane_count);
> bool drm_dp_clock_recovery_ok(const u8 link_status[DP_LINK_STATUS_SIZE],
--
Jani Nikula, Intel Open Source Graphics Center
nges to silence static analyzer warnings, with no
further analysis of the issues, and no follow-up on questions.
Until that changes, I think we're better off just regarding them static
as analyzer reports.
BR,
Jani.
>
>> --
>> 2.15.2
>>
--
Jani Nikula, Intel Open Source Graphics Center
);
> intel_gt_init_early(&i915->gt, i915);
> + __intel_gt_init_early(&i915->gt, i915);
> + mock_uncore_init(&i915->uncore, i915);
> atomic_inc(&i915->gt.wakeref.count); /* disable; no hw support */
> i915->gt.awake = -ENODEV;
>
> diff --git a/drivers/gpu/drm/i915/selftests/mock_uncore.c
> b/drivers/gpu/drm/i915/selftests/mock_uncore.c
> index ca57e4008701..b3790ef137e4 100644
> --- a/drivers/gpu/drm/i915/selftests/mock_uncore.c
> +++ b/drivers/gpu/drm/i915/selftests/mock_uncore.c
> @@ -42,7 +42,7 @@ __nop_read(64)
> void mock_uncore_init(struct intel_uncore *uncore,
> struct drm_i915_private *i915)
> {
> - intel_uncore_init_early(uncore, i915);
> + intel_uncore_init_early(uncore, &i915->gt);
>
> ASSIGN_RAW_WRITE_MMIO_VFUNCS(uncore, nop);
> ASSIGN_RAW_READ_MMIO_VFUNCS(uncore, nop);
--
Jani Nikula, Intel Open Source Graphics Center
On Thu, 09 Dec 2021, Kees Cook wrote:
> On Thu, Dec 09, 2021 at 05:20:45PM -0500, Harry Wentland wrote:
>>
>>
>> On 2021-12-09 01:23, Kees Cook wrote:
>> > On Wed, Dec 08, 2021 at 01:19:28PM +0200, Jani Nikula wrote:
>> >> On Fri, 03 Dec 2021, Kees Coo
uc/intel_guc_submission.c
>>> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
>>> @@ -1937,9 +1937,9 @@ static int steal_guc_id(struct intel_guc *guc,
>>> struct intel_context *ce)
>>> list_del_init(&cn->guc_id.link);
>>> ce->guc_id = cn->guc_id;
>>> - spin_lock(&ce->guc_state.lock);
>>> + spin_lock(&cn->guc_state.lock);
>>> clr_context_registered(cn);
>>> - spin_unlock(&ce->guc_state.lock);
>>> + spin_unlock(&cn->guc_state.lock);
>>> set_context_guc_id_invalid(cn);
>>
--
Jani Nikula, Intel Open Source Graphics Center
On Fri, 10 Dec 2021, Kees Cook wrote:
> On Fri, Dec 10, 2021 at 12:06:20PM +0200, Jani Nikula wrote:
>> Post Cursor2 was completely optional for the transmitter even before it
>> was deprecated.
>>
>> And now we'd be adding 5 bytes extra to all link status r
/drivers/gpu/drm/drm_dp_mst_topology.c
> @@ -45,7 +45,7 @@
> #include
> #include
>
> -#include "drm_crtc_helper_internal.h"
> +#include "drm_dp_helper_internal.h"
> #include "drm_dp_mst_topology_internal.h"
>
> /**
> diff --git a/drivers/gpu/drm/drm_kms_helper_common.c
> b/drivers/gpu/drm/drm_kms_helper_common.c
> index 47e92400548d..88260d26409c 100644
> --- a/drivers/gpu/drm/drm_kms_helper_common.c
> +++ b/drivers/gpu/drm/drm_kms_helper_common.c
> @@ -29,6 +29,7 @@
>
> #include
>
> +#include "drm_dp_helper_internal.h"
> #include "drm_crtc_helper_internal.h"
>
> MODULE_AUTHOR("David Airlie, Jesse Barnes");
--
Jani Nikula, Intel Open Source Graphics Center
3f422828221d9ceefcddef0be33561b1646a1cbe
> prerequisite-patch-id: c2b2f08f0eccc9f5df0c0da49fa1d36267deb11d
> prerequisite-patch-id: c67e5d886a47b7d0266d81100837557fda34cb24
> --
> 2.34.1
>
--
Jani Nikula, Intel Open Source Graphics Center
; 643 | bool intel_modeset_probe_defer(struct pci_dev *pdev);
> | ^~~
> cc1: all warnings being treated as errors
>
> Add a declaration of the struct to fix this.
>
> Signed-off-by: Mark Brown
Thanks,
Fixes: 94b541f53db1 ("drm/i915: Add intel_modeset_probe_defer() helper&qu
et_probe_defer() helper
drm/i915: Add privacy-screen support (v3)
Harshit Mogalapalli (1):
drm/i915/display: Fix an unsigned subtraction which can never be negative.
Jani Nikula (24):
drm/i915/display: add intel_crtc_wait_for_next_vblank() and use it
drm/i91
scanline[it__->pipe] = intel_get_crtc_scanline(it__);
> }
>
> trace_intel_pipe(frame, scanline, crtc->pipe);
> }
>
>
> The trace_intel_pipe_enable_enabled() is a static_branch that will act the
> same as the nop of a trace event, so this will still not add overhead when
> not enabled.
>
> All the processing will be done outside the trace event allowing it to be
> preempted, and then when the trace event is executed, it will run quickly
> without taking any locks.
>
> Then have the code call do_trace_intel_pipe() instead of trace_intel_pipe()
> and this should fix the issue with preempt rt.
>
> -- Steve
--
Jani Nikula, Intel Open Source Graphics Center
) {
> kfree(fences);
I have no idea what's going on, but the feeling I get from "code smells"
just in this small snippet is that the seqno++ does not take the error
path here into account.
BR,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
anges during runtime. So, let's simplify things by just caching
> this value in intel_panel.backlight, and re-writing it as-needed.
This isn't a full review, just something I spotted so far. Please see
inline.
BR,
Jani.
>
> Signed-off-by: Lyude Paul
> Cc: Jani Nikula
. Again, not a full review yet, just a
few notes below.
>
> Signed-off-by: Lyude Paul
> Cc: Jani Nikula
> Cc: Dave Airlie
> Cc: greg.depo...@gmail.com
> ---
> drivers/gpu/drm/drm_dp_helper.c | 332 ++
> .../drm/i915/display/inte
+-
drivers/gpu/drm/i915/i915_drv.h| 12 ++--
drivers/gpu/drm/i915/i915_irq.c| 27 ++
drivers/gpu/drm/i915/i915_perf.c | 2 +-
4 files changed, 23 insertions(+), 20 deletions(-)
--
Jani Nikula, Intel Ope
s/gpu/drm/i915/display/intel_hdmi.c | 233 +++
> drivers/gpu/drm/i915/display/intel_hdmi.h | 7 +
> include/drm/drm_connector.h | 49 ++
> include/drm/drm_dp_helper.h | 218 +++
> include/drm/drm_edid.h| 30 +
> 11 files changed, 1652 insertions(+), 19 deletions(-)
--
Jani Nikula, Intel Open Source Graphics Center
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
+++
drivers/gpu/drm/i915/display/intel_hdmi.h | 7 +
include/drm/drm_connector.h| 49 ++
include/drm/drm_dp_helper.h| 218
include/drm/drm_edid.h | 30 ++
11 files changed, 1650 insertions(+), 19
| 2 +-
> drivers/gpu/drm/i915/i915_params.c | 2 +-
> include/drm/drm_dp_helper.h | 21 +-
> 12 files changed, 655 insertions(+), 359 deletions(-)
--
Jani Nikula, Intel Open Source Graphics Center
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
};
>
> -static const struct intel_panel_bl_funcs vlv_funcs = {
> +static const struct intel_panel_bl_funcs vlv_pwm_funcs = {
> .setup = vlv_setup_backlight,
> .enable = vlv_enable_backlight,
> .disable = vlv_disable_backlight,
> @@ -2077,7 +2102,7 @@ static const str
ntel_dp_aux_init_backlight_funcs(struct intel_connector
> *intel_connector)
> +int intel_dp_aux_init_backlight_funcs(struct intel_connector *connector)
> {
> - struct intel_panel *panel = &intel_connector->panel;
> - struct intel_dp *intel_dp = enc_to_intel_dp(inte
break;
> + case INTEL_DP_AUX_BACKLIGHT_ON:
> + if (i915->vbt.backlight.type !=
> INTEL_BACKLIGHT_VESA_EDP_AUX_INTERFACE)
> + try_intel_interface = true;
This could use an explanation - why not try the intel interfac
ertions(+), 29 deletions(-)
--
Jani Nikula, Intel Open Source Graphics Center
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
501 - 600 of 5408 matches
Mail list logo