Re: [Freedreno] [PATCH v6 4/6] drm/drm_file: Add DRM obj's RSS reporting function for fdinfo

2023-09-27 Thread Tvrtko Ursulin
On 22/09/2023 11:58, Adrián Larumbe wrote: On 20.09.2023 16:53, Tvrtko Ursulin wrote: On 20/09/2023 00:34, Adrián Larumbe wrote: Some BO's might be mapped onto physical memory chunkwise and on demand, like Panfrost's tiler heap. In this case, even though the drm_gem_shmem_object page array m

Re: [Freedreno] [PATCH v3 1/7] drm/msm/dp: tie dp_display_irq_handler() with dp driver

2023-09-27 Thread Kuogee Hsieh
On 9/23/2023 11:45 AM, Dmitry Baryshkov wrote: On Sat, 23 Sept 2023 at 02:03, Kuogee Hsieh wrote: On 9/15/2023 5:29 PM, Dmitry Baryshkov wrote: On Sat, 16 Sept 2023 at 00:38, Kuogee Hsieh wrote: Currently the dp_display_irq_handler() is executed at msm_dp_modeset_init() which ties irq reg

[Freedreno] [PATCH v4 0/8] incorporate pm runtime framework and eDP clean up

2023-09-27 Thread Kuogee Hsieh
Incorporate pm runtime framework into DP driver and clean up eDP by moving of_dp_aux_populate_bus() to probe(). Kuogee Hsieh (8): drm/msm/dp: tie dp_display_irq_handler() with dp driver drm/msm/dp: rename is_connected with link_ready drm/msm/dp: use drm_bridge_hpd_notify() to report HPD stat

[Freedreno] [PATCH v4 2/8] drm/msm/dp: rename is_connected with link_ready

2023-09-27 Thread Kuogee Hsieh
The is_connected flag is set to true after DP mainlink successfully finishes link training to enter into ST_MAINLINK_READY state. Rename the is_connected flag with link_ready flag to match the state of DP driver's state machine. Changes in v4: -- reworded commit etxt Signed-off-by: Kuogee Hsieh

[Freedreno] [PATCH v4 1/8] drm/msm/dp: tie dp_display_irq_handler() with dp driver

2023-09-27 Thread Kuogee Hsieh
Currently the dp_display_irq_handler() is executed at msm_dp_modeset_init() which ties irq registration to the DPU device's life cycle, while depending on resources that are released as the DP device is torn down. Move register DP driver irq handler at dp_display_probe() to have dp_display_irq_hand

[Freedreno] [PATCH v4 4/8] drm/msm/dp: move parser->parse() and dp_power_client_init() to probe

2023-09-27 Thread Kuogee Hsieh
Move parser->parse() and dp_power_client_init() from dp_display_bind() to dp_display_probe() in preparation of adding pm_runtime framework at next patch. Changes in v4: -- split this patch out of "incorporate pm_runtime framework into DP driver" patch Signed-off-by: Kuogee Hsieh --- drivers/gp

[Freedreno] [PATCH v4 5/8] drm/msm/dp: incorporate pm_runtime framework into DP driver

2023-09-27 Thread Kuogee Hsieh
Currently DP driver is executed independent of PM runtime framework. This lead to msm edp panel can not be detected by edp_panel driver at generic_edp_panel_probe() due to aux dpcd read failed at msm edp driver. Incorporating pm runtime framework into DP driver so that both power and clocks to enab

[Freedreno] [PATCH v4 6/8] drm/msm/dp: delete EV_HPD_INIT_SETUP

2023-09-27 Thread Kuogee Hsieh
EV_HPD_INIT_SETUP flag is used to trigger the initialization of external DP host controller. Since external DP host controller initialization had been incorporated into pm_runtime_resume(), this flag became obsolete. msm_dp_irq_postinstall() which triggers EV_HPD_INIT_SETUP event is obsoleted accor

[Freedreno] [PATCH v4 8/8] drm/msm/dp: move of_dp_aux_populate_bus() to eDP probe()

2023-09-27 Thread Kuogee Hsieh
Currently eDP population is done at msm_dp_modeset_init() which happen at binding time. Move eDP population to be done at display probe time so that probe deferral cases can be handled effectively. wait_for_hpd_asserted callback is added during drm_dp_aux_init() to ensure eDP's HPD is up before pro

[Freedreno] [PATCH v4 3/8] drm/msm/dp: use drm_bridge_hpd_notify() to report HPD status changes

2023-09-27 Thread Kuogee Hsieh
Currently DP driver use drm_helper_hpd_irq_event(), bypassing drm bridge framework, to report HPD status changes to user space frame work. Replace it with drm_bridge_hpd_notify() since DP driver is part of drm bridge. Signed-off-by: Kuogee Hsieh Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm

[Freedreno] [PATCH v4 7/8] drm/msm/dp: add pm_runtime_force_suspend()/resume()

2023-09-27 Thread Kuogee Hsieh
After incorporated pm_runtime framework into eDP/DP driver, the original dp_pm_suspend() to handle power off both DP phy and controller during suspend and dp_pm_resume() to handle power on both DP phy and controller during resume are not necessary since those function are replaced by dp_pm_runtime_

Re: [Freedreno] [PATCH v4 1/8] drm/msm/dp: tie dp_display_irq_handler() with dp driver

2023-09-27 Thread Dmitry Baryshkov
On Wed, 27 Sept 2023 at 23:54, Kuogee Hsieh wrote: > > Currently the dp_display_irq_handler() is executed at msm_dp_modeset_init() dp_display_request_irq() > which ties irq registration to the DPU device's life cycle, while depending on > resources that are released as the DP device is torn down

Re: [Freedreno] [PATCH v4 0/8] incorporate pm runtime framework and eDP clean up

2023-09-27 Thread Dmitry Baryshkov
On Wed, 27 Sept 2023 at 23:54, Kuogee Hsieh wrote: > > Incorporate pm runtime framework into DP driver and clean up eDP > by moving of_dp_aux_populate_bus() to probe(). Dear Kuogee. Let me quote my response to v1 of your series: Please use sensible prefix for cover letters too. It helps people u

Re: [Freedreno] [PATCH v4 2/8] drm/msm/dp: rename is_connected with link_ready

2023-09-27 Thread Dmitry Baryshkov
On Wed, 27 Sept 2023 at 23:54, Kuogee Hsieh wrote: > > The is_connected flag is set to true after DP mainlink successfully > finishes link training to enter into ST_MAINLINK_READY state. ... rather than being set after the DP dongle is connected. > Rename > the is_connected flag with link_ready

Re: [Freedreno] [PATCH v4 4/8] drm/msm/dp: move parser->parse() and dp_power_client_init() to probe

2023-09-27 Thread Dmitry Baryshkov
On Wed, 27 Sept 2023 at 23:54, Kuogee Hsieh wrote: > > Move parser->parse() and dp_power_client_init() from dp_display_bind() > to dp_display_probe() in preparation of adding pm_runtime framework > at next patch. This describes what the patch does, not why it is done. Could you please rewrite it

Re: [Freedreno] [PATCH v4 4/8] drm/msm/dp: move parser->parse() and dp_power_client_init() to probe

2023-09-27 Thread Dmitry Baryshkov
On Wed, 27 Sept 2023 at 23:54, Kuogee Hsieh wrote: > > Move parser->parse() and dp_power_client_init() from dp_display_bind() > to dp_display_probe() in preparation of adding pm_runtime framework > at next patch. > > Changes in v4: > -- split this patch out of "incorporate pm_runtime framework int

[Freedreno] [PATCH v7 3/5] drm/panfrost: Add fdinfo support for memory stats

2023-09-27 Thread Adrián Larumbe
A new DRM GEM object function is added so that drm_show_memory_stats can provide more accurate memory usage numbers. Ideally, in panfrost_gem_status, the BO's purgeable flag would be checked after locking the driver's shrinker mutex, but drm_show_memory_stats takes over the drm file's object handl

[Freedreno] [PATCH v7 0/5] Add fdinfo support to Panfrost

2023-09-27 Thread Adrián Larumbe
This patch series adds fdinfo support to the Panfrost DRM driver. It will display a series of key:value pairs under /proc/pid/fdinfo/fd for render processes that open the Panfrost DRM file. The pairs contain basic drm gpu engine and memory region information that can either be cat by a privileged

[Freedreno] [PATCH v7 2/5] drm/panfrost: Add fdinfo support GPU load metrics

2023-09-27 Thread Adrián Larumbe
The drm-stats fdinfo tags made available to user space are drm-engine, drm-cycles, drm-max-freq and drm-curfreq, one per job slot. This deviates from standard practice in other DRM drivers, where a single set of key:value pairs is provided for the whole render engine. However, Panfrost has separat

[Freedreno] [PATCH v7 5/5] drm/panfrost: Implement generic DRM object RSS reporting function

2023-09-27 Thread Adrián Larumbe
BO's RSS is updated every time new pages are allocated on demand and mapped for the object at GPU page fault's IRQ handler, but only for heap buffers. The reason this is unnecessary for non-heap buffers is that they are mapped onto the GPU's VA space and backed by physical memory in their entirety

[Freedreno] [PATCH v7 1/5] drm/panfrost: Add cycle count GPU register definitions

2023-09-27 Thread Adrián Larumbe
These GPU registers will be used when programming the cycle counter, which we need for providing accurate fdinfo drm-cycles values to user space. Signed-off-by: Adrián Larumbe Reviewed-by: Boris Brezillon Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_regs.h | 5 + 1 file

[Freedreno] [PATCH v7 4/5] drm/drm_file: Add DRM obj's RSS reporting function for fdinfo

2023-09-27 Thread Adrián Larumbe
Some BO's might be mapped onto physical memory chunkwise and on demand, like Panfrost's tiler heap. In this case, even though the drm_gem_shmem_object page array might already be allocated, only a very small fraction of the BO is currently backed by system memory, but drm_show_memory_stats will the

Re: [Freedreno] [PATCH v3 6/7] drm/msm/dp: add pm_runtime_force_suspend()/resume()

2023-09-27 Thread Stephen Boyd
Quoting Abhinav Kumar (2023-09-22 18:35:27) > On 9/22/2023 2:54 PM, Stephen Boyd wrote: > > Quoting Dmitry Baryshkov (2023-09-19 02:50:12) > >> > >> This should be hpd_notify, who starts link training, not some event. > > > > I think this driver should train the link during atomic_enable(), not > >

Re: [Freedreno] [PATCH v4 5/8] drm/msm/dp: incorporate pm_runtime framework into DP driver

2023-09-27 Thread Dmitry Baryshkov
On Wed, 27 Sept 2023 at 23:54, Kuogee Hsieh wrote: > > Currently DP driver is executed independent of PM runtime framework. > This lead to msm edp panel can not be detected by edp_panel driver at > generic_edp_panel_probe() due to aux dpcd read failed at msm edp driver. eDP, AUX, DPCD. leads. not

Re: [Freedreno] [PATCH v4 0/8] incorporate pm runtime framework and eDP clean up

2023-09-27 Thread Kuogee Hsieh
sorry, just found that my email filter setting has problem which always store cover letter patch to different folder than other patches. In addition, it looks like patchwork doesn't track comments in the cover letter. This cause I missed you comments. I will address your comments at next p

Re: [Freedreno] [PATCH v4 8/8] drm/msm/dp: move of_dp_aux_populate_bus() to eDP probe()

2023-09-27 Thread Dmitry Baryshkov
On Wed, 27 Sept 2023 at 23:54, Kuogee Hsieh wrote: > > Currently eDP population is done at msm_dp_modeset_init() which happen > at binding time. Move eDP population to be done at display probe time > so that probe deferral cases can be handled effectively. > wait_for_hpd_asserted callback is added

Re: [Freedreno] [PATCH v4 0/8] incorporate pm runtime framework and eDP clean up

2023-09-27 Thread Dmitry Baryshkov
On Thu, 28 Sept 2023 at 00:44, Kuogee Hsieh wrote: > > sorry, > > just found that my email filter setting has problem which always store cover > letter patch to different folder than other patches. > > In addition, it looks like patchwork doesn't track comments in the cover > letter. > > This ca

Re: [Freedreno] [PATCH v4 7/8] drm/msm/dp: add pm_runtime_force_suspend()/resume()

2023-09-27 Thread Dmitry Baryshkov
On Wed, 27 Sept 2023 at 23:54, Kuogee Hsieh wrote: > > After incorporated pm_runtime framework into eDP/DP driver, the incorporating > original dp_pm_suspend() to handle power off both DP phy and > controller during suspend and dp_pm_resume() to handle power on > both DP phy and controller duri

Re: [Freedreno] [PATCH v3 6/7] drm/msm/dp: add pm_runtime_force_suspend()/resume()

2023-09-27 Thread Stephen Boyd
Quoting Kuogee Hsieh (2023-09-25 09:07:18) > > On 9/22/2023 6:35 PM, Abhinav Kumar wrote: > > > > Doing link training when we get hpd instead of atomic_enable() is a > > design choice we have been following for a while because for the case > > when link training fails in atomic_enable() and setting

Re: [Freedreno] [PATCH v3 6/7] drm/msm/dp: add pm_runtime_force_suspend()/resume()

2023-09-27 Thread Dmitry Baryshkov
On Thu, 28 Sept 2023 at 01:01, Stephen Boyd wrote: > > Quoting Kuogee Hsieh (2023-09-25 09:07:18) > > > > On 9/22/2023 6:35 PM, Abhinav Kumar wrote: > > > > > > Doing link training when we get hpd instead of atomic_enable() is a > > > design choice we have been following for a while because for th