diff --git a/drivers/gpu/nvgpu/clk/clk_fll.c b/drivers/gpu/nvgpu/clk/clk_fll.c index 8231348a9..3ab98917f 100644 --- a/drivers/gpu/nvgpu/clk/clk_fll.c +++ b/drivers/gpu/nvgpu/clk/clk_fll.c @@ -257,16 +257,20 @@ static int devinit_get_fll_device_table(struct gk20a *g, nvgpu_memcpy((u8 *)&fll_desc_table_header_sz, fll_table_ptr, sizeof(struct fll_descriptor_header)); - if (fll_desc_table_header_sz.size >= FLL_DESCRIPTOR_HEADER_10_SIZE_6) { - desctablesize = FLL_DESCRIPTOR_HEADER_10_SIZE_6; + if (fll_desc_table_header_sz.size >= FLL_DESCRIPTOR_HEADER_10_SIZE_7) { + desctablesize = FLL_DESCRIPTOR_HEADER_10_SIZE_7; } else { - desctablesize = FLL_DESCRIPTOR_HEADER_10_SIZE_4; + if (fll_desc_table_header_sz.size == FLL_DESCRIPTOR_HEADER_10_SIZE_6) { + desctablesize = FLL_DESCRIPTOR_HEADER_10_SIZE_6; + } else { + desctablesize = FLL_DESCRIPTOR_HEADER_10_SIZE_4; + } } nvgpu_memcpy((u8 *)&fll_desc_table_header, fll_table_ptr, desctablesize); - if (desctablesize == FLL_DESCRIPTOR_HEADER_10_SIZE_6) { + if (desctablesize >= FLL_DESCRIPTOR_HEADER_10_SIZE_6) { pfllobjs->max_min_freq_mhz = fll_desc_table_header.max_min_freq_mhz; } else { diff --git a/drivers/gpu/nvgpu/include/nvgpu/bios.h b/drivers/gpu/nvgpu/include/nvgpu/bios.h index af80ae5a9..4b29ce99d 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/bios.h +++ b/drivers/gpu/nvgpu/include/nvgpu/bios.h @@ -90,6 +90,7 @@ struct fll_descriptor_header { #define FLL_DESCRIPTOR_HEADER_10_SIZE_4 4U #define FLL_DESCRIPTOR_HEADER_10_SIZE_6 6U +#define FLL_DESCRIPTOR_HEADER_10_SIZE_7 7U struct fll_descriptor_header_10 { u8 version;