[PATCH] drm/mediatek: Implement shutdown

2022-11-28 Thread Ricardo Ribalda
Poweroff the device properly, otherwise the device will not come back
from kexec().

Signed-off-by: Ricardo Ribalda 
---
To: Chun-Kuang Hu 
To: Philipp Zabel 
To: David Airlie 
To: Daniel Vetter 
To: Matthias Brugger 
Cc: dri-devel@lists.freedesktop.org
Cc: linux-media...@lists.infradead.org
Cc: linux-arm-ker...@lists.infradead.org
Cc: linux-ker...@vger.kernel.org
---
 drivers/gpu/drm/mediatek/mtk_drm_drv.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c 
b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
index 91f58db5915f..51dbd85796e9 100644
--- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c
+++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
@@ -829,6 +829,12 @@ static int mtk_drm_remove(struct platform_device *pdev)
return 0;
 }
 
+static void mtk_drm_shutdown(struct platform_device *pdev)
+{
+   component_master_del(&pdev->dev, &mtk_drm_ops);
+   pm_runtime_disable(&pdev->dev);
+}
+
 static int mtk_drm_sys_prepare(struct device *dev)
 {
struct mtk_drm_private *private = dev_get_drvdata(dev);
@@ -856,6 +862,7 @@ static const struct dev_pm_ops mtk_drm_pm_ops = {
 static struct platform_driver mtk_drm_platform_driver = {
.probe  = mtk_drm_probe,
.remove = mtk_drm_remove,
+   .shutdown = mtk_drm_shutdown,
.driver = {
.name   = "mediatek-drm",
.pm = &mtk_drm_pm_ops,

---
base-commit: 4312098baf37ee17a8350725e6e0d0e8590252d4
change-id: 20221128-mtk-drm-ca6c5ac6b389

Best regards,
-- 
Ricardo Ribalda 


Re: [PATCH v2 RESEND] adreno: Shutdown the GPU properly

2023-01-10 Thread Ricardo Ribalda
On Mon, 9 Jan 2023 at 23:25, Joel Fernandes (Google)
 wrote:
>
> During kexec on ARM device, we notice that device_shutdown() only calls
> pm_runtime_force_suspend() while shutting down the GPU. This means the GPU
> kthread is still running and further, there maybe active submits.
>
> This causes all kinds of issues during a kexec reboot:
>
> Warning from shutdown path:
>
> [  292.509662] WARNING: CPU: 0 PID: 6304 at [...] 
> adreno_runtime_suspend+0x3c/0x44
> [  292.509863] Hardware name: Google Lazor (rev3 - 8) with LTE (DT)
> [  292.509872] pstate: 8049 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
> [  292.509881] pc : adreno_runtime_suspend+0x3c/0x44
> [  292.509891] lr : pm_generic_runtime_suspend+0x30/0x44
> [  292.509905] sp : ffc014473bf0
> [...]
> [  292.510043] Call trace:
> [  292.510051]  adreno_runtime_suspend+0x3c/0x44
> [  292.510061]  pm_generic_runtime_suspend+0x30/0x44
> [  292.510071]  pm_runtime_force_suspend+0x54/0xc8
> [  292.510081]  adreno_shutdown+0x1c/0x28
> [  292.510090]  platform_shutdown+0x2c/0x38
> [  292.510104]  device_shutdown+0x158/0x210
> [  292.510119]  kernel_restart_prepare+0x40/0x4c
>
> And here from GPU kthread, an SError OOPs:
>
> [  192.648789]  el1h_64_error+0x7c/0x80
> [  192.648812]  el1_interrupt+0x20/0x58
> [  192.648833]  el1h_64_irq_handler+0x18/0x24
> [  192.648854]  el1h_64_irq+0x7c/0x80
> [  192.648873]  local_daif_inherit+0x10/0x18
> [  192.648900]  el1h_64_sync_handler+0x48/0xb4
> [  192.648921]  el1h_64_sync+0x7c/0x80
> [  192.648941]  a6xx_gmu_set_oob+0xbc/0x1fc
> [  192.648968]  a6xx_hw_init+0x44/0xe38
> [  192.648991]  msm_gpu_hw_init+0x48/0x80
> [  192.649013]  msm_gpu_submit+0x5c/0x1a8
> [  192.649034]  msm_job_run+0xb0/0x11c
> [  192.649058]  drm_sched_main+0x170/0x434
> [  192.649086]  kthread+0x134/0x300
> [  192.649114]  ret_from_fork+0x10/0x20
>
> Fix by calling adreno_system_suspend() in the device_shutdown() path.
>
> [ Applied Rob Clark feedback on fixing adreno_unbind() similarly, also
>   tested as above. ]
>
> Cc: Rob Clark 
> Cc: Steven Rostedt 
> Cc: Ricardo Ribalda 
> Cc: Ross Zwisler 
Reviewed-by: Ricardo Ribalda 
> Signed-off-by: Joel Fernandes (Google) 
> ---
>  drivers/gpu/drm/msm/adreno/adreno_device.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c 
> b/drivers/gpu/drm/msm/adreno/adreno_device.c
> index 628806423f7d..36f062c7582f 100644
> --- a/drivers/gpu/drm/msm/adreno/adreno_device.c
> +++ b/drivers/gpu/drm/msm/adreno/adreno_device.c
> @@ -551,13 +551,14 @@ static int adreno_bind(struct device *dev, struct 
> device *master, void *data)
> return 0;
>  }
>
> +static int adreno_system_suspend(struct device *dev);
>  static void adreno_unbind(struct device *dev, struct device *master,
> void *data)
>  {
> struct msm_drm_private *priv = dev_get_drvdata(master);
> struct msm_gpu *gpu = dev_to_gpu(dev);
>
> -   pm_runtime_force_suspend(dev);
> +   WARN_ON_ONCE(adreno_system_suspend(dev));
> gpu->funcs->destroy(gpu);
>
> priv->gpu_pdev = NULL;
> @@ -609,7 +610,7 @@ static int adreno_remove(struct platform_device *pdev)
>
>  static void adreno_shutdown(struct platform_device *pdev)
>  {
> -   pm_runtime_force_suspend(&pdev->dev);
> +   WARN_ON_ONCE(adreno_system_suspend(&pdev->dev));
>  }
>
>  static const struct of_device_id dt_match[] = {
> --
> 2.39.0.314.g84b9a713c41-goog
>


-- 
Ricardo Ribalda


[PATCH 00/14] Remove unused structure amd_pp_display_configuration

2017-07-24 Thread Ricardo Ribalda Delgado
While trying to fix the error message

amdgpu: [powerplay] min_core_set_clock not set

on my carizzo board. I Realized that the structure display_config was never
set and therefore a lot of code could be simplified.

Also due to display_config never set, the error message was invalid.

Other people referencing it:

http://www.mikejonesey.co.uk/linux/optimisation/amd-carrizo-powerplay-this-function-not-implement

Ricardo Ribalda Delgado (14):
  amdgpu: powerplay: Remove unused function
  amdgpu: powerplay: Remove unused function
  amdgpu: powerplay: cz_hwmgr: Fix invalid error message.
  amdgpu: powerplay: smu7_hwmgr: Assume display_config is zero
  amdgpu: powerplay: fiji_smc: Assume display_config is zero
  amdgpu: powerplay: iceland_smc: Assume display_config is zero
  amdgpu: powerplay: polaris10_smc: Assume display_config is zero
  amdgpu: powerplay: tonga_smc: Assume display_config is zero
  amdgpu: powerplay: rv_hwmgr: Assume display_config is zero
  amdgpu: powerplay: vega10_hwmgr: Assume display_config is zero
  amdgpu: ci_dpm: Assume pm_display_cfg is zero
  amdgpu: powerplay: hwmgr: Remove unused field
  amdgpu: amdgpu_dpm: Remove unused field
  amdgpu: powerplay: Remove unused structure

 drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h|  1 -
 drivers/gpu/drm/amd/amdgpu/ci_dpm.c|  6 ---
 drivers/gpu/drm/amd/powerplay/amd_powerplay.c  | 21 ---
 .../gpu/drm/amd/powerplay/eventmgr/eventtasks.c|  1 -
 drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 20 +++---
 .../gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c  | 25 -
 drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c |  2 -
 drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c   | 10 ++---
 drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 18 +++--
 drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h  | 43 --
 .../gpu/drm/amd/powerplay/inc/hardwaremanager.h|  3 --
 drivers/gpu/drm/amd/powerplay/inc/hwmgr.h  |  1 -
 drivers/gpu/drm/amd/powerplay/smumgr/fiji_smc.c|  5 +--
 drivers/gpu/drm/amd/powerplay/smumgr/iceland_smc.c |  3 +-
 .../gpu/drm/amd/powerplay/smumgr/polaris10_smc.c   |  5 +--
 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smc.c   |  3 +-
 16 files changed, 20 insertions(+), 147 deletions(-)

-- 
2.13.2

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH 01/14] amdgpu: powerplay: Remove unused function

2017-07-24 Thread Ricardo Ribalda Delgado
amd_powerplay_display_configuration_change is never called.

Signed-off-by: Ricardo Ribalda Delgado 
---
 drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 21 -
 drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h |  3 ---
 2 files changed, 24 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c 
b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
index f73e80c4bf33..1ee7aa5546bf 100644
--- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
+++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
@@ -1237,27 +1237,6 @@ int amd_powerplay_reset(void *handle)
return pem_handle_event(eventmgr, AMD_PP_EVENT_COMPLETE_INIT, 
&event_data);
 }
 
-/* export this function to DAL */
-
-int amd_powerplay_display_configuration_change(void *handle,
-   const struct amd_pp_display_configuration *display_config)
-{
-   struct pp_hwmgr  *hwmgr;
-   struct pp_instance *pp_handle = (struct pp_instance *)handle;
-   int ret = 0;
-
-   ret = pp_check(pp_handle);
-
-   if (ret != 0)
-   return ret;
-
-   hwmgr = pp_handle->hwmgr;
-   mutex_lock(&pp_handle->pp_lock);
-   phm_store_dal_configuration_data(hwmgr, display_config);
-   mutex_unlock(&pp_handle->pp_lock);
-   return 0;
-}
-
 int amd_powerplay_get_display_power_level(void *handle,
struct amd_pp_simple_clock_info *output)
 {
diff --git a/drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h 
b/drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h
index 07e9c0b5915d..ae49af5cc5d1 100644
--- a/drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h
+++ b/drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h
@@ -407,9 +407,6 @@ int amd_powerplay_destroy(void *handle);
 
 int amd_powerplay_reset(void *handle);
 
-int amd_powerplay_display_configuration_change(void *handle,
-   const struct amd_pp_display_configuration *input);
-
 int amd_powerplay_get_display_power_level(void *handle,
struct amd_pp_simple_clock_info *output);
 
-- 
2.13.2

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH 02/14] amdgpu: powerplay: Remove unused function

2017-07-24 Thread Ricardo Ribalda Delgado
phm_store_dal_configuration_data is not used anymore.

Remove also reference on comments to the function

Signed-off-by: Ricardo Ribalda Delgado 
---
 .../gpu/drm/amd/powerplay/eventmgr/eventtasks.c|  1 -
 .../gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c  | 25 --
 .../gpu/drm/amd/powerplay/inc/hardwaremanager.h|  3 ---
 3 files changed, 29 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.c 
b/drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.c
index 8c4ebaae1e0c..eeb155036c40 100644
--- a/drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.c
+++ b/drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.c
@@ -193,7 +193,6 @@ int pem_task_store_dal_configuration(struct pp_eventmgr 
*eventmgr, const struct
 {
/* TODO */
return 0;
-   /*phm_store_dal_configuration_data(eventmgr->hwmgr, display_config) */
 }
 
 int pem_task_notify_hw_mgr_display_configuration_change(struct pp_eventmgr 
*eventmgr, struct pem_event_data *event_data)
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c 
b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
index fcc722ea7649..c747fbd34073 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
@@ -320,31 +320,6 @@ int phm_check_states_equal(struct pp_hwmgr *hwmgr,
return hwmgr->hwmgr_func->check_states_equal(hwmgr, pstate1, pstate2, 
equal);
 }
 
-int phm_store_dal_configuration_data(struct pp_hwmgr *hwmgr,
-   const struct amd_pp_display_configuration *display_config)
-{
-   PHM_FUNC_CHECK(hwmgr);
-
-   if (display_config == NULL)
-   return -EINVAL;
-
-   hwmgr->display_config = *display_config;
-
-   if (hwmgr->hwmgr_func->store_cc6_data == NULL)
-   return -EINVAL;
-
-   /* TODO: pass other display configuration in the future */
-
-   if (hwmgr->hwmgr_func->store_cc6_data)
-   hwmgr->hwmgr_func->store_cc6_data(hwmgr,
-   display_config->cpu_pstate_separation_time,
-   display_config->cpu_cc6_disable,
-   display_config->cpu_pstate_disable,
-   display_config->nb_pstate_switch_disable);
-
-   return 0;
-}
-
 int phm_get_dal_power_level(struct pp_hwmgr *hwmgr,
struct amd_pp_simple_clock_info *info)
 {
diff --git a/drivers/gpu/drm/amd/powerplay/inc/hardwaremanager.h 
b/drivers/gpu/drm/amd/powerplay/inc/hardwaremanager.h
index a1ebe1014492..ebddcdce323c 100644
--- a/drivers/gpu/drm/amd/powerplay/inc/hardwaremanager.h
+++ b/drivers/gpu/drm/amd/powerplay/inc/hardwaremanager.h
@@ -397,9 +397,6 @@ extern int phm_check_states_equal(struct pp_hwmgr *hwmgr,
 const struct pp_hw_power_state *pstate2,
 bool *equal);
 
-extern int phm_store_dal_configuration_data(struct pp_hwmgr *hwmgr,
-   const struct amd_pp_display_configuration *display_config);
-
 extern int phm_get_dal_power_level(struct pp_hwmgr *hwmgr,
struct amd_pp_simple_clock_info *info);
 
-- 
2.13.2

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH 04/14] amdgpu: powerplay: smu7_hwmgr: Assume display_config is zero

2017-07-24 Thread Ricardo Ribalda Delgado
display_config is never set, so we can assume it is zero.

Signed-off-by: Ricardo Ribalda Delgado 
---
 drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 17 +++--
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c 
b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
index 1f01020ce3a9..893e6e846284 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
@@ -2727,9 +2727,6 @@ static int smu7_apply_state_adjust_rules(struct pp_hwmgr 
*hwmgr,
 
cgs_get_active_displays_info(hwmgr->device, &info);
 
-   minimum_clocks.engineClock = hwmgr->display_config.min_core_set_clock;
-   minimum_clocks.memoryClock = hwmgr->display_config.min_mem_set_clock;
-
if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
PHM_PlatformCaps_StablePState)) {
max_limits = &(hwmgr->dyn_state.max_clock_voltage_on_ac);
@@ -3928,7 +3925,7 @@ smu7_notify_smc_display_config_after_ps_adjustment(struct 
pp_hwmgr *hwmgr)
 
num_active_displays = info.display_count;
 
-   if (num_active_displays > 1 && 
hwmgr->display_config.multi_monitor_in_sync != true)
+   if (num_active_displays > 1)
smu7_notify_smc_display_change(hwmgr, false);
 
return 0;
@@ -4032,12 +4029,12 @@ 
smu7_check_smc_update_required_for_display_configuration(struct pp_hwmgr *hwmgr)
if (data->display_timing.num_existing_displays != info.display_count)
is_update_required = true;
 
-   if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, 
PHM_PlatformCaps_SclkDeepSleep)) {
-   if (data->display_timing.min_clock_in_sr != 
hwmgr->display_config.min_core_set_clock_in_sr &&
-   (data->display_timing.min_clock_in_sr >= 
SMU7_MINIMUM_ENGINE_CLOCK ||
-   hwmgr->display_config.min_core_set_clock_in_sr >= 
SMU7_MINIMUM_ENGINE_CLOCK))
-   is_update_required = true;
-   }
+   if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
+   PHM_PlatformCaps_SclkDeepSleep) &&
+   data->display_timing.min_clock_in_sr &&
+   data->display_timing.min_clock_in_sr >= SMU7_MINIMUM_ENGINE_CLOCK)
+   is_update_required = true;
+
return is_update_required;
 }
 
-- 
2.13.2

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH 03/14] amdgpu: powerplay: cz_hwmgr: Fix invalid error message.

2017-07-24 Thread Ricardo Ribalda Delgado
display_config is never set, therefore we can assume it is zero.

Without this fix, the user will get the following invalid warning on its
dmesg:

amdgpu: [powerplay] min_core_set_clock not set.

Signed-off-by: Ricardo Ribalda Delgado 
---
 drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 20 ++--
 1 file changed, 6 insertions(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c 
b/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c
index 0b74da3dca8b..418f6bf33bb5 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c
@@ -720,12 +720,8 @@ static int cz_tf_update_sclk_limit(struct pp_hwmgr *hwmgr,
else
cz_hwmgr->sclk_dpm.soft_max_clk  = table->entries[table->count 
- 1].clk;
 
-   clock = hwmgr->display_config.min_core_set_clock;
-   if (clock == 0)
-   pr_info("min_core_set_clock not set\n");
-
-   if (cz_hwmgr->sclk_dpm.hard_min_clk != clock) {
-   cz_hwmgr->sclk_dpm.hard_min_clk = clock;
+   if (cz_hwmgr->sclk_dpm.hard_min_clk) {
+   cz_hwmgr->sclk_dpm.hard_min_clk = 0;
 
smum_send_msg_to_smc_with_parameter(hwmgr->smumgr,
PPSMC_MSG_SetSclkHardMin,
@@ -780,15 +776,13 @@ static int cz_tf_set_deep_sleep_sclk_threshold(struct 
pp_hwmgr *hwmgr,
 {
if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
PHM_PlatformCaps_SclkDeepSleep)) {
-   uint32_t clks = hwmgr->display_config.min_core_set_clock_in_sr;
-   if (clks == 0)
-   clks = CZ_MIN_DEEP_SLEEP_SCLK;
 
-   PP_DBG_LOG("Setting Deep Sleep Clock: %d\n", clks);
+   PP_DBG_LOG("Setting Deep Sleep Clock: %d\n",
+  CZ_MIN_DEEP_SLEEP_SCLK);
 
smum_send_msg_to_smc_with_parameter(hwmgr->smumgr,
PPSMC_MSG_SetMinDeepSleepSclk,
-   clks);
+   CZ_MIN_DEEP_SLEEP_SCLK);
}
 
return 0;
@@ -1120,9 +1114,7 @@ static int cz_apply_state_adjust_rules(struct pp_hwmgr 
*hwmgr,
 
cz_hwmgr->battery_state = (PP_StateUILabel_Battery == 
prequest_ps->classification.ui_label);
 
-   clocks.memoryClock = hwmgr->display_config.min_mem_set_clock != 0 ?
-   hwmgr->display_config.min_mem_set_clock :
-   cz_hwmgr->sys_info.nbp_memory_clock[1];
+   clocks.memoryClock = cz_hwmgr->sys_info.nbp_memory_clock[1];
 
cgs_get_active_displays_info(hwmgr->device, &info);
num_of_active_displays = info.display_count;
-- 
2.13.2

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH 07/14] amdgpu: powerplay: polaris10_smc: Assume display_config is zero

2017-07-24 Thread Ricardo Ribalda Delgado
display_config is never set, we can assume it is zero.

Signed-off-by: Ricardo Ribalda Delgado 
---
 drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smc.c | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smc.c 
b/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smc.c
index f68e759e8be2..c889fc930cfc 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smc.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smc.c
@@ -711,11 +711,12 @@ static int polaris10_populate_single_graphic_level(struct 
pp_hwmgr *hwmgr,
level->DownHyst = 0;
level->VoltageDownHyst = 0;
level->PowerThrottle = 0;
-   data->display_timing.min_clock_in_sr = 
hwmgr->display_config.min_core_set_clock_in_sr;
+   data->display_timing.min_clock_in_sr = 0;
 
-   if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, 
PHM_PlatformCaps_SclkDeepSleep))
-   level->DeepSleepDivId = 
smu7_get_sleep_divider_id_from_clock(clock,
-   
hwmgr->display_config.min_core_set_clock_in_sr);
+   if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
+   PHM_PlatformCaps_SclkDeepSleep))
+   level->DeepSleepDivId =
+   smu7_get_sleep_divider_id_from_clock(clock, 0);
 
/* Default to slow, highest DPM level will be
 * set to PPSMC_DISPLAY_WATERMARK_LOW later.
-- 
2.13.2

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH 06/14] amdgpu: powerplay: iceland_smc: Assume display_config is zero

2017-07-24 Thread Ricardo Ribalda Delgado
display_config is never set, we can assume it is zero.

Signed-off-by: Ricardo Ribalda Delgado 
---
 drivers/gpu/drm/amd/powerplay/smumgr/iceland_smc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smc.c 
b/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smc.c
index 51adf04ab4b3..dce87fc13e0c 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smc.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smc.c
@@ -780,8 +780,7 @@ static int iceland_populate_single_graphic_level(struct 
pp_hwmgr *hwmgr,
graphic_level->VoltageDownHyst = 0;
graphic_level->PowerThrottle = 0;
 
-   data->display_timing.min_clock_in_sr =
-   hwmgr->display_config.min_core_set_clock_in_sr;
+   data->display_timing.min_clock_in_sr = 0;
 
if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
PHM_PlatformCaps_SclkDeepSleep))
-- 
2.13.2

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH 05/14] amdgpu: powerplay: fiji_smc: Assume display_config is zero

2017-07-24 Thread Ricardo Ribalda Delgado
display_config is never set, so we can assume it is zero.

Signed-off-by: Ricardo Ribalda Delgado 
---
 drivers/gpu/drm/amd/powerplay/smumgr/fiji_smc.c | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/fiji_smc.c 
b/drivers/gpu/drm/amd/powerplay/smumgr/fiji_smc.c
index 6a320b27aefd..befd5c304636 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/fiji_smc.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/fiji_smc.c
@@ -742,11 +742,12 @@ static int fiji_populate_single_graphic_level(struct 
pp_hwmgr *hwmgr,
 
threshold = clock * data->fast_watermark_threshold / 100;
 
-   data->display_timing.min_clock_in_sr = 
hwmgr->display_config.min_core_set_clock_in_sr;
+   data->display_timing.min_clock_in_sr = 0;
 
-   if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, 
PHM_PlatformCaps_SclkDeepSleep))
-   level->DeepSleepDivId = 
smu7_get_sleep_divider_id_from_clock(clock,
-   
hwmgr->display_config.min_core_set_clock_in_sr);
+   if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
+   PHM_PlatformCaps_SclkDeepSleep))
+   level->DeepSleepDivId =
+   smu7_get_sleep_divider_id_from_clock(clock, 0);
 
 
/* Default to slow, highest DPM level will be
-- 
2.13.2

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH 09/14] amdgpu: powerplay: rv_hwmgr: Assume display_config is zero

2017-07-24 Thread Ricardo Ribalda Delgado
display_config is never set, so we can assume that it is zero.

Signed-off-by: Ricardo Ribalda Delgado 
---
 drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c 
b/drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c
index 4c7f430b36eb..64a3cb66a3a0 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c
@@ -241,8 +241,6 @@ static int rv_tf_set_clock_limit(struct pp_hwmgr *hwmgr, 
void *input,
struct PP_Clocks clocks = {0};
struct pp_display_clock_request clock_req;
 
-   clocks.dcefClock = hwmgr->display_config.min_dcef_set_clk;
-   clocks.dcefClockInSR = 
hwmgr->display_config.min_dcef_deep_sleep_set_clk;
clock_req.clock_type = amd_pp_dcf_clock;
clock_req.clock_freq_in_khz = clocks.dcefClock * 10;
 
-- 
2.13.2

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH 08/14] amdgpu: powerplay: tonga_smc: Assume display_config is zero

2017-07-24 Thread Ricardo Ribalda Delgado
display_config is never set, we can assume it is zero.

Signed-off-by: Ricardo Ribalda Delgado 
---
 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smc.c 
b/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smc.c
index 65d3a4893958..341c31c63e5e 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smc.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smc.c
@@ -562,8 +562,7 @@ static int tonga_populate_single_graphic_level(struct 
pp_hwmgr *hwmgr,
graphic_level->VoltageDownHyst = 0;
graphic_level->PowerThrottle = 0;
 
-   data->display_timing.min_clock_in_sr =
-   hwmgr->display_config.min_core_set_clock_in_sr;
+   data->display_timing.min_clock_in_sr = 0;
 
if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
PHM_PlatformCaps_SclkDeepSleep))
-- 
2.13.2

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH 10/14] amdgpu: powerplay: vega10_hwmgr: Assume display_config is zero

2017-07-24 Thread Ricardo Ribalda Delgado
display_config is never set, so we can assume that it is zero

Signed-off-by: Ricardo Ribalda Delgado 
---
 drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 19 ++-
 1 file changed, 6 insertions(+), 13 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c 
b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
index d6f097f44b6c..dd73ab7e5cfe 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
@@ -3044,8 +3044,6 @@ static int vega10_apply_state_adjust_rules(struct 
pp_hwmgr *hwmgr,
cgs_get_active_displays_info(hwmgr->device, &info);
 
/* result = PHM_CheckVBlankTime(hwmgr, &vblankTooShort);*/
-   minimum_clocks.engineClock = hwmgr->display_config.min_core_set_clock;
-   minimum_clocks.memoryClock = hwmgr->display_config.min_mem_set_clock;
 
if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
PHM_PlatformCaps_StablePState)) {
@@ -4000,10 +3998,6 @@ static int 
vega10_notify_smc_display_config_after_ps_adjustment(
else
vega10_notify_smc_display_change(hwmgr, true);
 
-   min_clocks.dcefClock = hwmgr->display_config.min_dcef_set_clk;
-   min_clocks.dcefClockInSR = 
hwmgr->display_config.min_dcef_deep_sleep_set_clk;
-   min_clocks.memoryClock = hwmgr->display_config.min_mem_set_clock;
-
for (i = 0; i < dpm_table->count; i++) {
if (dpm_table->dpm_levels[i].value == min_clocks.dcefClock)
break;
@@ -4634,20 +4628,19 @@ static bool
 vega10_check_smc_update_required_for_display_configuration(struct pp_hwmgr 
*hwmgr)
 {
struct vega10_hwmgr *data = (struct vega10_hwmgr *)(hwmgr->backend);
-   bool is_update_required = false;
struct cgs_display_info info = {0, 0, NULL};
 
cgs_get_active_displays_info(hwmgr->device, &info);
 
if (data->display_timing.num_existing_displays != info.display_count)
-   is_update_required = true;
+   return true;
 
-   if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, 
PHM_PlatformCaps_SclkDeepSleep)) {
-   if (data->display_timing.min_clock_in_sr != 
hwmgr->display_config.min_core_set_clock_in_sr)
-   is_update_required = true;
-   }
+   if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
+   PHM_PlatformCaps_SclkDeepSleep) &&
+   data->display_timing.min_clock_in_sr)
+   return true;
 
-   return is_update_required;
+   return false;
 }
 
 static int vega10_disable_dpm_tasks(struct pp_hwmgr *hwmgr)
-- 
2.13.2

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH 11/14] amdgpu: ci_dpm: Assume pm_display_cfg is zero

2017-07-24 Thread Ricardo Ribalda Delgado
pm_display_cfg is never set, so we can assume that it is zero

Signed-off-by: Ricardo Ribalda Delgado 
---
 drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 6 --
 1 file changed, 6 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c 
b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c
index cb508a211b2f..8319bca3dc52 100644
--- a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c
+++ b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c
@@ -972,12 +972,6 @@ static void ci_apply_state_adjust_rules(struct 
amdgpu_device *adev,
sclk = ps->performance_levels[0].sclk;
}
 
-   if (adev->pm.pm_display_cfg.min_core_set_clock > sclk)
-   sclk = adev->pm.pm_display_cfg.min_core_set_clock;
-
-   if (adev->pm.pm_display_cfg.min_mem_set_clock > mclk)
-   mclk = adev->pm.pm_display_cfg.min_mem_set_clock;
-
if (rps->vce_active) {
if (sclk < adev->pm.dpm.vce_states[adev->pm.dpm.vce_level].sclk)
sclk = 
adev->pm.dpm.vce_states[adev->pm.dpm.vce_level].sclk;
-- 
2.13.2

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH 12/14] amdgpu: powerplay: hwmgr: Remove unused field

2017-07-24 Thread Ricardo Ribalda Delgado
Remove unused field display_config

Signed-off-by: Ricardo Ribalda Delgado 
---
 drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h 
b/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
index 47e57bd2c36f..220bb8cde530 100644
--- a/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
+++ b/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
@@ -779,7 +779,6 @@ struct pp_hwmgr {
struct pp_power_state*request_ps;
struct pp_power_state*boot_ps;
struct pp_power_state*uvd_ps;
-   struct amd_pp_display_configuration display_config;
uint32_t feature_mask;
 
/* power profile */
-- 
2.13.2

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH 13/14] amdgpu: amdgpu_dpm: Remove unused field

2017-07-24 Thread Ricardo Ribalda Delgado
Remove unused field pm_display_cfg

Signed-off-by: Ricardo Ribalda Delgado 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h
index 8c96a4caa715..5c740814dba4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h
@@ -488,7 +488,6 @@ struct amdgpu_pm {
const struct amdgpu_dpm_funcs *funcs;
uint32_tpcie_gen_mask;
uint32_tpcie_mlw_mask;
-   struct amd_pp_display_configuration pm_display_cfg;/* set by DAL */
 };
 
 #define R600_SSTU_DFLT   0
-- 
2.13.2

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH 14/14] amdgpu: powerplay: Remove unused structure

2017-07-24 Thread Ricardo Ribalda Delgado
Remove unused structure definition amd_pp_display_configuration.

Signed-off-by: Ricardo Ribalda Delgado 
---
 drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h | 40 ---
 1 file changed, 40 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h 
b/drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h
index ae49af5cc5d1..6b6f2f7c8527 100644
--- a/drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h
+++ b/drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h
@@ -191,46 +191,6 @@ struct single_display_configuration
 
 #define MAX_NUM_DISPLAY 32
 
-struct amd_pp_display_configuration {
-   bool nb_pstate_switch_disable;/* controls NB PState switch */
-   bool cpu_cc6_disable; /* controls CPU CState switch ( on or off) */
-   bool cpu_pstate_disable;
-   uint32_t cpu_pstate_separation_time;
-
-   uint32_t num_display;  /* total number of display*/
-   uint32_t num_path_including_non_display;
-   uint32_t crossfire_display_index;
-   uint32_t min_mem_set_clock;
-   uint32_t min_core_set_clock;
-   /* unit 10KHz x bit*/
-   uint32_t min_bus_bandwidth;
-   /* minimum required stutter sclk, in 10khz uint32_t ulMinCoreSetClk;*/
-   uint32_t min_core_set_clock_in_sr;
-
-   struct single_display_configuration displays[MAX_NUM_DISPLAY];
-
-   uint32_t vrefresh; /* for active display*/
-
-   uint32_t min_vblank_time; /* for active display*/
-   bool multi_monitor_in_sync;
-   /* Controller Index of primary display - used in MCLK SMC switching hang
-* SW Workaround*/
-   uint32_t crtc_index;
-   /* htotal*1000/pixelclk - used in MCLK SMC switching hang SW 
Workaround*/
-   uint32_t line_time_in_us;
-   bool invalid_vblank_time;
-
-   uint32_t display_clk;
-   /*
-* for given display configuration if multimonitormnsync == false then
-* Memory clock DPMS with this latency or below is allowed, DPMS with
-* higher latency not allowed.
-*/
-   uint32_t dce_tolerable_mclk_in_active_latency;
-   uint32_t min_dcef_set_clk;
-   uint32_t min_dcef_deep_sleep_set_clk;
-};
-
 struct amd_pp_simple_clock_info {
uint32_tengine_max_clock;
uint32_tmemory_max_clock;
-- 
2.13.2

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 01/14] amdgpu: powerplay: Remove unused function

2017-07-24 Thread Ricardo Ribalda Delgado
Hi Harry
On Mon, Jul 24, 2017 at 4:01 PM, Harry Wentland  wrote:

>
> This is used and needed by the DC display driver. See
> display/amdgpu_dm/amdgpu_dm_services.c:193 in Alex's amd-staging-4.11 tree:
>
> https://cgit.freedesktop.org/~agd5f/linux/tree/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c?h=amd-staging-4.11
>

I could not find any reference to the function in linux-next (>4.12)

https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/gpu/drm/amd

Is there any plan to merge Alex's amd-stagin tree?

Sorry, I am not very familiar with this subsystem.

Regards!
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 01/14] amdgpu: powerplay: Remove unused function

2017-07-26 Thread Ricardo Ribalda Delgado
Hi Harry

On Mon, Jul 24, 2017 at 5:45 PM, Harry Wentland 
wrote:

> On 2017-07-24 10:06 AM, Ricardo Ribalda Delgado wrote:
> > Hi Harry
> > On Mon, Jul 24, 2017 at 4:01 PM, Harry Wentland 
> wrote:
> >
> >>
> >> This is used and needed by the DC display driver. See
> >> display/amdgpu_dm/amdgpu_dm_services.c:193 in Alex's amd-staging-4.11
> tree:
> >>
> >> https://cgit.freedesktop.org/~agd5f/linux/tree/drivers/gpu/
> drm/amd/display/amdgpu_dm/amdgpu_dm_services.c?h=amd-staging-4.11
> >>
> >
> > I could not find any reference to the function in linux-next (>4.12)
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/next/
> linux-next.git/tree/drivers/gpu/drm/amd
> >
> > Is there any plan to merge Alex's amd-stagin tree?
>
> The plan is to merge/upstream the amd/display portion of Alex's
> amd-staging tree. We're currently working on the community feedback we
> received to get it into shape.
>


Is there any timeframe for this?

 At least we should remove the   pr_info("min_core_set_clock not set\n");
message.

it is (very) misleading right now.

Regards!


> Harry
>
> >
> > Sorry, I am not very familiar with this subsystem.
> >
> > Regards!
> >
>



-- 
Ricardo Ribalda
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 01/14] amdgpu: powerplay: Remove unused function

2017-07-26 Thread Ricardo Ribalda Delgado
Hi Harry

On Mon, Jul 24, 2017 at 5:45 PM, Harry Wentland  wrote:
> On 2017-07-24 10:06 AM, Ricardo Ribalda Delgado wrote:
>> Hi Harry
>> On Mon, Jul 24, 2017 at 4:01 PM, Harry Wentland  
>> wrote:
>>
>>>
>>> This is used and needed by the DC display driver. See
>>> display/amdgpu_dm/amdgpu_dm_services.c:193 in Alex's amd-staging-4.11 tree:
>>>
>>> https://cgit.freedesktop.org/~agd5f/linux/tree/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c?h=amd-staging-4.11
>>>
>>
>> I could not find any reference to the function in linux-next (>4.12)
>>
>> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/gpu/drm/amd
>>
>> Is there any plan to merge Alex's amd-stagin tree?
>
> The plan is to merge/upstream the amd/display portion of Alex's
> amd-staging tree. We're currently working on the community feedback we
> received to get it into shape.

Is there any timeframe for this?

 At least we should remove the   pr_info("min_core_set_clock not
set\n"); message.

it is (very) misleading right now.

Regards!

>
> Harry
>
>>
>> Sorry, I am not very familiar with this subsystem.
>>
>> Regards!
>>



-- 
Ricardo Ribalda
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


4.14 + amdgpupro opencl: sleepng function called:

2017-12-14 Thread Ricardo Ribalda Delgado
Hi

I am trying to use amdgpupro opencl on top of amdgpu and everything
seems to run fine except this OOPS that I get once per execution:

[  120.180229] BUG: sleeping function called from invalid context at
/var/lib/jenkins/workspace/qt5122-dyspro/build/tmp/work-shared/qt5122/kernel-source/mm/slab.h:421
[  120.181159] in_atomic(): 1, irqs_disabled(): 0, pid: 677, name: clinfo
[  120.181979] CPU: 1 PID: 677 Comm: clinfo Not tainted 4.14.0-qtec-standard #1
[  120.181979] Hardware name: AMD FP4/FP4, BIOS qtec 12/29/2016
[  120.181980] Call Trace:
[  120.181987]  dump_stack+0x4d/0x67
[  120.181990]  ___might_sleep+0xdf/0x100
[  120.181991]  __might_sleep+0x4a/0x80
[  120.181994]  __kmalloc+0x118/0x1d0
[  120.181997]  ? reservation_object_copy_fences+0x38/0x100
[  120.181998]  reservation_object_copy_fences+0x38/0x100
[  120.182006]  ttm_bo_unref+0x12b/0x330 [ttm]
[  120.182045]  amdgpu_bo_unref+0x2a/0x50 [amdgpu]
[  120.182063]  amdgpu_vm_free_levels+0x2b/0x60 [amdgpu]
[  120.182081]  amdgpu_vm_free_levels+0x48/0x60 [amdgpu]
[  120.182098]  amdgpu_vm_fini+0x201/0x280 [amdgpu]
[  120.182113]  amdgpu_driver_postclose_kms+0x111/0x1f0 [amdgpu]
[  120.182133]  drm_release+0x265/0x380 [drm]
[  120.182136]  __fput+0xbe/0x200
[  120.182137]  fput+0xe/0x10
[  120.182139]  task_work_run+0x99/0xd0
[  120.182142]  do_exit+0x2e6/0xb70
[  120.182143]  ? __do_page_fault+0x273/0x4f0
[  120.182145]  do_group_exit+0x3b/0xb0
[  120.182146]  SyS_exit_group+0x14/0x20
[  120.182148]  do_syscall_64+0x74/0x1d0
[  120.182150]  entry_SYSCALL64_slow_path+0x25/0x25
[  120.182151] RIP: 0033:0x3586ebec80
[  120.182152] RSP: 002b:7fff00ca6cf8 EFLAGS: 0246 ORIG_RAX:
00e7
[  120.182154] RAX: ffda RBX:  RCX: 003586ebec80
[  120.182154] RDX:  RSI: 003c RDI: 
[  120.182155] RBP: 0035871a28b8 R08: 00e7 R09: ff78
[  120.182156] R10: 003588c15168 R11: 0246 R12: 0035871a28b8
[  120.182156] R13: 0035871a7d40 R14:  R15: 
[  212.756710] BUG: sleeping function called from invalid context at
/var/lib/jenkins/workspace/qt5122-dyspro/build/tmp/work-shared/qt5122/kernel-source/mm/slab.h:421
[  212.758876] in_atomic(): 1, irqs_disabled(): 0, pid: 678, name: clpeak
[  212.760986] CPU: 3 PID: 678 Comm: clpeak Tainted: GW
4.14.0-qtec-standard #1
[  212.760987] Hardware name: AMD FP4/FP4, BIOS qtec 12/29/2016
[  212.760989] Call Trace:
[  212.761004]  dump_stack+0x4d/0x67
[  212.761012]  ___might_sleep+0xdf/0x100
[  212.761017]  __might_sleep+0x4a/0x80
[  212.761024]  __kmalloc+0x118/0x1d0
[  212.761030]  ? reservation_object_copy_fences+0x38/0x100
[  212.761038]  reservation_object_copy_fences+0x38/0x100
[  212.761054]  ttm_bo_unref+0x12b/0x330 [ttm]
[  212.761117]  amdgpu_bo_unref+0x2a/0x50 [amdgpu]
[  212.761160]  amdgpu_vm_free_levels+0x2b/0x60 [amdgpu]
[  212.761206]  amdgpu_vm_free_levels+0x48/0x60 [amdgpu]
[  212.761252]  amdgpu_vm_fini+0x201/0x280 [amdgpu]
[  212.761289]  amdgpu_driver_postclose_kms+0x111/0x1f0 [amdgpu]
[  212.761320]  drm_release+0x265/0x380 [drm]
[  212.761324]  __fput+0xbe/0x200
[  212.761328]  fput+0xe/0x10
[  212.761331]  task_work_run+0x99/0xd0
[  212.761336]  do_exit+0x2e6/0xb70
[  212.761339]  ? __do_page_fault+0x273/0x4f0
[  212.761342]  do_group_exit+0x3b/0xb0
[  212.761345]  SyS_exit_group+0x14/0x20
[  212.761348]  do_syscall_64+0x74/0x1d0
[  212.761352]  entry_SYSCALL64_slow_path+0x25/0x25
[  212.761354] RIP: 0033:0x3586ebec80
[  212.761356] RSP: 002b:7ffecb885588 EFLAGS: 0246 ORIG_RAX:
00e7
[  212.761359] RAX: ffda RBX:  RCX: 003586ebec80
[  212.761361] RDX:  RSI: 003c RDI: 
[  212.761363] RBP: 0035871a28b8 R08: 00e7 R09: ff58
[  212.761364] R10: 003588c15168 R11: 0246 R12: 0035871a28b8
[  212.761365] R13: 0035871a7d40 R14:  R15: 


before I start digging in the code: have someone seen this issue before?

Thanks!


-- 
Ricardo Ribalda
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


HDMI/ DP analyser

2019-03-06 Thread Ricardo Ribalda Delgado
Hello!

I want to debug an hdmi output from a radeon graphic cards.
xrandr shows that the resoution is set to the edid detailed mode, but
the screen says that the output is out of range
I do not know if I can blame the adapter, the hdmi->dp cable or the screen
therefore I would like to buy an hdmi anayser. Any recommended hardware?

Thanks!

-- 
Ricardo Ribalda
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

nouveau: w520 dock station: link training failed

2014-07-16 Thread Ricardo Ribalda Delgado
Hi

I am trying to use a external monitor connected via display port to
the dock station of a w520. Unfortunately nothing is on the screen and
dmesg outputs:

[  520.916021] nouveau E[   PDISP][:01:00.0] DP:0006:0344: link
training failed


If I connect it to the DP port on the notebook it works as expected
and the dmesg outputs:
[  562.099298] nouveau E[ DRM] DDC responded, but no EDID for DP-1

I am using Linux pili 3.14-1-amd64 #1 SMP Debian 3.14.12-1
(2014-07-11) x86_64 GNU/Linux

The dock station works perfectly with the proprietary driver from nvidia

Is this a known bug? How can I provide a more detailed bug report?


Regards!

-- 
Ricardo Ribalda


nouveau: w520 dock station: link training failed

2014-07-16 Thread Ricardo Ribalda Delgado
Hello LLia do you have any way of building new drivers into old kernel
trees like the media-build?

http://git.linuxtv.org/cgit.cgi/media_build.git/tree/README

Thanks

On Wed, Jul 16, 2014 at 2:12 PM, Ilia Mirkin  wrote:
> On Wed, Jul 16, 2014 at 7:30 AM, Ricardo Ribalda Delgado
>  wrote:
>> Hi
>>
>> I am trying to use a external monitor connected via display port to
>> the dock station of a w520. Unfortunately nothing is on the screen and
>> dmesg outputs:
>>
>> [  520.916021] nouveau E[   PDISP][:01:00.0] DP:0006:0344: link
>> training failed
>>
>>
>> If I connect it to the DP port on the notebook it works as expected
>> and the dmesg outputs:
>> [  562.099298] nouveau E[ DRM] DDC responded, but no EDID for DP-1
>>
>> I am using Linux pili 3.14-1-amd64 #1 SMP Debian 3.14.12-1
>> (2014-07-11) x86_64 GNU/Linux
>>
>> The dock station works perfectly with the proprietary driver from nvidia
>>
>> Is this a known bug? How can I provide a more detailed bug report?
>
> Please give 3.16-rc5 a shot. A considerable amount of rework has gone
> into 3.16 for DP support on nouveau. If you're still having issues,
> take a look at http://nouveau.freedesktop.org/wiki/Bugs/ for
> information on filing bugs.
>
>   -ilia



-- 
Ricardo Ribalda


nouveau: w520 dock station: link training failed

2014-07-16 Thread Ricardo Ribalda Delgado
I have tried with .16-rc5 from linus tree.

After installing and restarting: Exactly the same behaviour: dmesg
complains about link error and about 10 secs later whole system
crash :S

So I power cycle the machine and everything works perfectly. Both
connectors, notebook and dock.  :)

I could try to replicate the error if you are interested.

Is there any plans to backport whatever fixed this issue to Long Term
Support kernel tree?

Thanks!




On Wed, Jul 16, 2014 at 3:33 PM, Maarten Lankhorst
 wrote:
> op 16-07-14 15:00, Ilia Mirkin schreef:
>> On Wed, Jul 16, 2014 at 8:22 AM, Ricardo Ribalda Delgado
>>  wrote:
>>> Hello LLia do you have any way of building new drivers into old kernel
>>> trees like the media-build?
>> Nope, sorry. You could try just copying over the drm directory, but
>> it's unlikely to yield positive results. Just build a fresh kernel.
>>
> There's https://backports.wiki.kernel.org/index.php/Main_Page ;-)
>
> But it's a nasty piece of work, just use a newer kernel please.
>



-- 
Ricardo Ribalda