[Bug 102553] Venus PRO R9 M265X amdgpu: Kernel OOPS si_dpm_set_power_state unable to handle kernel NULL pointer dereference

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Mar 11 18:51:19 UTC 2018


https://bugs.freedesktop.org/show_bug.cgi?id=102553

--- Comment #9 from mercuriete <mercuriete at yahoo.es> ---
my investigations ends in this macro:
drivers/gpu/drm/amd/amdgpu/amdgpu.h

#define amdgpu_set_pcie_lanes(adev, l)
(adev)->asic_funcs->set_pcie_lanes((adev), (l))


then if you see this file:
drivers/gpu/drm/amd/amdgpu/si.c

static const struct amdgpu_asic_funcs si_asic_funcs =
{
        .read_disabled_bios = &si_read_disabled_bios,
        .read_bios_from_rom = &si_read_bios_from_rom,
        .read_register = &si_read_register,
        .reset = &si_asic_reset,
        .set_vga_state = &si_vga_set_state,
        .get_xclk = &si_get_xclk,
        .set_uvd_clocks = &si_set_uvd_clocks,
        .set_vce_clocks = NULL,
        .get_config_memsize = &si_get_config_memsize,
};

There are no set_pcie_lanes in that struct


so in this file:
drivers/gpu/drm/amd/amdgpu/si_dpm.c

        if (new_lane_width != current_lane_width) {
                amdgpu_set_pcie_lanes(adev, new_lane_width);
                lane_width = amdgpu_get_pcie_lanes(adev);
                si_write_smc_soft_register(adev,
SI_SMC_SOFT_REGISTER_non_ulv_pcie_link_width, lane_width);
        }



You are jumping to null.

Please answer me soon to know if i am wrong or if i am right.



PS: in radeon the implementation of that functions is in this file:

drivers/gpu/drm/radeon/radeon_asic.c

static struct radeon_asic si_asic = { 
...
...
        .pm = {
                .misc = &evergreen_pm_misc,
                .prepare = &evergreen_pm_prepare,
                .finish = &evergreen_pm_finish,
                .init_profile = &sumo_pm_init_profile,
                .get_dynpm_state = &r600_pm_get_dynpm_state,
                .get_engine_clock = &radeon_atom_get_engine_clock,
                .set_engine_clock = &radeon_atom_set_engine_clock,
                .get_memory_clock = &radeon_atom_get_memory_clock,
                .set_memory_clock = &radeon_atom_set_memory_clock,
                .get_pcie_lanes = &r600_get_pcie_lanes,
                .set_pcie_lanes = &r600_set_pcie_lanes,
                .set_clock_gating = NULL,
                .set_uvd_clocks = &si_set_uvd_clocks,
                .set_vce_clocks = &si_set_vce_clocks,
                .get_temperature = &si_get_temp,
        },


r600_set_pcie_lanes is in this file:
drivers/gpu/drm/radeon/r600.c
void r600_set_pcie_lanes(struct radeon_device *rdev, int lanes)
{




PS2: So sumarizing the problem is in the macro
(adev)->asic_funcs->set_pcie_lanes
that doesn't exists.

Thanks you very much

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20180311/5d77c543/attachment.html>


More information about the dri-devel mailing list