Re: [PATCH] drm/i915/display: Remove kstrdup_const() and kfree_const() usage

2024-10-04 Thread Jani Nikula
ee(name); > name = kasprintf(GFP_KERNEL, "card%d-%s-backlight", >i915->drm.primary->index, > connector->base.name); > if (!name) > @@ -987,7 +987,7 @@ int intel_backlight_device_register(struct > intel_connector *connector) > connector->base.base.id, connector->base.name, name); > > out: > - kfree_const(name); > + kfree(name); > > return ret; > } -- Jani Nikula, Intel

Re: [RESEND PATCH] drm/i915:Remove unused parameter in marco

2024-10-02 Thread Jani Nikula
On Wed, 25 Sep 2024, He Lugang wrote: > The parameter dev_priv is actually not used in macro PORT_ALPM_CTL > and PORT_ALPM_LFPS_CTL,so remove it to simplify the code. > > Reviewed-by: Jani Nikula > Signed-off-by: He Lugang > --- > drivers/gpu/drm/i915/display

Re: [PATCH v2 1/2] drm/ttm: Change ttm_device_init to use a struct instead of multiple bools

2024-10-02 Thread Jani Nikula
another bool flag parameter to the > function. Funny, the other day Ville and I were throwing ideas around, and we talked about something like this to implement keyword arguments in C. :) Cheers, Jani. -- Jani Nikula, Intel

Re: [PATCH 0/2] drm: revert some framebuffer API tests

2024-10-02 Thread Jani Nikula
sts that do indeed pass, and > fail / warn on those that don't. That still doesn't address code being tested emitting *unexpected* warnings. BR, Jani. -- Jani Nikula, Intel

Re: [PATCH 07/28] drm/i915: Use video aperture helpers

2024-10-02 Thread Jani Nikula
On Mon, 30 Sep 2024, Thomas Zimmermann wrote: > DRM's aperture functions have long been implemented as helpers > under drivers/video/ for use with fbdev. Avoid the DRM wrappers by > calling the video functions directly. > > Signed-off-by: Thomas Zimmermann > Cc: Ja

Re: [PATCH] drm/i915/backlight: Remove a useless kstrdup_const()

2024-10-02 Thread Jani Nikula
On Tue, 01 Oct 2024, Christophe JAILLET wrote: > Le 30/09/2024 à 09:48, Jani Nikula a écrit : >> On Sat, 28 Sep 2024, Christophe JAILLET >> wrote: >>> "name" is allocated and freed in intel_backlight_device_register(). >>> The initial allocation just

Re: [PATCH v3] drm/display: Fix building with GCC 15

2024-10-02 Thread Jani Nikula
ith Ville, the fix was to increase the size of > dp_dual_mode_hdmi_id array by one, so that it can accommodate the NULL > line character. This should let us build the kernel with GCC 15. Still s/NULL line/NUL/ but this can be fixed while applying, no need to resend. Reviewed-by: Jani Nikula > &

Re: [PATCH v8 0/5] Support fdinfo runtime and memory stats on Panthor

2024-10-02 Thread Jani Nikula
/drm/panthor/panthor_gem.c | 12 + >> drivers/gpu/drm/panthor/panthor_sched.c | 384 +++--- >> drivers/gpu/drm/panthor/panthor_sched.h | 2 + >> 8 files changed, 531 insertions(+), 50 deletions(-) >> create mode 100644 Documentation/ABI/testing/sysfs-driver-panthor-profiling >> create mode 100644 Documentation/gpu/panthor.rst >> > -- Jani Nikula, Intel

Re: [PATCH 1/1] drm/display: Fix building with GCC 15

2024-10-02 Thread Jani Nikula
_HDMI_ID_LEN + 1] = > "DP-HDMI ADAPTOR\x04"; > > return memcmp(hdmi_id, dp_dual_mode_hdmi_id, > - sizeof(dp_dual_mode_hdmi_id)) == 0; > + DP_DUAL_MODE_HDMI_ID_LEN) == 0; > } > > static bool is_type1_adaptor(uint8_t adaptor_id) -- Jani Nikula, Intel

Re: [WIP RFC v2 01/35] WIP: rust/drm: Add fourcc bindings

2024-10-01 Thread Jani Nikula
ngs get regenerated? Should there be more granularity? BR, Jani. -- Jani Nikula, Intel

Re: [PATCH] drm/i915/backlight: Remove a useless kstrdup_const()

2024-09-30 Thread Jani Nikula
_device_register(name, connector->base.kdev, connector, > &intel_backlight_device_ops, &props); > @@ -987,7 +984,7 @@ int intel_backlight_device_register(struct > intel_connector *connector) > connector->base.base.id, connector->base.name, name); > > out: > - kfree_const(name); > + kfree(new_name); > > return ret; > } -- Jani Nikula, Intel

Re: [PATCH v3] drm: Print bad EDID notices less often

2024-09-27 Thread Jani Nikula
On Fri, 27 Sep 2024, Andi Kleen wrote: > On Fri, Sep 27, 2024 at 12:30:04PM +0300, Jani Nikula wrote: >> On Thu, 26 Sep 2024, Andi Kleen wrote: >> > I have an old monitor that reports a zero EDID block, which results in a >> > warning message. This happens on every s

Re: [PATCH 2/5] drm/mgag200: vga-bmc: Transparently handle BMC

2024-09-27 Thread Jani Nikula
orce); > + > + if (status != old_status) > + ++connector->epoch_counter; > + return connector_status_connected; > +} > + > static const struct drm_connector_helper_funcs > mgag200_vga_connector_helper_funcs = { > - .get_modes = drm_connector_helper_get_modes, > - .detect_ctx = drm_connector_helper_detect_from_ddc > + .get_modes = mgag200_vga_bmc_connector_helper_get_modes, > + .detect_ctx = mgag200_vga_bmc_connector_helper_detect_ctx, > }; > > static const struct drm_connector_funcs mgag200_vga_connector_funcs = { -- Jani Nikula, Intel

Re: [PATCH] gpu: drm: i915: display: Avoid null values intel_plane_atomic_check_with_state

2024-09-27 Thread Jani Nikula
On Fri, 27 Sep 2024, Ville Syrjälä wrote: > On Fri, Sep 27, 2024 at 11:20:32AM +0300, Jani Nikula wrote: >> On Fri, 27 Sep 2024, Alessandro Zanni wrote: >> > This fix solves multiple Smatch errors: >> > >> > drivers/gpu/drm/i

Re: [PATCH v3] drm: Print bad EDID notices less often

2024-09-27 Thread Jani Nikula
o_get_edid(struct > drm_connector *connector, > > status = edid_block_read(block, i, read_block, context); > > - edid_block_status_print(status, block, i); > + edid_block_status_print_rl(connector, status, block, i); > > if (!edid_block_status_valid(status, edid_block_tag(block))) { > if (status == EDID_BLOCK_READ_FAIL) -- Jani Nikula, Intel

Re: [PATCH v4 0/6] DRM_SET_CLIENT_NAME ioctl

2024-09-27 Thread Jani Nikula
ditional comments on this I'm going to pick it > up and merge it through drm-misc-next by the end of today. AFAICT the userspace is not reviewed and ready for merging [1]. BR, Jani. [1] https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/1428 -- Jani Nikula, Intel

Re: [PATCH] gpu: drm: i915: display: Avoid null values intel_plane_atomic_check_with_state

2024-09-27 Thread Jani Nikula
api.visible) > new_crtc_state->update_planes |= BIT(plane->id); > > - if (new_plane_state->uapi.visible && > + if (new_plane_state->uapi.visible && fb && > intel_format_info_is_yuv_semiplanar(fb->format, fb->modifier)) { > new_crtc_state->data_rate_y[plane->id] = > intel_plane_data_rate(new_crtc_state, new_plane_state, > 0); -- Jani Nikula, Intel

Re: [PATCH v2] drm: Print bad EDID notices less often

2024-09-26 Thread Jani Nikula
m_edid *drm_edid_read_base_block(struct > i2c_adapter *adapter) > > status = edid_block_read(base_block, 0, drm_do_probe_ddc_edid, adapter); > > - edid_block_status_print(status, base_block, 0); > + edid_block_status_print(NULL, status, base_block, 0); > > if (!edid_block_status_valid(status, edid_block_tag(base_block))) { > edid_block_dump(KERN_NOTICE, base_block, 0); -- Jani Nikula, Intel

Re: [PATCH] drm: Print bad EDID notices only once

2024-09-26 Thread Jani Nikula
LOCK_VERSION: > - pr_notice("EDID has major version %d, instead of 1\n", > + pr_notice_once("EDID has major version %d, instead of 1\n", > block->version); > break; > default: -- Jani Nikula, Intel

Re: [PATCH 1/7] drm/i915/histogram: Define registers for histogram

2024-09-26 Thread Jani Nikula
efine DPST_BIN_BUSYREG_BIT(31) > + > +#define INTEL_HISTOGRAM_PIPEA0x9000 > +#define INTEL_HISTOGRAM_PIPEB0x9002 > +#define INTEL_HISTOGRAM_EVENT(pipe) PIPE(pipe, \ > + INTEL_HISTOGRAM_PIPEA, \ > + INTEL_HISTOGRAM_PIPEB) This can't be right, but it's unused so wasn't caught. BR, Jani. > + > +#endif /* __INTEL_HISTOGRAM_REG_H__ */ -- Jani Nikula, Intel

RE: [PATCHv3 6/6] drm/i915/histogram: Histogram changes for Display 20+

2024-09-25 Thread Jani Nikula
l code with functions involve register usage, hence thought of using > inline. It's just that the compiler usually knows better than us what to do, and will automatically inline them, and much more, with a more clever granularity. And on the downside, e.g. gcc does not warn about unused static inlines in .c files. > Will remove inline! Thanks, Jani. -- Jani Nikula, Intel

RE: [PATCHv3 6/6] drm/i915/histogram: Histogram changes for Display 20+

2024-09-25 Thread Jani Nikula
And if you do need to use inline in headers, it should be "inline", not "__inline__". See include/linux/compiler_types.h. BR, Jani. [1] https://lore.kernel.org/all/87y13g2jkq@intel.com -- Jani Nikula, Intel

Re: [PATCH 0/2] drm: revert some framebuffer API tests

2024-09-25 Thread Jani Nikula
On Tue, 24 Sep 2024, Maxime Ripard wrote: > On Tue, Sep 24, 2024 at 06:56:26PM GMT, Jani Nikula wrote: >> On Tue, 24 Sep 2024, Guenter Roeck wrote: >> >>>> On Tue, Sep 24, 2024 at 12:06:28PM GMT, Simona Vetter wrote: >> >>>>> Yeah I think long-ter

Re: [PATCHv3 6/6] drm/i915/histogram: Histogram changes for Display 20+

2024-09-25 Thread Jani Nikula
IN_A, _DPST_IE_BIN_B) > +#define DPST_IE_BIN_DATA_MASK REG_GENMASK(9, > 0) > +#define DPST_IE_BIN_DATA(val) > REG_FIELD_PREP(DPST_IE_BIN_DATA_MASK, val) > + > +#define _DPST_IE_INDEX_A 0x490DC > +#define _DPST_IE_INDEX_B 0x491DC > +#define DPST_IE_INDEX(pipe) _MMIO_PIPE(pipe, > _DPST_IE_INDEX_A, _DPST_IE_INDEX_B) > +#define DPST_IE_BIN_INDEX_MASK REG_GENMASK(6, > 0) > +#define DPST_IE_BIN_INDEX(val) > REG_FIELD_PREP(DPST_IE_BIN_INDEX_MASK, val) > + > #define INTEL_HISTOGRAM_PIPEA0x9000 > #define INTEL_HISTOGRAM_PIPEB0x9002 > #define INTEL_HISTOGRAM_EVENT(pipe) PIPE(pipe, \ -- Jani Nikula, Intel

Re: [PATCH v2 01/22] drm: add clone mode check for CRTC

2024-09-25 Thread Jani Nikula
dependencies, and make them harder to reduce. BR, Jani. > > #endif /* __DRM_CRTC_H__ */ -- Jani Nikula, Intel

Re: [PATCH 0/2] drm: revert some framebuffer API tests

2024-09-24 Thread Jani Nikula
gt; additional drm unit test splats don't make a difference for me since the > tests are already disabled. What's the point of having unit tests that CI systems routinely have to filter out of test runs? Or filter warnings generated by the tests, potentially missing new warnings.

Re: [PATCH] drm: Add check for encoder in intel_get_crtc_new_encoder()

2024-09-24 Thread Jani Nikula
On Tue, 24 Sep 2024, Jani Nikula wrote: > On Tue, 24 Sep 2024, George Rurikov wrote: >> If the video card driver could not find the connector assigned to the >> current video controller, or if the hardware status has changed so that >> a pre-existing connector is no longe

Re: [PATCH] drm: Add check for encoder in intel_get_crtc_new_encoder()

2024-09-24 Thread Jani Nikula
лектронное письмо и любые приложения к нему являются > конфиденциальными и предназначены исключительно для адресата. Если Вы не > являетесь адресатом данного письма, пожалуйста, уведомите немедленно > отправителя, не раскрывайте содержание другим лицам, не используйте его в > каких-либо целях, не храните и не копируйте информацию любым способом. Sorry, we can't accept patches with that boilerplate anyway. BR, Jani. -- Jani Nikula, Intel

Re: [PATCH v6 1/4] drm: Introduce device wedged event

2024-09-23 Thread Jani Nikula
n. Yeah, please make the helpers regular functions. Static inlines are just harmful here. BR, Jani. > >> > Either you NULL-terminate that, or export the size as well (personally I >> > would >> > go with the first approach). -- Jani Nikula, Intel

Re: [PATCH v2] drm/gma500: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmi

2024-09-23 Thread Jani Nikula
ng such a change? >> >> Best regards >> Thomas > > I do not have a device to test this. Reading the rest of the series and > given my circumstances, I do not think I will be continuing with this > patch. *sad trombone* I think we could've made concrete incremental positive changes here, without changing everything about detect and get_modes. BR, Jani. -- Jani Nikula, Intel

Re: [PATCH v6 08/12] drm/i915/spi: add spi device for discrete graphics

2024-09-23 Thread Jani Nikula
we make that struct intel_dg_spi_dev *spi, drop the include and use a forward declaration for the type, and allocate dynamically please? Ditto for xe driver. struct drm_i915_private is huge, i915_drv.h gets included everywhere, and there's no reason everyone should be able to look at the guts of of that member. BR, Jani. -- Jani Nikula, Intel

Re: [PATCH 7/8] drm/msmi: annotate pll_cmp_to_fdata() with __maybe_unused

2024-09-22 Thread Jani Nikula
On Sun, 22 Sep 2024, Dmitry Baryshkov wrote: > On Wed, Sep 11, 2024 at 01:23:23PM GMT, Jani Nikula wrote: >> Thanks, I'll change this to drop the function. > > Seeing no updated revisions here, I've posted a patch that drops the > offending function. If I misse

Re: [PATCH] drm/msm/hdmi: drop pll_cmp_to_fdata from hdmi_phy_8998

2024-09-22 Thread Jani Nikula
On Sun, 22 Sep 2024, Dmitry Baryshkov wrote: > The pll_cmp_to_fdata() was never used by the working code. Drop it to > prevent warnings with W=1 and clang. > > Reported-by: Jani Nikula > Closes: > https://lore.kernel.org/dri-devel/3553b1db35665e6ff08592e35eb438a574d1ad65.17259

Re: [PATCH] drm/display/dsc: Refactor MST DSC Determination Policy

2024-09-19 Thread Jani Nikula
> + goto out_dsc_fail; > + } > > - return NULL; > + return; > + > +out_dsc_fail: > + port->dsc_aux = NULL; > + port->dsc_passthrough_aux = NULL; > + return; > } > EXPORT_SYMBOL(drm_dp_mst_dsc_aux_for_port); > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c > b/drivers/gpu/drm/i915/display/intel_dp.c > index a1fcedfd404b..d39a7c6f5bfa 100644 > --- a/drivers/gpu/drm/i915/display/intel_dp.c > +++ b/drivers/gpu/drm/i915/display/intel_dp.c > @@ -3219,7 +3219,7 @@ intel_dp_sink_set_dsc_passthrough(const struct > intel_connector *connector, > { > struct drm_i915_private *i915 = to_i915(connector->base.dev); > struct drm_dp_aux *aux = connector->port ? > - connector->port->passthrough_aux : NULL; > + connector->port->dsc_passthrough_aux : NULL; > > if (!aux) > return; > diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c > b/drivers/gpu/drm/i915/display/intel_dp_mst.c > index 15541932b809..73cb1c673525 100644 > --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c > +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c > @@ -1699,7 +1699,8 @@ static struct drm_connector > *intel_dp_add_mst_connector(struct drm_dp_mst_topolo > > intel_dp_init_modeset_retry_work(intel_connector); > > - intel_connector->dp.dsc_decompression_aux = > drm_dp_mst_dsc_aux_for_port(port); > + drm_dp_mst_dsc_aux_for_port(port); > + intel_connector->dp.dsc_decompression_aux = port->dsc_aux; > intel_dp_mst_read_decompression_port_dsc_caps(intel_dp, > intel_connector); > intel_connector->dp.dsc_hblank_expansion_quirk = > detect_dsc_hblank_expansion_quirk(intel_connector); > diff --git a/include/drm/display/drm_dp.h b/include/drm/display/drm_dp.h > index a6f8b098c56f..fa454506866b 100644 > --- a/include/drm/display/drm_dp.h > +++ b/include/drm/display/drm_dp.h > @@ -980,6 +980,7 @@ > #define DP_BRANCH_REVISION_START0x509 > #define DP_BRANCH_HW_REV0x509 > #define DP_BRANCH_SW_REV0x50A > +#define DP_BRANCH_VENDOR_SPECIFIC_START 0x50C > > /* Link/Sink Device Power Control */ > #define DP_SET_POWER0x600 > diff --git a/include/drm/display/drm_dp_helper.h > b/include/drm/display/drm_dp_helper.h > index 279624833ea9..5eb583004d00 100644 > --- a/include/drm/display/drm_dp_helper.h > +++ b/include/drm/display/drm_dp_helper.h > @@ -643,6 +643,7 @@ struct drm_dp_dpcd_ident { > u8 hw_rev; > u8 sw_major_rev; > u8 sw_minor_rev; > + u8 vendor_data[4]; > } __packed; > > /** > @@ -711,6 +712,13 @@ enum drm_dp_quirk { >* requires enabling DSC. >*/ > DP_DPCD_QUIRK_HBLANK_EXPANSION_REQUIRES_DSC, > + /** > + * @DP_DPCD_QUIRK_DSC_MUST_ROOT_DECOMPRESSION: > + * > + * The device has internal virutual dpcd with dsc decoding cap, > + * but dsc decoding must be done at root mstb. > + */ > + DP_DPCD_QUIRK_DSC_MUST_ROOT_DECOMPRESSION, > }; > > /** > diff --git a/include/drm/display/drm_dp_mst_helper.h > b/include/drm/display/drm_dp_mst_helper.h > index f6a1cbb0f600..b04ca4a97af2 100644 > --- a/include/drm/display/drm_dp_mst_helper.h > +++ b/include/drm/display/drm_dp_mst_helper.h > @@ -135,7 +135,8 @@ struct drm_dp_mst_port { >*/ > struct drm_dp_mst_branch *mstb; > struct drm_dp_aux aux; /* i2c bus for this port? */ > - struct drm_dp_aux *passthrough_aux; > + struct drm_dp_aux *dsc_aux; > + struct drm_dp_aux *dsc_passthrough_aux; > struct drm_dp_mst_branch *parent; > > struct drm_connector *connector; > @@ -956,7 +957,7 @@ bool drm_dp_mst_port_is_logical(struct drm_dp_mst_port > *port) > } > > struct drm_dp_aux *drm_dp_mst_aux_for_parent(struct drm_dp_mst_port *port); > -struct drm_dp_aux *drm_dp_mst_dsc_aux_for_port(struct drm_dp_mst_port *port); > +void drm_dp_mst_dsc_aux_for_port(struct drm_dp_mst_port *port); > > static inline struct drm_dp_mst_topology_state * > to_drm_dp_mst_topology_state(struct drm_private_state *state) -- Jani Nikula, Intel

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

2024-09-19 Thread Jani Nikula
On Thu, 19 Sep 2024, Raag Jadav wrote: > On Thu, Sep 19, 2024 at 12:24:09PM +0300, Jani Nikula wrote: >> On Thu, 19 Sep 2024, Raag Jadav wrote: >> > On Thu, Sep 19, 2024 at 10:38:51AM +0300, Jani Nikula wrote: >> >> On Thu, 19 Sep 2024, Raag Jadav wrote: >>

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

2024-09-19 Thread Jani Nikula
On Thu, 19 Sep 2024, Raag Jadav wrote: > On Thu, Sep 19, 2024 at 10:38:51AM +0300, Jani Nikula wrote: >> On Thu, 19 Sep 2024, Raag Jadav wrote: >> > On Tue, Sep 17, 2024 at 10:49:07AM +0300, Jani Nikula wrote: >> >> On Tue, 17 Sep 2024, Raag Jadav wrote: >&g

Re: [PATCH v5 1/4] drm: Introduce device wedged event

2024-09-19 Thread Jani Nikula
* Root directory for debugfs files. >*/ > struct dentry *debugfs_root; > + > + /** @wedge_recovery: Supported recovery methods for wedged device */ > + unsigned long wedge_recovery; > }; > > #endif > diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h > index 02ea4e3248fd..6e02187f1f6c 100644 > --- a/include/drm/drm_drv.h > +++ b/include/drm/drm_drv.h > @@ -461,6 +461,7 @@ void drm_put_dev(struct drm_device *dev); > bool drm_dev_enter(struct drm_device *dev, int *idx); > void drm_dev_exit(int idx); > void drm_dev_unplug(struct drm_device *dev); > +int drm_dev_wedged_event(struct drm_device *dev, enum wedge_recovery_method > method); > > /** > * drm_dev_is_unplugged - is a DRM device unplugged -- Jani Nikula, Intel

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

2024-09-19 Thread Jani Nikula
On Thu, 19 Sep 2024, Raag Jadav wrote: > On Tue, Sep 17, 2024 at 10:49:07AM +0300, Jani Nikula wrote: >> On Tue, 17 Sep 2024, Raag Jadav wrote: >> > Now that we have device wedged event in place, add wedge_recovery sysfs >> > attribute which will expose recovery m

Re: [PATCH v3 3/5] drm/i915/display: Enable the second scaler for sharpness

2024-09-18 Thread Jani Nikula
; > size = intel_de_read(dev_priv, SKL_PS_WIN_SZ(crtc->pipe, i)); > > - drm_rect_init(&crtc_state->pch_pfit.dst, > - REG_FIELD_GET(PS_WIN_XPOS_MASK, pos), > - REG_FIELD_GET(PS_WIN_YPOS_MASK, pos), > - REG_FIELD_GET(PS_WIN_XSIZE_MASK, size), > - REG_FIELD_GET(PS_WIN_YSIZE_MASK, size)); > + if (!crtc_state->hw.casf_params.need_scaler) > + drm_rect_init(&crtc_state->pch_pfit.dst, > + REG_FIELD_GET(PS_WIN_XPOS_MASK, pos), > + REG_FIELD_GET(PS_WIN_YPOS_MASK, pos), > + REG_FIELD_GET(PS_WIN_XSIZE_MASK, size), > + REG_FIELD_GET(PS_WIN_YSIZE_MASK, size)); > > scaler_state->scalers[i].in_use = true; > break; > diff --git a/drivers/gpu/drm/i915/display/skl_scaler.h > b/drivers/gpu/drm/i915/display/skl_scaler.h > index 63f93ca03c89..444527e6a15b 100644 > --- a/drivers/gpu/drm/i915/display/skl_scaler.h > +++ b/drivers/gpu/drm/i915/display/skl_scaler.h > @@ -33,5 +33,6 @@ void skl_detach_scalers(const struct intel_crtc_state > *crtc_state); > void skl_scaler_disable(const struct intel_crtc_state *old_crtc_state); > > void skl_scaler_get_config(struct intel_crtc_state *crtc_state); > +void casf_scaler_enable(struct intel_crtc_state *crtc_state); > > #endif -- Jani Nikula, Intel

Re: [PATCH v3 2/5] drm/i915/display: Compute the scaler filter coefficients

2024-09-18 Thread Jani Nikula
dex 41f4350a7c6c..84b05b57ad52 100644 > --- a/drivers/gpu/drm/i915/i915_reg.h > +++ b/drivers/gpu/drm/i915/i915_reg.h > @@ -2257,6 +2257,8 @@ > #define PS_VERT_INT_INVERT_FIELD REG_BIT(20) > #define PS_PROG_SCALE_FACTOR REG_BIT(19) /* tgl+ */ > #define PS_PWRUP_PROGRESS REG_BIT(17) > +#define PS_BYPASS_ARMING REG_BIT(10) > +#define PS_DB_STALLREG_BIT(9) > #define PS_V_FILTER_BYPASS REG_BIT(8) > #define PS_VADAPT_EN REG_BIT(7) /* skl/bxt */ > #define PS_VADAPT_MODE_MASKREG_GENMASK(6, 5) /* > skl/bxt */ > diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile > index 8f1c5c329f79..26b4b516c9ec 100644 > --- a/drivers/gpu/drm/xe/Makefile > +++ b/drivers/gpu/drm/xe/Makefile > @@ -254,6 +254,7 @@ xe-$(CONFIG_DRM_XE_DISPLAY) += \ > i915-display/intel_psr.o \ > i915-display/intel_qp_tables.o \ > i915-display/intel_quirks.o \ > + i915-display/intel_sharpness_filter.o \ > i915-display/intel_snps_phy.o \ > i915-display/intel_tc.o \ > i915-display/intel_vblank.o \ -- Jani Nikula, Intel

Re: [PATCH v2 4/5] drm/i915/display: Add registers and compute the strength

2024-09-18 Thread Jani Nikula
^ tabs Also, do check the big comment near the top of i915_reg.h about style for the macros. BR, Jani. > + > /* Display Internal Timeout Register */ > #define RM_TIMEOUT _MMIO(0x42060) > #define RM_TIMEOUT_REG_CAPTURE _MMIO(0x420E0) -- Jani Nikula, Intel

Re: [PATCH v2 4/5] drm/i915/display: Add registers and compute the strength

2024-09-18 Thread Jani Nikula
) > +#define FILTER_STRENGTH_MASK REG_GENMASK(15, 8) > +#define FILTER_STRENGTH(x) REG_FIELD_PREP(FILTER_STRENGTH_MASK, > (x)) > +#define FILTER_SIZE_MASK REG_GENMASK(1, 0) > +#define FILTER_SIZE(x) REG_FIELD_PREP(FILTER_SIZE_MASK, (x)) > + > +#define _SHRPLUT_DATA_A0x682B8 > +#define SHRPLUT_DATA(trans)_MMIO_PIPE2(dev_priv, trans, > _SHRPLUT_DATA_A) > + > +#define _SHRPLUT_INDEX_A 0x682B4 > +#define SHRPLUT_INDEX(trans) _MMIO_PIPE2(dev_priv, trans, > _SHRPLUT_INDEX_A) > +#define INDEX_AUTO_INCR REG_BIT(10) > +#define INDEX_VALUE_MASK REG_GENMASK(4, 0) > +#define INDEX_VALUE(x) > REG_FIELD_PREP(INDEX_VALUE_MASK, (x)) > + Please don't add any new display registers to i915_reg.h. Work is in progress to separate the two, please don't make it harder. BR, Jani. > /* Display Internal Timeout Register */ > #define RM_TIMEOUT _MMIO(0x42060) > #define RM_TIMEOUT_REG_CAPTURE _MMIO(0x420E0) -- Jani Nikula, Intel

Re: [PATCH 1/2] drm/sched: add WARN_ON and BUG_ON to drm_sched_fini

2024-09-18 Thread Jani Nikula
from rq in drm_sched_entity_fini >* eventually >*/ > s_entity->stopped = true; > + } > spin_unlock(&rq->lock); > kfree(sched->sched_rq[i]); > } -- Jani Nikula, Intel

Re: [PATCH v1] drm/i915/hdmi: Convert comma to semicolon

2024-09-18 Thread Jani Nikula
gs = 0; > + msg.len = size + 1; > msg.buf = write_buf; > > ret = i2c_transfer(ddc, &msg, 1); -- Jani Nikula, Intel

Re: [PATCH] drm/xe/query: Refactor copy_to_user() usage in four functions

2024-09-18 Thread Jani Nikula
int query_hwconfig(struct xe_device *xe, > > xe_guc_hwconfig_copy(>->uc.guc, hwconfig); > > - if (copy_to_user(query_ptr, hwconfig, size)) { > + { > + unsigned long ctu = copy_to_user(query_ptr, hwconfig, size); > kfree(hwconfig); > - return -EFAULT; > + return ctu ? -EFAULT : 0; > } > - kfree(hwconfig); > - > - return 0; > } > > static size_t calc_topo_query_size(struct xe_device *xe) > -- > 2.46.0 > -- Jani Nikula, Intel

[PATCH 2/2] Revert "drm/tests: Add test for drm_framebuffer_init()"

2024-09-17 Thread Jani Nikula
Zimmermann Cc: Jeff Johnson Signed-off-by: Jani Nikula --- drivers/gpu/drm/drm_framebuffer.c| 1 - drivers/gpu/drm/tests/drm_framebuffer_test.c | 84 2 files changed, 85 deletions(-) diff --git a/drivers/gpu/drm/drm_framebuffer.c b/drivers/gpu/drm/drm_fram

[PATCH 1/2] Revert "drm/tests: Add test for drm_framebuffer_free()"

2024-09-17 Thread Jani Nikula
test for drm_framebuffer_free()") Cc: Carlos Eduardo Gallo Filho Cc: Maxime Ripard Cc: Maarten Lankhorst Cc: Thomas Zimmermann Cc: Jeff Johnson Signed-off-by: Jani Nikula --- drivers/gpu/drm/drm_mode_object.c| 1 - drivers/gpu/drm/tests/drm_framebuffer_test.c | 50

[PATCH 0/2] drm: revert some framebuffer API tests

2024-09-17 Thread Jani Nikula
Filho Cc: Maxime Ripard Cc: Maarten Lankhorst Cc: Thomas Zimmermann Cc: Jeff Johnson Jani Nikula (2): Revert "drm/tests: Add test for drm_framebuffer_free()" Revert "drm/tests: Add test for drm_framebuffer_init()" drivers/gpu/drm/drm_framebuffer.c| 1 - dri

Re: [PATCH v4] drm/connector: hdmi: Fix writing Dynamic Range Mastering infoframes

2024-09-17 Thread Jani Nikula
mits in v6.11. Are you still planning on a drm-misc-next-fixes pull request for v6.12-rc1? That would be the quickest way to get this upstream. BR, Jani. > > Thanks, > Derek > > On 2024-08-28 03:31, Jani Nikula wrote: >> On Tue, 27 Aug 2024, Derek Foreman wrote: >>>

Re: [PATCH v2] drm/i915/cx0: Set power state to ready only on owned PHY lanes

2024-09-17 Thread Jani Nikula
ge_sequence(encoder, owned_lane_mask, > CX0_P2_STATE_READY); > > /* > > base-commit: ad060dbbcfcfcba624ef1a75e1d71365a98b86d8 -- Jani Nikula, Intel

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

2024-09-17 Thread Jani Nikula
t; + > struct device *drm_sysfs_minor_alloc(struct drm_minor *minor) > { > const char *minor_str; > @@ -532,6 +554,7 @@ struct device *drm_sysfs_minor_alloc(struct drm_minor > *minor) > kdev->devt = MKDEV(DRM_MAJOR, minor->index); > kdev->class = drm_class; > kdev->type = &drm_sysfs_device_minor; > + kdev->groups = minor_dev_groups; > } > > kdev->parent = minor->dev->dev; -- Jani Nikula, Intel

Re: [PATCH v4 RESEND 8/9] drm/tests: Add test for drm_framebuffer_init()

2024-09-16 Thread Jani Nikula
arnigs is a tricky business. BR, Jani. > + KUNIT_EXPECT_EQ(test, ret, -EINVAL); > +} -- Jani Nikula, Intel

Re: [PATCH 6/8] drm/meson: dw-hdmi: annotate dw_hdmi_dwc_write_bits() with __maybe_unused

2024-09-16 Thread Jani Nikula
On Sun, 15 Sep 2024, Martin Blumenstingl wrote: > Hi Jani, > > On Tue, Sep 10, 2024 at 12:08 PM Jani Nikula wrote: >> >> Building with clang and and W=1 leads to warning about unused >> dw_hdmi_dwc_write_bits(). Fix by annotating it with __maybe_unused. >>

Re: [PATCH 5/8] drm/imagination: annotate pvr_fw_version_packed() with __maybe_unused

2024-09-13 Thread Jani Nikula
On Tue, 10 Sep 2024, Matt Coster wrote: > On 10/09/2024 11:03, Jani Nikula wrote: >> Building with clang and and W=1 leads to warning about unused >> pvr_fw_version_packed(). Fix by annotating it with __maybe_unused. >> >> See also commit 6863f5643dd7 ("kbuild: a

RE: [PATCH 3/8] drm/kmb: annotate set_test_mode_src_osc_freq_target_{low,hi}_bits() with __maybe_unused

2024-09-13 Thread Jani Nikula
On Tue, 10 Sep 2024, "Chrisanthus, Anitha" wrote: > Thanks for the patch. > > Acked-by: Anitha Chrisanthus Thanks, pushed to drm-misc-next. BR, Jani. -- Jani Nikula, Intel

Re: [PATCH v4 RESEND 0/9] Increase coverage on drm_framebuffer.c

2024-09-13 Thread Jani Nikula
On Fri, 13 Sep 2024, Maxime Ripard wrote: > On Fri, Sep 13, 2024 at 10:31:08AM GMT, Jani Nikula wrote: >> On Wed, 11 Sep 2024, Maxime Ripard wrote: >> > On Tue, 10 Sep 2024 21:15:25 -0300, Carlos Eduardo Gallo Filho wrote: >> >> This patchset includes new KUnit

Re: [PATCH v4 RESEND 0/9] Increase coverage on drm_framebuffer.c

2024-09-13 Thread Jani Nikula
to Cc: intel-gfx on stuff like this to run it through our CI. I don't think it ever passed [1]. BR, Jani. [1] https://intel-gfx-ci.01.org/tree/drm-tip/shards-all.html?testfilter=drm_framebuffer -- Jani Nikula, Intel

Re: [PATCH v2] drm/gma500: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmi

2024-09-12 Thread Jani Nikula
On Thu, 12 Sep 2024, Thomas Zimmermann wrote: > Hi > > Am 12.09.24 um 13:25 schrieb Jani Nikula: >> On Thu, 12 Sep 2024, Thomas Zimmermann wrote: >>> Hi >>> >>> Am 12.09.24 um 11:38 schrieb Jani Nikula: >>>> On Thu, 12 Sep 2024, Thomas Zimm

Re: [PATCH 7/8] drm/msmi: annotate pll_cmp_to_fdata() with __maybe_unused

2024-09-12 Thread Jani Nikula
On Thu, 12 Sep 2024, Dmitry Baryshkov wrote: > On Thu, Sep 12, 2024 at 02:50:04PM GMT, Marc Gonzalez wrote: >> On 12/09/2024 14:28, Dmitry Baryshkov wrote: >> > On Thu, Sep 12, 2024 at 02:14:10PM GMT, Marc Gonzalez wrote: >> >> On 12/09/2024 13:15, Jani Nikula wro

Re: [PATCH v2] drm/gma500: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmi

2024-09-12 Thread Jani Nikula
On Thu, 12 Sep 2024, Thomas Zimmermann wrote: > Hi > > Am 12.09.24 um 11:38 schrieb Jani Nikula: >> On Thu, 12 Sep 2024, Thomas Zimmermann wrote: >>> Am 12.09.24 um 10:56 schrieb Jani Nikula: >>>> Moreover, in this case .detect() only detects digital displ

Re: [PATCH 7/8] drm/msmi: annotate pll_cmp_to_fdata() with __maybe_unused

2024-09-12 Thread Jani Nikula
On Thu, 12 Sep 2024, Marc Gonzalez wrote: > On 11/09/2024 12:23, Jani Nikula wrote: >> On Tue, 10 Sep 2024, Marc Gonzalez wrote: >>> On 10/09/2024 16:51, Dmitry Baryshkov wrote: >>>> On Tue, Sep 10, 2024 at 01:03:43PM GMT, Jani Nikula wrote: >>>>>

Re: [PATCH v2] drm/gma500: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmi

2024-09-12 Thread Jani Nikula
On Thu, 12 Sep 2024, Thomas Zimmermann wrote: > Am 12.09.24 um 10:56 schrieb Jani Nikula: >> Moreover, in this case .detect() only detects digital displays as >> reported by EDID. If you postpone that to .get_modes(), the probe helper >> will still report connected, and inv

Re: [PATCH v2] drm/gma500: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmi

2024-09-12 Thread Jani Nikula
On Thu, 12 Sep 2024, Thomas Zimmermann wrote: > Hi > > Am 12.09.24 um 10:48 schrieb Jani Nikula: >> On Thu, 12 Sep 2024, Thomas Zimmermann wrote: >>> Hi >>> >>> Am 11.09.24 um 20:06 schrieb Tejas Vipin: >>>> Replace drm_detect_hdmi_monitor()

Re: [PATCH v2] drm/gma500: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmi

2024-09-12 Thread Jani Nikula
On Thu, 12 Sep 2024, Jani Nikula wrote: > On Thu, 12 Sep 2024, Thomas Zimmermann wrote: >> Hi >> >> Am 11.09.24 um 20:06 schrieb Tejas Vipin: >>> Replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmi since >>> monitor HDMI information is avail

Re: [PATCH v2] drm/gma500: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmi

2024-09-12 Thread Jani Nikula
the EDID. >> + return status; >> + >> +if (drm_edid_is_digital(drm_edid)) { >> +status = connector_status_connected; >> +hdmi_priv->has_hdmi_sink = connector->display_info.is_hdmi; >> +hdmi_priv->has_hdmi_audio = connector->display_info.has_audio; >> } >> +drm_edid_free(drm_edid); >> + >> return status; >> } >> -- Jani Nikula, Intel

Re: [PATCH 7/8] drm/msmi: annotate pll_cmp_to_fdata() with __maybe_unused

2024-09-11 Thread Jani Nikula
On Tue, 10 Sep 2024, Marc Gonzalez wrote: > On 10/09/2024 16:51, Dmitry Baryshkov wrote: > >> On Tue, Sep 10, 2024 at 01:03:43PM GMT, Jani Nikula wrote: >> >>> Building with clang and and W=1 leads to warning about unused >>> pll_cmp_to_fdata(). Fix

Re: [PATCH 2/8] drm: renesas: rcar-du: annotate rcar_cmm_read() with __maybe_unused

2024-09-11 Thread Jani Nikula
On Wed, 11 Sep 2024, Laurent Pinchart wrote: > Jiapeng Chong has sent a patch to drop the function, and I've reviewed > it. See > https://lore.kernel.org/r/20240619075436.86407-1-jiapeng.ch...@linux.alibaba.com Even better, thanks! BR, Jani. -- Jani Nikula, Intel

Re: linux-next: manual merge of the drm-xe tree with the drm-intel tree

2024-09-11 Thread Jani Nikula
> + #include >> >> #include "soc/intel_dram.h" >> #include "i915_drv.h" /* FIXME: HAS_DISPLAY() depends on this >> */ > > This is now a conflict between the drm-intel and drm trees. I backmerged drm-next to drm-intel-next, resolving the conflict. Thanks, Jani. -- Jani Nikula, Intel

Re: [PATCH 4/8] drm/bridge: ti-sn65dsi86: annotate ti_sn_pwm_pin_{request, release} with __maybe_unused

2024-09-11 Thread Jani Nikula
On Tue, 10 Sep 2024, Doug Anderson wrote: > Hi, > > On Tue, Sep 10, 2024 at 3:04 AM Jani Nikula wrote: >> >> Building with clang, W=1, CONFIG_PM=n and CONFIG_OF_GPIO=n leads to >> warning about unused ti_sn_pwm_pin_request() and >> ti_sn_pwm_pin_relea

Re: [PATCH 2/8] drm: renesas: rcar-du: annotate rcar_cmm_read() with __maybe_unused

2024-09-10 Thread Jani Nikula
On Tue, 10 Sep 2024, Geert Uytterhoeven wrote: > Hi Jani, > > On Tue, Sep 10, 2024 at 12:06 PM Jani Nikula wrote: >> Building with clang and and W=1 leads to warning about unused >> rcar_cmm_read(). Fix by annotating it with __maybe_unused. >> >> See also co

Re: [PATCH v4] drm/edid: add CTA Video Format Data Block support

2024-09-10 Thread Jani Nikula
cta_vfd(&vfd, &db->data[i + 1], vfd_len); > + > + if (!vfd.rid || vfd.rid >= ARRAY_SIZE(rids)) > + continue; > + > + for (j = 1; j < ARRAY_SIZE(cta_vf_fr); j++) { Maybe this should be int rate_index instead of j, because it does have a name in the spec instead of just random iteration? Probably helps to have int rate = video_format_frame_rate[rate_index]; > + if (!vfd_has_fr(&vfd, j) || Pass in rate there. > + (cta_vf_fr[j] < 144 && rid_to_vic[vfd.rid][j - 1])) This makes my head spin. Probably want a function that says what it does, and can explain in comments inside. Also useful because you'll need to bounds check rid_to_vic access. > + continue; > + > + mode = calculate_ovt_mode(connector, &rids[vfd.rid], > + cta_vf_fr[j]); > + > + if (!mode) > + continue; > + > + mode->height_mm = info->height_mm; > + mode->width_mm = info->width_mm; > + > + drm_mode_probed_add(connector, mode); > + num_modes++; > + } > + } > + > + return num_modes; > +} > + > /* > * CTA-861 YCbCr 4:2:0 Capability Map Data Block (CTA Y420CMDB) > * > @@ -5318,6 +5768,8 @@ static int add_cea_modes(struct drm_connector > *connector, > /* Add 4:2:0(only) modes present in EDID */ > modes += do_y420vdb_modes(connector, vdb420, > cea_db_payload_len(db) - 1); > + } else if (cea_db_tag(db) == CTA_DB_VIDEO_FORMAT) { > + modes += add_modes_from_vfdb(connector, db); > } > } > cea_db_iter_end(&iter); -- Jani Nikula, Intel

Re: [PATCH] drm: enable warnings on unused static inlines

2024-09-10 Thread Jani Nikula
On Thu, 05 Sep 2024, Jani Nikula wrote: > On Wed, 04 Sep 2024, Nathan Chancellor wrote: >> I ran this through my test matrix and this is what it found (across >> various configuration options, I can give specifics as necessary): > > Thanks, I didn't really expect thi

[PATCH 8/8] drm: enable warnings on unused static inlines

2024-09-10 Thread Jani Nikula
We enable most W=1 warnings by default subsystem wide. Also enable warnings on unused static inlines when building with clang. See also commit 6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions for W=1 build"). Cc: Nathan Chancellor Signed-off-by: J

[PATCH 7/8] drm/msmi: annotate pll_cmp_to_fdata() with __maybe_unused

2024-09-10 Thread Jani Nikula
Building with clang and and W=1 leads to warning about unused pll_cmp_to_fdata(). Fix by annotating it with __maybe_unused. See also commit 6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions for W=1 build"). Signed-off-by: Jani Nikula --- Cc: Rob Clark C

[PATCH 4/8] drm/bridge: ti-sn65dsi86: annotate ti_sn_pwm_pin_{request, release} with __maybe_unused

2024-09-10 Thread Jani Nikula
build"). Signed-off-by: Jani Nikula --- Cc: Douglas Anderson Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Robert Foss Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Cc: Nathan Chancellor --- drivers/gpu/drm/bridge/ti-sn65dsi86.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletion

[PATCH 6/8] drm/meson: dw-hdmi: annotate dw_hdmi_dwc_write_bits() with __maybe_unused

2024-09-10 Thread Jani Nikula
Building with clang and and W=1 leads to warning about unused dw_hdmi_dwc_write_bits(). Fix by annotating it with __maybe_unused. See also commit 6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions for W=1 build"). Signed-off-by: Jani Nikula --- Cc: Neil Arm

[PATCH 5/8] drm/imagination: annotate pvr_fw_version_packed() with __maybe_unused

2024-09-10 Thread Jani Nikula
Building with clang and and W=1 leads to warning about unused pvr_fw_version_packed(). Fix by annotating it with __maybe_unused. See also commit 6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions for W=1 build"). Signed-off-by: Jani Nikula --- Cc: Frank Binns

[PATCH 2/8] drm: renesas: rcar-du: annotate rcar_cmm_read() with __maybe_unused

2024-09-10 Thread Jani Nikula
Building with clang and and W=1 leads to warning about unused rcar_cmm_read(). Fix by annotating it with __maybe_unused. See also commit 6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions for W=1 build"). Signed-off-by: Jani Nikula --- Cc: Laurent Pinchart

[PATCH 3/8] drm/kmb: annotate set_test_mode_src_osc_freq_target_{low, hi}_bits() with __maybe_unused

2024-09-10 Thread Jani Nikula
r W=1 build"). Signed-off-by: Jani Nikula --- Cc: Anitha Chrisanthus Cc: Edmund Dea Cc: Nathan Chancellor --- drivers/gpu/drm/kmb/kmb_dsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/kmb/kmb_dsi.c b/drivers/gpu/drm/kmb/kmb_dsi.c index cf

[PATCH 1/8] drm/bridge: dw-hdmi-i2s: annotate hdmi_read() with __maybe_unused

2024-09-10 Thread Jani Nikula
Building with clang and and W=1 leads to warning about unused hdmi_read(). Fix by annotating it with __maybe_unused. See also commit 6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions for W=1 build"). Signed-off-by: Jani Nikula --- Cc: Andrzej Hajda Cc: Neil

[PATCH 0/8] drm: fix and enable warnings on unused static inlines

2024-09-10 Thread Jani Nikula
i.nik...@intel.com Jani Nikula (8): drm/bridge: dw-hdmi-i2s: annotate hdmi_read() with __maybe_unused drm: renesas: rcar-du: annotate rcar_cmm_read() with __maybe_unused drm/kmb: annotate set_test_mode_src_osc_freq_target_{low,hi}_bits() with __maybe_unused drm/bridge: ti-sn65

Re: [PATCH] drm/gma500: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmi

2024-09-10 Thread Jani Nikula
e to use struct drm_edid and the related functions drm_edid_read(), drm_edid_connector_update() and drm_edid_connector_add_modes() while you're at it. See git log --grep=drm_edid for a number of examples. BR, Jani. > return status; > } -- Jani Nikula, Intel

Re: [PATCH] drm/ipuv3/parallel: Fix an error handling path in imx_pd_probe()

2024-09-09 Thread Jani Nikula
goto free_edid; > + > + return 0; > + > +free_edid: > + drm_edid_free(imxpd->drm_edid); > + return ret; > } > > static void imx_pd_remove(struct platform_device *pdev) -- Jani Nikula, Intel

Re: [PATCH v2 3/8] drm/xe: xe_gen_wa_oob: fix program_invocation_short_name for macos

2024-09-06 Thread Jani Nikula
++ b/drivers/gpu/drm/xe/xe_gen_wa_oob.c > @@ -28,10 +28,10 @@ > "\n" \ > "#endif\n" > > -static void print_usage(FILE *f) > +static void print_usage(FILE *f, const char *progname) > { > fprintf(f, "usage: %s > \n", > - program_invocation_short_name); > + progname); > } > > static void print_parse_error(const char *err_msg, const char *line, > @@ -136,7 +136,7 @@ int main(int argc, const char *argv[]) > > if (argc < 3) { > fprintf(stderr, "ERROR: wrong arguments\n"); > - print_usage(stderr); > + print_usage(stderr, argv[0]); > return 1; > } -- Jani Nikula, Intel

Re: [PATCH] drm/i915:Remove unused parameter in marco.

2024-09-05 Thread Jani Nikula
0x16fc30 >> -#define PORT_ALPM_LFPS_CTL(dev_priv, port) >> _MMIO_PORT(port, _PORT_ALPM_LFPS_CTL_A, _PORT_ALPM_LFPS_CTL_B) >> +#define PORT_ALPM_LFPS_CTL(port) >> _MMIO_PORT(port, _PORT_ALPM_LFPS_CTL_A, _PORT_ALPM_LFPS_CTL_B) >> #define PORT_ALPM_LFPS_CTL_LFPS_START_POLARITY >> REG_BIT(31) >> #define PORT_ALPM_LFPS_CTL_LFPS_CYCLE_COUNT_MASK REG_GENMASK(27, >> 24) >> #define PORT_ALPM_LFPS_CTL_LFPS_CYCLE_COUNT_MIN7 >> -- >> 2.45.2 >> -- Jani Nikula, Intel

Re: [PATCH 02/18] drm/i915/selftests: Include instead of

2024-09-05 Thread Jani Nikula
On Thu, 05 Sep 2024, Uros Bizjak wrote: > Usage of pseudo-random functions requires inclusion of > header instead of . > > Signed-off-by: Uros Bizjak > Cc: Jani Nikula > Cc: Joonas Lahtinen > Cc: Rodrigo Vivi > Cc: Tvrtko Ursulin > Cc: David Airlie >

Re: [PATCH] drm: enable warnings on unused static inlines

2024-09-05 Thread Jani Nikula
On Wed, 04 Sep 2024, Nathan Chancellor wrote: > Hi Jani, > > On Wed, Sep 04, 2024 at 03:38:19PM +0300, Jani Nikula wrote: >> We enable most W=1 warnings by default subsystem wide. Also enable >> warnings on unused static inlines when building with clang. >> >

Re: [PATCH] drm/i915/gt: Continue creating engine sysfs files even after a failure

2024-09-04 Thread Jani Nikula
so that either we change them all to fail > the driver's probe or we have them behaving consistently as they > are. > > Tvrtko, Chris, Rodrigo any opinion from your side? Shall we bail > out as Sima is suggesting? Are there any causes for sysfs creation errors that would be acceptable to ignore? I didn't see any examples. Or is this just speculative? IMO fail fast and loud. We get enough bug reports where there's some big backtrace splash copy-pasted on the bug, but the root cause happened much earlier and was ignored. BR, Jani. -- Jani Nikula, Intel

[PATCH] drm: enable warnings on unused static inlines

2024-09-04 Thread Jani Nikula
We enable most W=1 warnings by default subsystem wide. Also enable warnings on unused static inlines when building with clang. See also commit 6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions for W=1 build"). Cc: Nathan Chancellor Signed-off-by: J

Re: [PATCH] drm/i915: convert comma to semicolon

2024-09-04 Thread Jani Nikula
1; > msg.buf = write_buf; > > ret = i2c_transfer(ddc, &msg, 1); -- Jani Nikula, Intel

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

2024-09-04 Thread Jani Nikula
r is > reported only once for each function it appears in > > Caused by commit > > a15710027afb ("drm/bridge: add support for TI TDP158") > > I have used the drm-misc tree from next-20240903 for today. Fixed by commit 532f0d109658 ("drm/bridge/tdp158: fix build failure") in drm-misc-next. BR, Jani. -- Jani Nikula, Intel

Re: [PATCH] drm/bridge/tdp158: fix build failure

2024-09-04 Thread Jani Nikula
On Wed, 04 Sep 2024, Dmitry Baryshkov wrote: > On Wed, Sep 04, 2024 at 11:52:06AM GMT, Jani Nikula wrote: >> ARCH=arm build fails with: >> >> CC [M] drivers/gpu/drm/bridge/ti-tdp158.o >> ../drivers/gpu/drm/bridge/ti-tdp158.c: In function ‘tdp158_enable’: >> ..

Re: [PATCH] drm/mm: annotate drm_mm_node_scanned_block() with __maybe_unused

2024-09-04 Thread Jani Nikula
On Tue, 03 Sep 2024, Andy Shevchenko wrote: > On Tue, Sep 03, 2024 at 08:34:37PM +0300, Jani Nikula wrote: >> Clang build with CONFIG_DRM_DEBUG_MM=n, CONFIG_WERROR=y, and W=1 leads >> to: >> >> CC [M] drivers/gpu/drm/drm_mm.o >> ../drivers/gpu/drm

Re: [PATCH v1 1/1] drm/mm: Mark drm_mm_interval_tree*() functions with __maybe_unused

2024-09-04 Thread Jani Nikula
On Fri, 30 Aug 2024, Jani Nikula wrote: > On Thu, 29 Aug 2024, Andy Shevchenko > wrote: >> The INTERVAL_TREE_DEFINE() uncoditionally provides a bunch of helper >> functions which in some cases may be not used. This, in particular, >> prevents kernel builds with `make

Re: [PATCH v5 0/2] Basic support for TI TDP158

2024-09-04 Thread Jani Nikula
On Tue, 03 Sep 2024, Jani Nikula wrote: > On Tue, 03 Sep 2024, Robert Foss wrote: >> On Mon, 12 Aug 2024 16:51:00 +0200, Marc Gonzalez wrote: >>> TDP158 is an AC-coupled DVI / HDMI to TMDS level shifting Redriver. >>> >>> Like the TFP410, the TDP158 can

[PATCH] drm/bridge/tdp158: fix build failure

2024-09-04 Thread Jani Nikula
for TI TDP158") Cc: Marc Gonzalez Cc: Robert Foss Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Signed-off-by: Jani Nikula --- drivers/gpu/drm/bridge/ti-tdp158.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git

RE: [PATCH 0/6] drm: conversions to struct drm_edid

2024-09-04 Thread Jani Nikula
to drm-misc-next. > > Acked-by : Inki Dae Thanks, pushed. BR, Jani. -- Jani Nikula, Intel

Re: [PATCH] drm/amdgpu: enable -Wformat-truncation

2024-09-04 Thread Jani Nikula
drm subsystem Makefile > subdir-ccflags-y += -Wno-override-init > +subdir-ccflags-y += $(call cc-option, -Wformat-truncation) > subdir-ccflags-$(CONFIG_DRM_AMDGPU_WERROR) += -Werror > > amdgpu-y := amdgpu_drv.o -- Jani Nikula, Intel

[PATCH] drm/mm: annotate drm_mm_node_scanned_block() with __maybe_unused

2024-09-03 Thread Jani Nikula
nline bool drm_mm_node_scanned_block(const struct drm_mm_node *node) ^ Fix this by annotating drm_mm_node_scanned_block() with __maybe_unused. Cc: Andy Shevchenko Signed-off-by: Jani Nikula --- drivers/gpu/drm/drm_mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH] drm/tegra: fix potential uninitialized variable use

2024-09-03 Thread Jani Nikula
On Tue, 03 Sep 2024, Thierry Reding wrote: > On Mon, Sep 02, 2024 at 07:13:17PM GMT, Jani Nikula wrote: >> It's likely either output->drm_edid or output->ddc is non-NULL, but >> avoid the uninitialized variable usage anyway. >> >> Reported-b

  1   2   3   4   5   6   7   8   9   10   >