Re: [PATCH 1/6] drm/ttm: move the LRU into resource handling v3

2022-02-16 Thread Christian König
Adding a few more people. Just a gentle ping on this, can I get an rb or at least acked-by for this patch set? Thanks in advance, Christian. Am 15.02.22 um 18:22 schrieb Christian König: This way we finally fix the problem that new resource are not immediately evict-able after allocation.

Re: [PATCH v2] drm/i915: fix build issue when using clang

2022-02-16 Thread Jani Nikula
On Tue, 15 Feb 2022, Nathan Chancellor wrote: > On Mon, Feb 14, 2022 at 11:58:20AM -0800, Tong Zhang wrote: >> drm/i915 adds some extra cflags, namely -Wall, which causes >> instances of -Wformat-security to appear when building with clang, even >> though this warning is turned off kernel-wide in

[PATCH] drm/bridge: Clear the DP_AUX_I2C_MOT bit passed in aux command.

2022-02-16 Thread Hsin-Yi Wang
It's observed that if the previous transfer didn't end with a command without DP_AUX_I2C_MOT, the next trasnfer will miss the first byte. But if the command in previous transfer is requested with length 0, anx7625 can't process this command. To make the case simpler, request with commands without

Re: [REPOST PATCH v4 08/13] drm/msm/disp/dpu1: Don't use DSC with mode_3d

2022-02-16 Thread Dmitry Baryshkov
On 17/02/2022 09:33, Abhinav Kumar wrote: On 2/16/2022 10:10 PM, Vinod Koul wrote: On 16-02-22, 19:11, Abhinav Kumar wrote: On 2/10/2022 2:34 AM, Vinod Koul wrote: We cannot enable mode_3d when we are using the DSC. So pass configuration to detect DSC is enabled and not enable mode_3d

Re: [PATCH v7 3/4] drm/msm/dpu: replace BIT(x) with correspond marco define string

2022-02-16 Thread Dmitry Baryshkov
On 17/02/2022 01:05, Kuogee Hsieh wrote: To improve code readability, this patch replace BIT(x) with correspond register bit define string Signed-off-by: Kuogee Hsieh This patch should come first. --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c | 16 +++- 1 file changed, 11

Re: [PATCH v7 4/4] drm/msm/dp: enable widebus feature for display port

2022-02-16 Thread Dmitry Baryshkov
On 17/02/2022 01:05, Kuogee Hsieh wrote: Widebus feature will transmit two pixel data per pixel clock to interface. This feature now is required to be enabled to easy migrant to higher resolution applications in future. However since some legacy chipsets does not support this feature, this

Re: [Intel-gfx] [PATCH] drm/i915: Kill the fake lmem support

2022-02-16 Thread Lucas De Marchi
On Wed, Feb 16, 2022 at 03:18:49PM -0800, Lucas De Marchi wrote: This was useful for early development of lmem, but it's not used anymore, so remove it. Cc: Chris Wilson Cc: Matthew Auld Signed-off-by: Lucas De Marchi --- drivers/gpu/drm/i915/Kconfig.unstable | 8 --

Re: [Intel-gfx] [drm-tip:drm-tip 4/8] drivers/gpu/drm/solomon/ssd130x.c:451:18: error: incomplete definition of type 'struct dma_buf_map'

2022-02-16 Thread Lucas De Marchi
+Javier On Thu, Feb 17, 2022 at 02:25:08PM +0800, kernel test robot wrote: tree: git://anongit.freedesktop.org/drm/drm-tip drm-tip head: e141e36b2871c529379f7ec7d5d6ebae3137a51b commit: 7ca6504c36709f35c4cc38ae6acc1c9c3d72136f [4/8] Merge remote-tracking branch 'drm-misc/drm-misc-next'

Re: [PATCH v7 1/4] drm/msm/dpu: revise timing engine programming to support widebus feature

2022-02-16 Thread Dmitry Baryshkov
On 17/02/2022 01:05, Kuogee Hsieh wrote: Widebus feature will transmit two pixel data per pixel clock to interface. Timing engine provides driving force for this purpose. This patch base on HPG (Hardware Programming Guide) to revise timing engine register setting to accommodate both widebus and

Re: [REPOST PATCH v4 08/13] drm/msm/disp/dpu1: Don't use DSC with mode_3d

2022-02-16 Thread Abhinav Kumar
On 2/16/2022 10:10 PM, Vinod Koul wrote: On 16-02-22, 19:11, Abhinav Kumar wrote: On 2/10/2022 2:34 AM, Vinod Koul wrote: We cannot enable mode_3d when we are using the DSC. So pass configuration to detect DSC is enabled and not enable mode_3d when we are using DSC We add a helper

[drm-tip:drm-tip 4/8] drivers/gpu/drm/solomon/ssd130x.c:451:18: error: incomplete definition of type 'struct dma_buf_map'

2022-02-16 Thread kernel test robot
tree: git://anongit.freedesktop.org/drm/drm-tip drm-tip head: e141e36b2871c529379f7ec7d5d6ebae3137a51b commit: 7ca6504c36709f35c4cc38ae6acc1c9c3d72136f [4/8] Merge remote-tracking branch 'drm-misc/drm-misc-next' into drm-tip config: mips-buildonly-randconfig-r002-20220217

Re: [PATCH] drm/i915/guc/slpc: Use wrapper for reading RP_STATE_CAP

2022-02-16 Thread Matt Roper
On Tue, Feb 15, 2022 at 06:58:17PM -0800, Vinay Belgaumkar wrote: > This will ensure correct values for Gen12+ platforms. > > Cc: Matt Roper > Signed-off-by: Vinay Belgaumkar Reviewed-by: Matt Roper > --- > drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c | 5 +++-- > 1 file changed, 3

Re: [Freedreno] [REPOST PATCH v4 13/13] drm/msm/dsi: Add support for DSC configuration

2022-02-16 Thread Vinod Koul
On 16-02-22, 19:44, Abhinav Kumar wrote: > > > On 2/10/2022 2:34 AM, Vinod Koul wrote: > > When DSC is enabled, we need to configure DSI registers accordingly and > > configure the respective stream compression registers. > > > > Add support to calculate the register setting based on DSC params

Re: [REPOST PATCH v4 08/13] drm/msm/disp/dpu1: Don't use DSC with mode_3d

2022-02-16 Thread Vinod Koul
On 16-02-22, 19:11, Abhinav Kumar wrote: > > > On 2/10/2022 2:34 AM, Vinod Koul wrote: > > We cannot enable mode_3d when we are using the DSC. So pass > > configuration to detect DSC is enabled and not enable mode_3d > > when we are using DSC > > > > We add a helper dpu_encoder_helper_get_dsc()

Re: [Freedreno] [REPOST PATCH v4 07/13] drm/msm/disp/dpu1: Add support for DSC in encoder

2022-02-16 Thread Vinod Koul
On 16-02-22, 11:54, Abhinav Kumar wrote: > > +/** > > + * dpu_encoder_helper_get_dsc - get DSC blocks mask for the DPU encoder > > + * This helper function is used by physical encoder to get DSC blocks > > mask > > + * used for this encoder. > > This looks slightly misaligned to me or not

[PATCH v5 5/5] drm/msm/dp: rewrite dss_module_power to use bulk clock functions

2022-02-16 Thread Dmitry Baryshkov
In order to simplify DP code, drop hand-coded loops over clock arrays, replacing them with clk_bulk_* functions. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/Makefile | 1 - drivers/gpu/drm/msm/dp/dp_clk_util.c | 87

[PATCH v5 4/5] drm/msm/dp: inline dp_power_clk_set_rate()

2022-02-16 Thread Dmitry Baryshkov
Inline the dp_power_clk_set_rate() function, replacing it with the call to msm_dss_enable_clk(). Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dp/dp_power.c | 23 ++- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/msm/dp/dp_power.c

[PATCH v5 3/5] drm/msm/dp: set stream_pixel rate directly

2022-02-16 Thread Dmitry Baryshkov
The only clock for which we set the rate is the "stream_pixel". Rather than storing the rate and then setting it by looping over all the clocks, set the clock rate directly. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dp/dp_clk_util.c | 33

[PATCH v5 1/5] drm/msm/dpu: simplify clocks handling

2022-02-16 Thread Dmitry Baryshkov
DPU driver contains code to parse clock items from device tree into special data struct and then enable/disable/set rate for the clocks using that data struct. However the DPU driver itself uses only parsing and enabling/disabling part (the rate setting is used by DP driver). Move this

[PATCH v5 2/5] drm/msm/dp: "inline" dp_ctrl_set_clock_rate("ctrl_link")

2022-02-16 Thread Dmitry Baryshkov
"ctrl_link" is the clock from DP_CTRL_PM module. The result of setting the rate for it would be a call to dev_pm_opp_set_rate(). Instead of saving the rate inside struct dss_module_power, call the devm_pm_opp_set_rate() directly. Signed-off-by: Dmitry Baryshkov ---

[PATCH v5 0/5] drm/msm: rework clock handling

2022-02-16 Thread Dmitry Baryshkov
msm_dss_clk_*() functions significantly duplicate clk_bulk_* family of functions. Drop custom code and use bulk clocks directly. This also removes dependency of DP driver on the DPU driver internals. Note that DP changes were compile-only tested. Changes since v4: - Use size_t for num_clocks in

[PATCH v3 5/6] drm/msm/dpu: remove struct dpu_encoder_irq

2022-02-16 Thread Dmitry Baryshkov
Remove additional indirection: specify IRQ callbacks and IRQ indices directly rather than through the pointer in the irq structure. For each IRQ we have a constant IRQ callback. This change simplifies code review as the reader no longer needs to remember which function is called. Signed-off-by:

[PATCH v3 6/6] drm/msm/dpu: pass irq to dpu_encoder_helper_wait_for_irq()

2022-02-16 Thread Dmitry Baryshkov
Pass IRQ number directly rather than passing an index in the dpu_encoder's irq table. Reviewed-by: Stephen Boyd Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 29 +-- .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h

[PATCH v3 1/6] drm/msm/dpu: remove extra wrappers around dpu_core_irq

2022-02-16 Thread Dmitry Baryshkov
Remove extra dpu_irq_* wrappers from dpu_kms.c, merge them directly into dpu_core_irq_* functions. Reviewed-by: Abhinav Kumar Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.h | 12 -

[PATCH v3 3/6] drm/msm/dpu: allow just single IRQ callback

2022-02-16 Thread Dmitry Baryshkov
DPU interrupts code allows multiple callbacks per interrut. In reality none of the interrupts is shared between blocks (and will probably never be). Drop support for registering multiple callbacks per interrupt to simplify interrupt handling code. Reported-by: kernel test robot Signed-off-by:

[PATCH v3 4/6] drm/msm/dpu: get rid of dpu_encoder_helper_(un)register_irq

2022-02-16 Thread Dmitry Baryshkov
Get rid of dpu_encoder_helper_register_irq/unregister_irq helpers, call dpu_core_register/unregister_callback directly, without surrounding them with helpers. Reviewed-by: Abhinav Kumar Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c

[PATCH v3 2/6] drm/msm/dpu: remove always-true argument of dpu_core_irq_read()

2022-02-16 Thread Dmitry Baryshkov
The argument clear of the function dpu_core_irq_read() is always true. Remove it. Reviewed-by: Abhinav Kumar Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.h | 4 +--- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 3 +--

[PATCH v3 0/6] drm/msm/dpu: simplify IRQ helpers

2022-02-16 Thread Dmitry Baryshkov
This is the second part of https://patchwork.freedesktop.org/series/91631/ reworked and cleaned up. Changes since v1: - Fix warning ins dpu_trace.h related to dpu_core_irq_unregister_callback event Changes since v1: - Use ARRAY_SIZE() rather INTR_IDX_MAX when clearing irq arrays. Changes

Re: [REPOST PATCH v4 04/13] drm/msm/disp/dpu1: Add support for DSC in pingpong block

2022-02-16 Thread Vinod Koul
On 16-02-22, 11:49, Abhinav Kumar wrote: > > > On 2/10/2022 2:34 AM, Vinod Koul wrote: > > In SDM845, DSC can be enabled by writing to pingpong block registers, so > > add support for DSC in hw_pp > > > > Reviewed-by: Abhinav Kumar > > For the sake of uniformity, please use > > Reviewed-by:

Re: [REPOST PATCH v4 03/13] drm/msm/disp/dpu1: Add support for DSC

2022-02-16 Thread Vinod Koul
On 16-02-22, 22:46, Dmitry Baryshkov wrote: > On 16/02/2022 21:57, Abhinav Kumar wrote: > > > > > > On 2/10/2022 2:34 AM, Vinod Koul wrote: > > > Display Stream Compression (DSC) is one of the hw blocks in dpu, so add > > > support by adding hw blocks for DSC > > > > > > Reviewed-by: Dmitry

[PATCH v2 5/6] drm/msm/dpu: remove struct dpu_encoder_irq

2022-02-16 Thread Dmitry Baryshkov
Remove additional indirection: specify IRQ callbacks and IRQ indices directly rather than through the pointer in the irq structure. For each IRQ we have a constant IRQ callback. This change simplifies code review as the reader no longer needs to remember which function is called. Signed-off-by:

[PATCH v2 6/6] drm/msm/dpu: pass irq to dpu_encoder_helper_wait_for_irq()

2022-02-16 Thread Dmitry Baryshkov
Pass IRQ number directly rather than passing an index in the dpu_encoder's irq table. Reviewed-by: Stephen Boyd Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 29 +-- .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h

[PATCH v2 1/6] drm/msm/dpu: remove extra wrappers around dpu_core_irq

2022-02-16 Thread Dmitry Baryshkov
Remove extra dpu_irq_* wrappers from dpu_kms.c, merge them directly into dpu_core_irq_* functions. Reviewed-by: Abhinav Kumar Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.h | 12 -

[PATCH v2 3/6] drm/msm/dpu: allow just single IRQ callback

2022-02-16 Thread Dmitry Baryshkov
DPU interrupts code allows multiple callbacks per interrut. In reality none of the interrupts is shared between blocks (and will probably never be). Drop support for registering multiple callbacks per interrupt to simplify interrupt handling code. Reported-by: kernel test robot Reported-by:

[PATCH v2 2/6] drm/msm/dpu: remove always-true argument of dpu_core_irq_read()

2022-02-16 Thread Dmitry Baryshkov
The argument clear of the function dpu_core_irq_read() is always true. Remove it. Reviewed-by: Abhinav Kumar Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.h | 4 +--- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 3 +--

[PATCH v2 4/6] drm/msm/dpu: get rid of dpu_encoder_helper_(un)register_irq

2022-02-16 Thread Dmitry Baryshkov
Get rid of dpu_encoder_helper_register_irq/unregister_irq helpers, call dpu_core_register/unregister_callback directly, without surrounding them with helpers. Reviewed-by: Abhinav Kumar Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c

[PATCH v2 0/6] drm/msm/dpu: simplify IRQ helpers

2022-02-16 Thread Dmitry Baryshkov
This is the second part of https://patchwork.freedesktop.org/series/91631/ reworked and cleaned up. Changes since v1: - Use ARRAY_SIZE() rather INTR_IDX_MAX when clearing irq arrays. Changes since the original pull request: - Split applied patches - Add unlikely and WARN_ON in

Re: [PATCH 5/6] drm/msm/dpu: remove struct dpu_encoder_irq

2022-02-16 Thread Dmitry Baryshkov
On 16/02/2022 04:56, Abhinav Kumar wrote: On 2/1/2022 7:10 AM, Dmitry Baryshkov wrote: Remove additional indirection: specify IRQ callbacks and IRQ indices directly rather than through the pointer in the irq structure. For each IRQ we have a constant IRQ callback. This change simplifies code

[PATCH v2 1/7] drm/msm/dpu: fix dp audio condition

2022-02-16 Thread Dmitry Baryshkov
DP audio enablement code which is comparing intf_type, DRM_MODE_ENCODER_TMDS (= 2) with DRM_MODE_CONNECTOR_DisplayPort (= 10). Which would never succeed. Fix it to check for DRM_MODE_ENCODER_TMDS. Fixes: d13e36d7d222 ("drm/msm/dp: add audio support for Display Port on MSM") Reviewed-by: Abhinav

[PATCH v2 7/7] drm/msm/dpu: pull connector from dpu_encoder_phys to dpu_encoder_virt

2022-02-16 Thread Dmitry Baryshkov
All physical encoders used by virtual encoder share the same connector, so pull the connector field from dpu_encoder_phys into dpu_encoder_virt structure. Otherwise code suggests that different phys_encs can have different connectors. Reviewed-by: Abhinav Kumar Reviewed-by: Stephen Boyd

[PATCH v2 4/7] drm/msm/dpu: drop bus_scaling_client field

2022-02-16 Thread Dmitry Baryshkov
We do not use MSM bus client, so drop bus_scaling_client field from dpu_encoder_virt. Reviewed-by: Abhinav Kumar Reviewed-by: Bjorn Andersson Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 2 -- 1 file changed, 2 deletions(-) diff

[PATCH v2 3/7] drm/msm/dpu: remove msm_dp cached in dpu_encoder_virt

2022-02-16 Thread Dmitry Baryshkov
Stop caching msm_dp instance in dpu_encoder_virt since it's not used now. Fixes: 8a3b4c17f863 ("drm/msm/dp: employ bridge mechanism for display enable and disable") Reviewed-by: Abhinav Kumar Reviewed-by: Bjorn Andersson Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov ---

[PATCH v2 5/7] drm/msm/dpu: encoder: drop unused mode_fixup callback

2022-02-16 Thread Dmitry Baryshkov
Both cmd and vid backends provide useless mode_fixup() callback. Drop it. Reviewed-by: Bjorn Andersson Reviewed-by: Abhinav Kumar Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c| 4

[PATCH v2 6/7] drm/msm/dpu: switch dpu_encoder to use atomic_mode_set

2022-02-16 Thread Dmitry Baryshkov
Make dpu_encoder use atomic_mode_set to receive connector and CRTC states as arguments rather than finding connector and CRTC by manually looping through the respective lists. Reviewed-by: Abhinav Kumar Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov ---

[PATCH v2 2/7] drm/msm: move struct msm_display_info to dpu driver

2022-02-16 Thread Dmitry Baryshkov
The msm_display_info structure is not used by the rest of msm driver, so move it into the dpu1 (dpu_encoder.h to be precise). Reviewed-by: Abhinav Kumar Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h | 18 ++

[PATCH v2 0/7] drm/msm/dpu: cleanup dpu encoder code

2022-02-16 Thread Dmitry Baryshkov
This patchset targets DPU encoder code, removing unused artifacts (empty callbacks, MSM bus client id, etc). Changes since v2: - Expand commit message of 7th patch (pull connector from dpu_encoder_phys to dpu_encoder_virt) - Drop intf_type patch for now, as it causes controversy Changes

[pull] radeon, amdgpu drm-fixes-5.17

2022-02-16 Thread Alex Deucher
Hi Dave, Daniel, Fixes for 5.17. The following changes since commit 754e0b0e35608ed5206d6a67a791563c631cec07: Linux 5.17-rc4 (2022-02-13 12:13:30 -0800) are available in the Git repository at: https://gitlab.freedesktop.org/agd5f/linux.git tags/amd-drm-fixes-5.17-2022-02-16 for you to

[PATCH 13/13] drm_print: use DEFINE_DYNAMIC_DEBUG_CLASSBITS for drm.debug

2022-02-16 Thread Jim Cromie
if CONFIG_DRM_USE_DYNAMIC_DEBUG=y, use new macro to create the sysfs bitmap to control drm.debug callsites. DEFINE_DYNAMIC_DEBUG_CLASSBITS( debug, __drm_debug, "p", "drm.debug - control summary", /* inline vector of _ddebug.class_id's to be controlled, max 14 vals */

[PATCH 12/13] drm_print: add _ddebug desc to drm_*dbg prototypes

2022-02-16 Thread Jim Cromie
Add a struct _ddebug ptr to drm_dbg() and drm_dev_dbg() protos. And upgrade the current use of _dynamic_func_call_no_desc(); ie drop the '_no_desc', since the factory macro's callees (these 2 functions) are now expecting the arg. This lets those functions act more like pr_debug(). It also means

[PATCH 11/13] drm_print: prefer bare printk KERN_DEBUG on generic fn

2022-02-16 Thread Jim Cromie
drm_print.c calls pr_debug() just once, from __drm_printfn_debug(), which is a generic/service fn. The callsite is compile-time enabled by DEBUG in both DYNAMIC_DEBUG=y/n builds. For dyndbg builds, reverting this callsite back to bare printk is correcting a few anti-features: 1- callsite is

[PATCH 09/13] drm_print: wrap drm_*_dbg in dyndbg jumplabel

2022-02-16 Thread Jim Cromie
For CONFIG_DRM_USE_DYNAMIC_DEBUG=y, wrap drm_dbg() & drm_dev_dbg() in one of dyndbg's Factory macros: _dynamic_func_call_no_desc(). This makes the (~4000) callsites controllable, typically by class: # 0 is DRM_UT_CORE #> echo module drm class 0 +p > /proc/dynamic_debug/control =N: keeps

[PATCH 10/13] drm_print: refine drm_debug_enabled for dyndbg+jump-label

2022-02-16 Thread Jim Cromie
In order to use dynamic-debug's jump-label optimization in drm-debug, its clarifying to refine drm_debug_enabled into 3 uses: 1. drm_debug_enabled - legacy, public 2. __drm_debug_enabled - optimized for dyndbg jump-label enablement. 3. _drm_debug_enabled - pr_debug instrumented, observable 1.

[PATCH 07/13] drm_print: condense enum drm_debug_category

2022-02-16 Thread Jim Cromie
enum drm_debug_category has 10 "classes", explicitly initialized with 0x-bitmasks which could be simplified as BIT(X)s. But lets go further: use natural enumeration (int, starting at 0), and do the BIT(cat) in drm_debug_enabled(cat) at runtime. While this slightly pessimizes the bit-test, the

[PATCH 08/13] drm_print: interpose drm_*dbg with forwarding macros

2022-02-16 Thread Jim Cromie
drm_dev_dbg() & drm_dbg() sit below the categorized layer of the DRM debug API, and implement most of it. These are good places to insert dynamic-debug jump-label mechanics, allowing DRM to avoid the runtime cost of drm_debug_enabled(). Set up for this by changing the func names by adding '__'

[PATCH 06/13] dyndbg: abstract dyndbg_site_is_printing

2022-02-16 Thread Jim Cromie
Hide flags test in a macro. no functional changes. Signed-off-by: Jim Cromie --- include/linux/dynamic_debug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index 664bb83778d2..106065244f73 100644 ---

[PATCH 05/13] dyndbg: improve change-info to have old and new

2022-02-16 Thread Jim Cromie
move site.flag update after the v4pr_info("change") message, and improve the message to print both old and new flag values. Heres new form: dyndbg: changed net/ipv4/tcp.c:2424 [tcp]tcp_recvmsg_locked pT -> _ Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 11 ++- 1 file changed,

[PATCH 04/13] dyndbg: drop EXPORTed dynamic_debug_exec_queries

2022-02-16 Thread Jim Cromie
This exported fn is effectively obsoleted by Commit:HEAD~2, so remove it. The export was added here: commit a2d375eda771 ("dyndbg: refine export, rename to dynamic_debug_exec_queries()") commit 4c0d77828d4f ("dyndbg: export ddebug_exec_queries") Its intent was to allow drm.debug to use the

[PATCH 03/13] dyndbg: add DEFINE_DYNAMIC_DEBUG_CLASSBITS macro and callbacks

2022-02-16 Thread Jim Cromie
DEFINE_DYNAMIC_DEBUG_CLASSBITS(fsname, var, bitmap_desc, classes..) allows users to create a drm.debug style (bitmap) sysfs interface, to control sets of pr_debug's according to their .class_id's This wraps existing "class" keyword and behavior: echo "module drm -p ; module drm class 0 +p ;

[PATCH 01/13] dyndbg: fix static_branch manipulation

2022-02-16 Thread Jim Cromie
In https://lore.kernel.org/lkml/20211209150910.ga23...@axis.com/ Vincent's patch commented on, and worked around, a bug toggling static_branch's, when a 2nd PRINTK-ish flag was added. The bug results in a premature static_branch_disable when the 1st of 2 flags was disabled. The cited commit

[PATCH 02/13] dyndbg: add class_id field and query support

2022-02-16 Thread Jim Cromie
DRM defines/uses 10 enum drm_debug_category's to create exclusive classes of debug messages. To support this directly in dynamic-debug, add the following: - struct _ddebug.class_id:4 - 4 bits is enough - define _DPRINTK_SITE_UNCLASSED 15 - see below and the query support: - struct

[PATCH 00/12] use dynamic-debug under drm.debug api

2022-02-16 Thread Jim Cromie
drm.debug api provides ~23 macros to issue 10 categories of debug messages, each enabled by a bit in /sys/module/drm/parameters/debug. drm_debug_enabled(category) tests these bits at runtime; while cheap individually, the costs accumulate. For CONFIG_DRM_USE_DYNAMIC_DEBUG=y, this patchset

[PATCH 2/3] drm/msm/dpu: fix error handling around dpu_hw_vbif_init

2022-02-16 Thread Dmitry Baryshkov
Using IS_ERR_OR_NULL() together with PTR_ERR() is a typical mistake. If the value is NULL, then the function will return 0 instead of a proper return code. Moreover dpu_hw_vbif_init() function can not return NULL. So, replace corresponding IS_ERR_OR_NULL() call with IS_ERR(). Signed-off-by:

[PATCH 3/3] drm/msm/dpu: drop VBIF indices

2022-02-16 Thread Dmitry Baryshkov
We do not expect to have other VBIFs. Drop VBIF_n indices and always use VBIF_RT and VBIF_NRT. Signed-off-by: Dmitry Baryshkov --- .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c| 4 +-- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h | 6 ++-- drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c | 36

[PATCH 1/3] drm/msm/dpu: index dpu_kms->hw_vbif using vbif_idx

2022-02-16 Thread Dmitry Baryshkov
Remove loops over hw_vbif. Instead always VBIF's idx as an index in the array. This fixes an error in dpu_kms_hw_init(), where we fill dpu_kms->hw_vbif[i], but check for an error pointer at dpu_kms->hw_vbif[vbif_idx]. Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Signed-off-by: Dmitry

Re: [Freedreno] [REPOST PATCH v4 13/13] drm/msm/dsi: Add support for DSC configuration

2022-02-16 Thread Abhinav Kumar
On 2/10/2022 2:34 AM, Vinod Koul wrote: When DSC is enabled, we need to configure DSI registers accordingly and configure the respective stream compression registers. Add support to calculate the register setting based on DSC params and timing information and configure these registers.

Re: [REPOST PATCH v4 11/13] drm/msm/disp/dpu1: Add DSC support in RM

2022-02-16 Thread Abhinav Kumar
On 2/10/2022 2:34 AM, Vinod Koul wrote: This add the bits in RM to enable the DSC blocks Reviewed-by: Dmitry Baryshkov Signed-off-by: Vinod Koul Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h | 1 + drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c | 56

Re: [REPOST PATCH v4 12/13] drm/msm/dsi: add mode valid callback for dsi_mgr

2022-02-16 Thread Abhinav Kumar
On 2/10/2022 2:34 AM, Vinod Koul wrote: Add a mode valid callback for dsi_mgr for checking mode being valid in case of DSC. For DSC the height and width needs to be multiple of slice, so we check that here Reviewed-by: Dmitry Baryshkov Signed-off-by: Vinod Koul Reviewed-by: Abhinav Kumar

Re: [REPOST PATCH v4 11/13] drm/msm/disp/dpu1: Add DSC support in RM

2022-02-16 Thread Abhinav Kumar
On 2/10/2022 2:34 AM, Vinod Koul wrote: This add the bits in RM to enable the DSC blocks Reviewed-by: Dmitry Baryshkov Signed-off-by: Vinod Koul --Reviewed-by: Abhinav Kumar drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h | 1 + drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c | 56

Re: [REPOST PATCH v4 09/13] drm/msm: Add missing structure documentation

2022-02-16 Thread Abhinav Kumar
On 2/10/2022 2:34 AM, Vinod Koul wrote: Somehow documentation for dspp was missed, so add that Signed-off-by: Vinod Koul Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/msm_drv.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/msm/msm_drv.h

Re: [REPOST PATCH v4 08/13] drm/msm/disp/dpu1: Don't use DSC with mode_3d

2022-02-16 Thread Abhinav Kumar
On 2/10/2022 2:34 AM, Vinod Koul wrote: We cannot enable mode_3d when we are using the DSC. So pass configuration to detect DSC is enabled and not enable mode_3d when we are using DSC We add a helper dpu_encoder_helper_get_dsc() to detect dsc enabled and pass this to .setup_intf_cfg()

Re: [PATCH] drm/bridge: anx7625: Fix release wrong workqueue

2022-02-16 Thread Hsin-Yi Wang
On Thu, Feb 17, 2022 at 10:45 AM Xin Ji wrote: > > From: Xin Ji > > If "hdcp_workqueue" exist, must release "hdcp_workqueue", > not "workqueue". > > Fixes: cd1637c7e480 ("drm/bridge: anx7625: add HDCP support") > Signed-off-by: Xin Ji > --- Reviewed-by: Hsin-Yi Wang This fixes an issue that

[PATCH] drm/bridge: anx7625: Fix release wrong workqueue

2022-02-16 Thread Xin Ji
From: Xin Ji If "hdcp_workqueue" exist, must release "hdcp_workqueue", not "workqueue". Fixes: cd1637c7e480 ("drm/bridge: anx7625: add HDCP support") Signed-off-by: Xin Ji --- drivers/gpu/drm/bridge/analogix/anx7625.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [PATCH v3 2/2] drm/msm/dpu: Add SC8180x to hw catalog

2022-02-16 Thread Dmitry Baryshkov
On 17/02/2022 04:21, Bjorn Andersson wrote: From: Rob Clark Add SC8180x to the hardware catalog, for initial support for the platform. Due to limitations in the DP driver only one of the four DP interfaces is left enabled. The SC8180x platform supports the newly added DPU_INTF_WIDEBUS flag

[PATCH v3 2/2] drm/msm/dpu: Add SC8180x to hw catalog

2022-02-16 Thread Bjorn Andersson
From: Rob Clark Add SC8180x to the hardware catalog, for initial support for the platform. Due to limitations in the DP driver only one of the four DP interfaces is left enabled. The SC8180x platform supports the newly added DPU_INTF_WIDEBUS flag and the Windows-on-Snapdragon bootloader leaves

[PATCH v3 1/2] drm/msm/dpu: Add INTF_5 interrupts

2022-02-16 Thread Bjorn Andersson
SC8180x has the eDP controller wired up to INTF_5, so add the interrupt register block for this interface to the list. Signed-off-by: Bjorn Andersson --- Changes since v2: - None drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c | 6 ++ drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.h |

Re: [PATCH 5/6] drm/msm/dpu: remove struct dpu_encoder_irq

2022-02-16 Thread Dmitry Baryshkov
On 16/02/2022 05:22, Stephen Boyd wrote: Quoting Dmitry Baryshkov (2022-02-01 07:10:55) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h index ff2218155b44..803fd6f25da1 100644 ---

Re: [PATCH v2 8/8] drm/msm/dpu: simplify intf allocation code

2022-02-16 Thread Dmitry Baryshkov
On 15/02/2022 20:51, Abhinav Kumar wrote: On 2/15/2022 6:16 AM, Dmitry Baryshkov wrote: Rather than passing DRM_MODE_ENCODER_* and letting dpu_encoder to guess, which intf type we mean, pass INTF_DSI/INTF_DP directly. Signed-off-by: Dmitry Baryshkov ---  

Re: [PATCH v6 01/10] mm: add zone device coherent type memory support

2022-02-16 Thread Alistair Popple
Jason Gunthorpe writes: > On Wed, Feb 16, 2022 at 09:31:03AM +0100, David Hildenbrand wrote: >> On 16.02.22 03:36, Alistair Popple wrote: >> > On Wednesday, 16 February 2022 1:03:57 PM AEDT Jason Gunthorpe wrote: >> >> On Wed, Feb 16, 2022 at 12:23:44PM +1100, Alistair Popple wrote: >> >> >> >>>

Re: [PATCH] drm/msm/dpu: Disable boot loader configured data paths

2022-02-16 Thread Dmitry Baryshkov
On 15/02/2022 18:15, Bjorn Andersson wrote: On Tue 15 Feb 08:44 CST 2022, Dmitry Baryshkov wrote: On 15/02/2022 07:37, Bjorn Andersson wrote: It's typical for the bootloader to configure CTL_0 for the boot splash or EFIFB, but for non-DSI use cases the DPU driver tend to pick another CTL and

Re: [PATCH v4 1/2] drm/msm/dpu: simplify clocks handling

2022-02-16 Thread Dmitry Baryshkov
On 16/02/2022 05:31, Stephen Boyd wrote: Quoting Dmitry Baryshkov (2022-01-31 13:05:12) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c index 60fe06018581..4d184122d63e 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c +++

Re: [PATCH v4 2/2] drm/msm/dp: rewrite dss_module_power to use bulk clock functions

2022-02-16 Thread Dmitry Baryshkov
On 16/02/2022 05:35, Stephen Boyd wrote: Quoting Dmitry Baryshkov (2022-01-31 13:05:13) diff --git a/drivers/gpu/drm/msm/dp/dp_parser.h b/drivers/gpu/drm/msm/dp/dp_parser.h index 094b39bfed8c..f16072f33cdb 100644 --- a/drivers/gpu/drm/msm/dp/dp_parser.h +++ b/drivers/gpu/drm/msm/dp/dp_parser.h

Re: [PATCH v3 3/3] drm/msm/dp: replace DRM_DEBUG_DP marco with drm_dbg_dp

2022-02-16 Thread Dmitry Baryshkov
On 17/02/2022 03:22, Kuogee Hsieh wrote: On 2/16/2022 3:46 PM, Stephen Boyd wrote: Quoting Kuogee Hsieh (2022-02-02 10:56:39) Please add some commit text Signed-off-by: Kuogee Hsieh ---   drivers/gpu/drm/msm/dp/dp_audio.c   |  49 +++--   drivers/gpu/drm/msm/dp/dp_catalog.c | 

Re: [REPOST PATCH v4 02/13] drm/msm/dsi: Pass DSC params to drm_panel

2022-02-16 Thread Abhinav Kumar
On 2/10/2022 2:34 AM, Vinod Koul wrote: When DSC is enabled, we need to pass the DSC parameters to panel driver as well, so add a dsc parameter in panel and set it when DSC is enabled Also, fetch and pass DSC configuration for DSI panels to DPU encoder, which will enable and configure DSC

Re: [PATCH] drm/msm/dsi/phy: fix 7nm v4.0 settings for C-PHY mode

2022-02-16 Thread Abhinav Kumar
On 2/16/2022 4:08 PM, Dmitry Baryshkov wrote: The dsi_7nm_phy_enable() disagrees with downstream for glbl_str_swi_cal_sel_ctrl and glbl_hstx_str_ctrl_0 values. Update programmed settings to match downstream driver. To remove the possibility for such errors in future drop less_than_1500_mhz

[PATCH V2 12/12] drm: bridge: icn6211: Read and validate chip IDs before configuration

2022-02-16 Thread Marek Vasut
Read out the Vendor/Chip/Version ID registers from the chip before performing any configuration, and validate that the registers have correct values. This is mostly a simple test whether DSI register access does work, since that tends to be broken on various bridges. Signed-off-by: Marek Vasut

[PATCH V2 07/12] drm: bridge: icn6211: Disable DPI color swap

2022-02-16 Thread Marek Vasut
The chip is capable of swapping DPI RGB channels. The driver currently does not implement support for this functionality. Write the MIPI_PN_SWAP register to 0 to assure the color swap is disabled. Signed-off-by: Marek Vasut Cc: Jagan Teki Cc: Maxime Ripard Cc: Robert Foss Cc: Sam Ravnborg

[PATCH V2 08/12] drm: bridge: icn6211: Set SYS_CTRL_1 to value used in examples

2022-02-16 Thread Marek Vasut
Both example code [1], [2] as well as one provided by custom panel vendor set register SYS_CTRL_1 to 0x88. What exactly does the value mean is unknown due to unavailable datasheet. Align this register value with example code. [1]

[PATCH V2 10/12] drm: bridge: icn6211: Add I2C configuration support

2022-02-16 Thread Marek Vasut
The ICN6211 chip starts in I2C configuration mode after cold boot. Implement support for configuring the chip via I2C in addition to the current DSI LP command mode configuration support. The later seems to be available only on chips which have additional MCU on the panel/bridge board which

[PATCH V2 09/12] drm: bridge: icn6211: Implement atomic_get_input_bus_fmts

2022-02-16 Thread Marek Vasut
Implement .atomic_get_input_bus_fmts callback, which sets up the input (DSI-end) format, and that format can then be used in pipeline format negotiation between the DSI-end of this bridge and the other component closer to the scanout engine. Signed-off-by: Marek Vasut Cc: Jagan Teki Cc: Maxime

[PATCH V2 05/12] drm: bridge: icn6211: Add generic DSI-to-DPI PLL configuration

2022-02-16 Thread Marek Vasut
The chip contains fractional PLL, however the driver currently hard-codes one specific PLL setting. Implement generic PLL parameter calculation code, so any DPI panel with arbitrary pixel clock can be attached to this bridge. The datasheet for this bridge is not available, the PLL behavior has

[PATCH V2 11/12] drm: bridge: icn6211: Rework ICN6211_DSI to chipone_writeb()

2022-02-16 Thread Marek Vasut
Rename and inline macro ICN6211_DSI() into function chipone_writeb() to keep all function names lower-case. No functional change. Signed-off-by: Marek Vasut Cc: Jagan Teki Cc: Maxime Ripard Cc: Robert Foss Cc: Sam Ravnborg Cc: Thomas Zimmermann To: dri-devel@lists.freedesktop.org --- V2:

[PATCH V2 03/12] drm: bridge: icn6211: Add HS/VS/DE polarity handling

2022-02-16 Thread Marek Vasut
The driver currently hard-codes HS/VS polarity to active-low and DE to active-high, which is not correct for a lot of supported DPI panels. Add the missing mode flag handling for HS/VS/DE polarity. Signed-off-by: Marek Vasut Cc: Jagan Teki Cc: Maxime Ripard Cc: Robert Foss Cc: Sam Ravnborg

[PATCH V2 06/12] drm: bridge: icn6211: Use DSI burst mode without EoT and with LP command mode

2022-02-16 Thread Marek Vasut
The DSI burst mode is more energy efficient than the DSI sync pulse mode, make use of the burst mode since the chip supports it as well. Disable the generation of EoT packet, the chip ignores it, so no point in emitting it. Enable transmission of data in LP mode, otherwise register read via DSI

[PATCH V2 01/12] drm: bridge: icn6211: Fix register layout

2022-02-16 Thread Marek Vasut
The chip register layout has nothing to do with MIPI DCS, the registers incorrectly marked as MIPI DCS in the driver are regular chip registers often with completely different function. Fill in the actual register names and bits from [1] and [2] and add the entire register layout, since the

[PATCH V2 04/12] drm: bridge: icn6211: Add DSI lane count DT property parsing

2022-02-16 Thread Marek Vasut
The driver currently hard-codes DSI lane count to two, however the chip is capable of operating in 1..4 DSI lanes mode. Parse 'data-lanes' DT property and program the result into DSI_CTRL register. Signed-off-by: Marek Vasut Cc: Jagan Teki Cc: Maxime Ripard Cc: Robert Foss Cc: Sam Ravnborg

[PATCH V2 02/12] drm: bridge: icn6211: Fix HFP_HSW_HBP_HI and HFP_MIN handling

2022-02-16 Thread Marek Vasut
The HFP_HSW_HBP_HI register must be programmed with 2 LSbits of each Horizontal Front Porch/Sync/Back Porch. Currently the driver programs this register to 0, which breaks displays with either value above 255. The HFP_MIN register must be set to the same value as HFP_LI, otherwise there is

[PATCH V2 00/12] drm: bridge: icn6211: Fix hard-coded panel settings and add I2C support

2022-02-16 Thread Marek Vasut
This series fixes multiple problems with the ICN6211 driver and adds support for configuration of the chip via I2C bus. First, in the current state, the ICN6211 driver hard-codes DPI timing and clock settings specific to some unknown panel. The settings provided by panel driver are ignored. Using

Re: [PATCH v3 3/3] drm/msm/dp: replace DRM_DEBUG_DP marco with drm_dbg_dp

2022-02-16 Thread Kuogee Hsieh
On 2/16/2022 3:46 PM, Stephen Boyd wrote: Quoting Kuogee Hsieh (2022-02-02 10:56:39) Please add some commit text Signed-off-by: Kuogee Hsieh --- drivers/gpu/drm/msm/dp/dp_audio.c | 49 +++-- drivers/gpu/drm/msm/dp/dp_catalog.c | 34 +++-

[PATCH] drm/msm/dsi/phy: fix 7nm v4.0 settings for C-PHY mode

2022-02-16 Thread Dmitry Baryshkov
The dsi_7nm_phy_enable() disagrees with downstream for glbl_str_swi_cal_sel_ctrl and glbl_hstx_str_ctrl_0 values. Update programmed settings to match downstream driver. To remove the possibility for such errors in future drop less_than_1500_mhz assignment and specify settings explicitly. Fixes:

Re: [RFC PATCH 1/6] dt-bindings: display: imx: Add EPDC

2022-02-16 Thread Rob Herring
On Mon, Feb 14, 2022 at 11:45:17PM +0100, Andreas Kemnade wrote: > Hi Rob, > > On Fri, 11 Feb 2022 09:46:27 -0600 > Rob Herring wrote: > > > On Sun, Feb 06, 2022 at 09:00:11AM +0100, Andreas Kemnade wrote: > > > Add a binding for the Electrophoretic Display Controller found at least > > > in

  1   2   3   >