Commit 0a93eeb5 authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Jani Nikula

drm/i915/bios: Rename find_section to find_bdb_section

This prevents a namespace collision on other archs.
Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230315121924.2314693-1-jani.nikula@intel.com
parent cf6c422b
...@@ -141,7 +141,7 @@ struct bdb_block_entry { ...@@ -141,7 +141,7 @@ struct bdb_block_entry {
}; };
static const void * static const void *
find_section(struct drm_i915_private *i915, bdb_find_section(struct drm_i915_private *i915,
enum bdb_block_id section_id) enum bdb_block_id section_id)
{ {
struct bdb_block_entry *entry; struct bdb_block_entry *entry;
...@@ -201,7 +201,7 @@ static size_t lfp_data_min_size(struct drm_i915_private *i915) ...@@ -201,7 +201,7 @@ static size_t lfp_data_min_size(struct drm_i915_private *i915)
const struct bdb_lvds_lfp_data_ptrs *ptrs; const struct bdb_lvds_lfp_data_ptrs *ptrs;
size_t size; size_t size;
ptrs = find_section(i915, BDB_LVDS_LFP_DATA_PTRS); ptrs = bdb_find_section(i915, BDB_LVDS_LFP_DATA_PTRS);
if (!ptrs) if (!ptrs)
return 0; return 0;
...@@ -630,7 +630,7 @@ static int vbt_get_panel_type(struct drm_i915_private *i915, ...@@ -630,7 +630,7 @@ static int vbt_get_panel_type(struct drm_i915_private *i915,
{ {
const struct bdb_lvds_options *lvds_options; const struct bdb_lvds_options *lvds_options;
lvds_options = find_section(i915, BDB_LVDS_OPTIONS); lvds_options = bdb_find_section(i915, BDB_LVDS_OPTIONS);
if (!lvds_options) if (!lvds_options)
return -1; return -1;
...@@ -671,11 +671,11 @@ static int pnpid_get_panel_type(struct drm_i915_private *i915, ...@@ -671,11 +671,11 @@ static int pnpid_get_panel_type(struct drm_i915_private *i915,
dump_pnp_id(i915, edid_id, "EDID"); dump_pnp_id(i915, edid_id, "EDID");
ptrs = find_section(i915, BDB_LVDS_LFP_DATA_PTRS); ptrs = bdb_find_section(i915, BDB_LVDS_LFP_DATA_PTRS);
if (!ptrs) if (!ptrs)
return -1; return -1;
data = find_section(i915, BDB_LVDS_LFP_DATA); data = bdb_find_section(i915, BDB_LVDS_LFP_DATA);
if (!data) if (!data)
return -1; return -1;
...@@ -791,7 +791,7 @@ parse_panel_options(struct drm_i915_private *i915, ...@@ -791,7 +791,7 @@ parse_panel_options(struct drm_i915_private *i915,
int panel_type = panel->vbt.panel_type; int panel_type = panel->vbt.panel_type;
int drrs_mode; int drrs_mode;
lvds_options = find_section(i915, BDB_LVDS_OPTIONS); lvds_options = bdb_find_section(i915, BDB_LVDS_OPTIONS);
if (!lvds_options) if (!lvds_options)
return; return;
...@@ -881,11 +881,11 @@ parse_lfp_data(struct drm_i915_private *i915, ...@@ -881,11 +881,11 @@ parse_lfp_data(struct drm_i915_private *i915,
const struct lvds_pnp_id *pnp_id; const struct lvds_pnp_id *pnp_id;
int panel_type = panel->vbt.panel_type; int panel_type = panel->vbt.panel_type;
ptrs = find_section(i915, BDB_LVDS_LFP_DATA_PTRS); ptrs = bdb_find_section(i915, BDB_LVDS_LFP_DATA_PTRS);
if (!ptrs) if (!ptrs)
return; return;
data = find_section(i915, BDB_LVDS_LFP_DATA); data = bdb_find_section(i915, BDB_LVDS_LFP_DATA);
if (!data) if (!data)
return; return;
...@@ -932,7 +932,7 @@ parse_generic_dtd(struct drm_i915_private *i915, ...@@ -932,7 +932,7 @@ parse_generic_dtd(struct drm_i915_private *i915,
if (i915->display.vbt.version < 229) if (i915->display.vbt.version < 229)
return; return;
generic_dtd = find_section(i915, BDB_GENERIC_DTD); generic_dtd = bdb_find_section(i915, BDB_GENERIC_DTD);
if (!generic_dtd) if (!generic_dtd)
return; return;
...@@ -1011,7 +1011,7 @@ parse_lfp_backlight(struct drm_i915_private *i915, ...@@ -1011,7 +1011,7 @@ parse_lfp_backlight(struct drm_i915_private *i915,
int panel_type = panel->vbt.panel_type; int panel_type = panel->vbt.panel_type;
u16 level; u16 level;
backlight_data = find_section(i915, BDB_LVDS_BACKLIGHT); backlight_data = bdb_find_section(i915, BDB_LVDS_BACKLIGHT);
if (!backlight_data) if (!backlight_data)
return; return;
...@@ -1119,14 +1119,14 @@ parse_sdvo_panel_data(struct drm_i915_private *i915, ...@@ -1119,14 +1119,14 @@ parse_sdvo_panel_data(struct drm_i915_private *i915,
if (index == -1) { if (index == -1) {
const struct bdb_sdvo_lvds_options *sdvo_lvds_options; const struct bdb_sdvo_lvds_options *sdvo_lvds_options;
sdvo_lvds_options = find_section(i915, BDB_SDVO_LVDS_OPTIONS); sdvo_lvds_options = bdb_find_section(i915, BDB_SDVO_LVDS_OPTIONS);
if (!sdvo_lvds_options) if (!sdvo_lvds_options)
return; return;
index = sdvo_lvds_options->panel_type; index = sdvo_lvds_options->panel_type;
} }
dtds = find_section(i915, BDB_SDVO_PANEL_DTDS); dtds = bdb_find_section(i915, BDB_SDVO_PANEL_DTDS);
if (!dtds) if (!dtds)
return; return;
...@@ -1162,7 +1162,7 @@ parse_general_features(struct drm_i915_private *i915) ...@@ -1162,7 +1162,7 @@ parse_general_features(struct drm_i915_private *i915)
{ {
const struct bdb_general_features *general; const struct bdb_general_features *general;
general = find_section(i915, BDB_GENERAL_FEATURES); general = bdb_find_section(i915, BDB_GENERAL_FEATURES);
if (!general) if (!general)
return; return;
...@@ -1285,7 +1285,7 @@ parse_driver_features(struct drm_i915_private *i915) ...@@ -1285,7 +1285,7 @@ parse_driver_features(struct drm_i915_private *i915)
{ {
const struct bdb_driver_features *driver; const struct bdb_driver_features *driver;
driver = find_section(i915, BDB_DRIVER_FEATURES); driver = bdb_find_section(i915, BDB_DRIVER_FEATURES);
if (!driver) if (!driver)
return; return;
...@@ -1322,7 +1322,7 @@ parse_panel_driver_features(struct drm_i915_private *i915, ...@@ -1322,7 +1322,7 @@ parse_panel_driver_features(struct drm_i915_private *i915,
{ {
const struct bdb_driver_features *driver; const struct bdb_driver_features *driver;
driver = find_section(i915, BDB_DRIVER_FEATURES); driver = bdb_find_section(i915, BDB_DRIVER_FEATURES);
if (!driver) if (!driver)
return; return;
...@@ -1362,7 +1362,7 @@ parse_power_conservation_features(struct drm_i915_private *i915, ...@@ -1362,7 +1362,7 @@ parse_power_conservation_features(struct drm_i915_private *i915,
if (i915->display.vbt.version < 228) if (i915->display.vbt.version < 228)
return; return;
power = find_section(i915, BDB_LFP_POWER); power = bdb_find_section(i915, BDB_LFP_POWER);
if (!power) if (!power)
return; return;
...@@ -1402,7 +1402,7 @@ parse_edp(struct drm_i915_private *i915, ...@@ -1402,7 +1402,7 @@ parse_edp(struct drm_i915_private *i915,
const struct edp_fast_link_params *edp_link_params; const struct edp_fast_link_params *edp_link_params;
int panel_type = panel->vbt.panel_type; int panel_type = panel->vbt.panel_type;
edp = find_section(i915, BDB_EDP); edp = bdb_find_section(i915, BDB_EDP);
if (!edp) if (!edp)
return; return;
...@@ -1532,7 +1532,7 @@ parse_psr(struct drm_i915_private *i915, ...@@ -1532,7 +1532,7 @@ parse_psr(struct drm_i915_private *i915,
const struct psr_table *psr_table; const struct psr_table *psr_table;
int panel_type = panel->vbt.panel_type; int panel_type = panel->vbt.panel_type;
psr = find_section(i915, BDB_PSR); psr = bdb_find_section(i915, BDB_PSR);
if (!psr) { if (!psr) {
drm_dbg_kms(&i915->drm, "No PSR BDB found.\n"); drm_dbg_kms(&i915->drm, "No PSR BDB found.\n");
return; return;
...@@ -1693,7 +1693,7 @@ parse_mipi_config(struct drm_i915_private *i915, ...@@ -1693,7 +1693,7 @@ parse_mipi_config(struct drm_i915_private *i915,
/* Parse #52 for panel index used from panel_type already /* Parse #52 for panel index used from panel_type already
* parsed * parsed
*/ */
start = find_section(i915, BDB_MIPI_CONFIG); start = bdb_find_section(i915, BDB_MIPI_CONFIG);
if (!start) { if (!start) {
drm_dbg_kms(&i915->drm, "No MIPI config BDB found"); drm_dbg_kms(&i915->drm, "No MIPI config BDB found");
return; return;
...@@ -2005,7 +2005,7 @@ parse_mipi_sequence(struct drm_i915_private *i915, ...@@ -2005,7 +2005,7 @@ parse_mipi_sequence(struct drm_i915_private *i915,
if (panel->vbt.dsi.panel_id != MIPI_DSI_GENERIC_PANEL_ID) if (panel->vbt.dsi.panel_id != MIPI_DSI_GENERIC_PANEL_ID)
return; return;
sequence = find_section(i915, BDB_MIPI_SEQUENCE); sequence = bdb_find_section(i915, BDB_MIPI_SEQUENCE);
if (!sequence) { if (!sequence) {
drm_dbg_kms(&i915->drm, drm_dbg_kms(&i915->drm,
"No MIPI Sequence found, parsing complete\n"); "No MIPI Sequence found, parsing complete\n");
...@@ -2086,7 +2086,7 @@ parse_compression_parameters(struct drm_i915_private *i915) ...@@ -2086,7 +2086,7 @@ parse_compression_parameters(struct drm_i915_private *i915)
if (i915->display.vbt.version < 198) if (i915->display.vbt.version < 198)
return; return;
params = find_section(i915, BDB_COMPRESSION_PARAMETERS); params = bdb_find_section(i915, BDB_COMPRESSION_PARAMETERS);
if (params) { if (params) {
/* Sanity checks */ /* Sanity checks */
if (params->entry_size != sizeof(params->data[0])) { if (params->entry_size != sizeof(params->data[0])) {
...@@ -2792,7 +2792,7 @@ parse_general_definitions(struct drm_i915_private *i915) ...@@ -2792,7 +2792,7 @@ parse_general_definitions(struct drm_i915_private *i915)
u16 block_size; u16 block_size;
int bus_pin; int bus_pin;
defs = find_section(i915, BDB_GENERAL_DEFINITIONS); defs = bdb_find_section(i915, BDB_GENERAL_DEFINITIONS);
if (!defs) { if (!defs) {
drm_dbg_kms(&i915->drm, drm_dbg_kms(&i915->drm,
"No general definition block is found, no devices defined.\n"); "No general definition block is found, no devices defined.\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment