[PATCH 4/8] drm/i915/dp: move intel_dp_prepare_link_train() call

2022-01-25 Thread Jani Nikula
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

[PATCH 3/8] drm/dp: add some new DPCD macros from DP 2.0 E11

2022-01-25 Thread Jani Nikula
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

[PATCH 0/8] drm/dp, drm/i915: 128b/132b updates

2022-01-25 Thread Jani Nikula
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

[PATCH 7/8] drm/i915/dp: give more time for CDS

2022-01-25 Thread Jani Nikula
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

[PATCH 1/8] drm/dp: add drm_dp_128b132b_read_aux_rd_interval()

2022-01-25 Thread Jani Nikula
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

[PATCH 8/8] drm/i915/mst: update slot information for 128b/132b

2022-01-25 Thread 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

Re: [PATCH v2 02/11] drm/i915: Fix trailing semicolon

2022-01-26 Thread Jani Nikula
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(-) > >

Re: [PATCH v2 08/11] drm/gem: Sort includes alphabetically

2022-01-26 Thread Jani Nikula
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 ++-

Re: [PATCH v2 09/11] drm: Convert open-coded yes/no strings to yesno()

2022-01-26 Thread Jani Nikula
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

Re: [PATCH v1 1/4] fbtft: Unorphan the driver

2022-01-26 Thread Jani Nikula
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

Re: [Intel-gfx] [PATCH 01/20] drm: improve drm_buddy_alloc function

2022-01-26 Thread Jani Nikula
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

Re: [Intel-gfx] [PATCH 1/3] drm: Stop spamming log with drm_cache message

2022-01-26 Thread Jani Nikula
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

Re: mmotm 2022-01-26-21-04 uploaded (gpu/drm/i915/i915_gem_evict.h)

2022-01-27 Thread Jani Nikula
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

Re: [RFC PATCH] component: Add common helpers for compare/release functions

2022-01-31 Thread Jani Nikula
{ >> + 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

Re: [PATCH 01/21] MAINTAINERS: Add entry for fbdev core

2022-02-01 Thread Jani Nikula
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 &

Re: [PATCH 5/8] drm/i915/dp: rewrite DP 2.0 128b/132b link training based on errata

2022-02-02 Thread Jani Nikula
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. >&

Re: [PATCH 5/8] drm/i915/dp: rewrite DP 2.0 128b/132b link training based on errata

2022-02-02 Thread Jani Nikula
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, >> +

Re: [PATCH 5/6] drm/rcar_du: changes to rcar-du driver resulting from drm_writeback_connector structure changes

2022-02-02 Thread Jani Nikula
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

[PULL] drm-intel-fixes

2021-10-28 Thread Jani Nikula
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

Re: [Intel-gfx] [PULL] drm-intel-fixes

2021-10-28 Thread Jani Nikula
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

Re: [PULL] topic/amdgpu-dp2.0-mst

2021-10-29 Thread Jani Nikula
/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

Re: [PULL] topic/amdgpu-dp2.0-mst

2021-10-29 Thread Jani Nikula
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 &

Re: [PATCH] drm: Grab reference of connector before return connector from sun4i_tcon_get_connector

2021-11-01 Thread Jani Nikula
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); >

Re: [PATCH v2] drm/dp: Fix aux->transfer NULL pointer dereference on drm_dp_dpcd_access

2021-11-01 Thread Jani Nikula
*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

Re: [PATCH] drm: Grab reference of connector before return connector from sun4i_tcon_get_connector

2021-11-02 Thread Jani Nikula
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 >>

RE: [PATCH v2] drm/dp: Fix aux->transfer NULL pointer dereference on drm_dp_dpcd_access

2021-11-02 Thread Jani Nikula
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

Re: [PATCH 02/29] drm/i915/gvt: integrate into the main Makefile

2021-11-02 Thread Jani Nikula
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 > --- >

RE: [PATCH v2] drm/dp: Fix aux->transfer NULL pointer dereference on drm_dp_dpcd_access

2021-11-03 Thread 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

Re: [RESEND PATCH 2/5] drm: Move nomodeset kernel parameter handler to the DRM subsystem

2021-11-03 Thread Jani Nikula
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

Re: [RESEND PATCH 1/5] drm/i915: Fix comment about modeset parameters

2021-11-03 Thread Jani Nikula
_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

Re: [RESEND PATCH 4/5] drm: Add a drm_drv_enabled() helper function

2021-11-03 Thread Jani Nikula
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

Re: [RESEND PATCH 4/5] drm: Add a drm_drv_enabled() helper function

2021-11-04 Thread Jani Nikula
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&#x

Re: [PATCH v2 1/2] drm: Add a drm_drv_enabled() to check if drivers should be enabled

2021-11-04 Thread Jani Nikula
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

Re: [PATCH v4 1/3] drm: Move drm_color_lut_check implementation internal to intel_color

2021-11-04 Thread Jani Nikula
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

Re: [PATCH v2 1/2] drm: Add a drm_drv_enabled() to check if drivers should be enabled

2021-11-04 Thread Jani Nikula
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

Re: [PATCH v2 1/2] drm: Add a drm_drv_enabled() to check if drivers should be enabled

2021-11-04 Thread Jani Nikula
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

Re: [PATCH v2 1/2] drm: Add a drm_drv_enabled() to check if drivers should be enabled

2021-11-04 Thread Jani Nikula
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

Re: [PATCH v2 2/2] drm: Move nomodeset kernel parameter to the DRM subsystem

2021-11-05 Thread Jani Nikula
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

Re: [PATCH v2 1/2] drm: Add a drm_drv_enabled() to check if drivers should be enabled

2021-11-05 Thread Jani Nikula
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

Re: linux-next: build failure after merge of the drm-misc tree

2021-11-05 Thread Jani Nikula
-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

Re: [PATCH v3 0/6] Cleanups for the nomodeset kernel command line parameter logic

2021-11-08 Thread Jani Nikula
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

Re: [PATCH 1/3] i915/gvt: seperate tracked MMIO table from handlers.c

2021-11-08 Thread Jani Nikula
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

Re: linux-next: build failure after merge of the drm-misc tree

2021-11-08 Thread Jani Nikula
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

Re: [PATCH 1/3] i915/gvt: seperate tracked MMIO table from handlers.c

2021-11-09 Thread Jani Nikula
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

Re: linux-next: build failure after merge of the drm-misc tree

2021-11-09 Thread Jani Nikula
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: >>

Re: [Intel-gfx] [PATCH 1/4] drm/i915/dg2: Add Wa_14010547955

2021-11-12 Thread Jani Nikula
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

Re: [PATCH v4 0/6] Cleanups for the nomodeset kernel command line parameter logic

2021-11-12 Thread Jani Nikula
>> >> - "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

Re: [PATCH v5 4/6] drm: Decouple nomodeset from CONFIG_VGA_CONSOLE

2021-11-12 Thread Jani Nikula
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

Re: [PATCH][next] drm/i915: make array states static const

2021-11-12 Thread Jani Nikula
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

Re: [PATCH] drm: change logs to print connectors in the form CONNECTOR:id:name

2021-11-15 Thread Jani Nikula
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

Re: [PATCH] drm: change logs to print connectors in the form CONNECTOR:id:name

2021-11-15 Thread Jani Nikula
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

Re: [PATCH] drm: change logs to print connectors in the form CONNECTOR:id:name

2021-11-15 Thread Jani Nikula
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

Re: [PATCH] drm/i915/dp: Perform 30ms delay after source OUI write

2021-11-15 Thread Jani Nikula
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

Re: [PATCH v1 1/3] string: Consolidate yesno() helpers under string.h hood

2021-11-15 Thread Jani Nikula
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

Re: [Intel-gfx] [PATCH v2 1/1] drm/i915/rpm: Enable runtime pm autosuspend by default

2021-11-15 Thread Jani Nikula
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

[PATCH 0/3] drm/i915, agp/intel-ggt: clean up includes

2021-11-15 Thread Jani Nikula
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

[PATCH 1/3] drm/i915: include intel-gtt.h only where needed

2021-11-15 Thread Jani Nikula
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

[PATCH 2/3] agp/intel-gtt: Replace kernel.h with the necessary inclusions

2021-11-15 Thread Jani Nikula
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

[PATCH 3/3] agp/intel-gtt: reduce intel-gtt dependencies more

2021-11-15 Thread 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

Re: [PATCH 0/3] drm/i915, agp/intel-ggt: clean up includes

2021-11-15 Thread Jani Nikula
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

Re: [Intel-gfx] [PATCH 0/3] drm/i915, agp/intel-ggt: clean up includes

2021-11-15 Thread Jani Nikula
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

Re: [Intel-gfx] [PATCH 0/3] drm/i915, agp/intel-ggt: clean up includes

2021-11-15 Thread Jani Nikula
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. >>>

Re: [PATCH] drm: change logs to print connectors in the form CONNECTOR:id:name

2021-11-15 Thread Jani Nikula
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, >> >> >

Re: [PATCH] drm: drm_probe_helper: add modes upto 1920x1080

2021-11-16 Thread Jani Nikula
;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

Re: [PATCH v3 1/5] drm/i915/dg2: s/DISP_STEPPING/DISPLAY_STEPPING/

2021-11-16 Thread Jani Nikula
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

Re: [PATCH] drm: check drm_format_info hsub and vsub to avoid divide by zero

2021-11-19 Thread Jani Nikula
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 >>

Re: [PATCH] drm/i915: Remove unused intel_gmbus_set_speed() function

2021-11-22 Thread Jani Nikula
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-

Re: [PATCH linux-next] drm/i915/request: Remove unused variables

2021-11-22 Thread Jani Nikula
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

Re: [PATCH 1/2] drm/i915/backlight: Drop duplicate intel_panel_actually_set_backlight()

2021-11-22 Thread Jani Nikula
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

Re: [PATCH 2/2] drm/i915/backlight: Make ext_pwm_disable_backlight() call intel_backlight_set_pwm_level()

2021-11-22 Thread Jani Nikula
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

Re: [PATCH bpf] treewide: add missing includes masked by cgroup -> bpf dependency

2021-11-22 Thread Jani Nikula
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

Re: [PATCH] drm/i915/dmabuf: remove duplicate include in i915_gem_dmabuf.c

2021-11-24 Thread Jani Nikula
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

Re: [PATCH v2 2/8] i915: simplify subdirectory registration with register_sysctl()

2021-11-25 Thread Jani Nikula
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

Re: [PATCH 1/6] Documentation/gpu: Reorganize DC documentation

2021-11-29 Thread 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

Re: [PATCH v2] drm/i915/dp: Perform 30ms delay after source OUI write

2021-11-30 Thread Jani Nikula
> #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) >

[PULL] drm-intel-next

2021-11-30 Thread Jani Nikula
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

Re: [PATCH v3] drm/i915/dp: Perform 30ms delay after source OUI write

2021-12-01 Thread Jani Nikula
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 (

Re: [PATCH linux-next] drm/i915/display: Remove the useless variable offset and its assignment

2021-12-08 Thread Jani Nikula
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

Re: [PATCH] drm/dp: Actually read Adjust Request Post Cursor2 register

2021-12-08 Thread Jani Nikula
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

Re: [PATCH linux-next] drm/i915/display: Delete redundant post_mask assignment

2021-12-08 Thread Jani Nikula
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

Re: [Intel-gfx] [PATCH v6 01/11] drm/i915: Store backpointer to GT in uncore

2021-12-09 Thread Jani Nikula
); > 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

Re: [PATCH] drm/dp: Actually read Adjust Request Post Cursor2 register

2021-12-10 Thread Jani Nikula
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

Re: [Intel-gfx] [PATCH] drm/i915/guc: Use correct context lock when callig clr_context_registered

2021-12-10 Thread Jani Nikula
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

Re: [PATCH] drm/dp: Actually read Adjust Request Post Cursor2 register

2021-12-13 Thread Jani Nikula
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

Re: [Intel-gfx] [PATCH 2/3] drm/dp: Move DP declarations into separate header file

2021-12-13 Thread Jani Nikula
/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

Re: [PATCH 0/3] drm/dp: Move DisplayPort helpers into own module

2021-12-13 Thread Jani Nikula
3f422828221d9ceefcddef0be33561b1646a1cbe > prerequisite-patch-id: c2b2f08f0eccc9f5df0c0da49fa1d36267deb11d > prerequisite-patch-id: c67e5d886a47b7d0266d81100837557fda34cb24 > -- > 2.34.1 > -- Jani Nikula, Intel Open Source Graphics Center

Re: [PATCH] drm/i915: Fix implicit use of struct pci_dev

2021-12-13 Thread Jani Nikula
; 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

[PULL] drm-intel-next

2021-12-14 Thread Jani Nikula
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

Re: [PATCH 7/8] drm/i915: Disable tracing points on PREEMPT_RT

2021-12-14 Thread Jani Nikula
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

Re: [Intel-gfx] [PATCH] drm/i915: Increment composite fence seqno

2021-12-14 Thread Jani Nikula
) { > 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

Re: [RFC 3/5] drm/i915/dp: Remove redundant AUX backlight frequency calculations

2020-12-11 Thread Jani Nikula
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

Re: [RFC 4/5] drm/dp: Extract i915's eDP backlight code into DRM helpers

2020-12-11 Thread 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

[PULL] drm-intel-next-fixes

2020-12-18 Thread Jani Nikula
+- 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

Re: [PATCH v7 00/15] Add support for DP-HDMI2.1 PCON

2020-12-22 Thread Jani Nikula
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

[PULL] topic/dp-hdmi-2.1-pcon for drm-misc-next

2020-12-23 Thread Jani Nikula
+++ 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

Re: [PATCH v3 0/9] drm/i915: Add support for Intel's eDP backlight controls

2020-12-23 Thread Jani Nikula
| 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

Re: [PATCH v3 4/9] drm/i915: Keep track of pwm-related backlight hooks separately

2020-12-23 Thread Jani Nikula
}; > > -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

Re: [PATCH v3 7/9] drm/i915/dp: Enable Intel's HDR backlight interface (only SDR for now)

2020-12-23 Thread Jani Nikula
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

Re: [PATCH v3 8/9] drm/i915/dp: Allow forcing specific interfaces through enable_dpcd_backlight

2020-12-23 Thread Jani Nikula
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

[PULL] drm-intel-fixes

2021-01-06 Thread Jani Nikula
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

<    1   2   3   4   5   6   7   8   9   10   >