Skip to content

Commit b046f98

Browse files
committed
parisc/stifb: Keep track of hardware path of graphics card
Keep the pa_path (hardware path) of the graphics card in sti_struct and use this info to give more useful info which card is currently being used. Signed-off-by: Helge Deller <[email protected]> Cc: [email protected] # v5.10+
1 parent cf936af commit b046f98

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

drivers/video/console/sticon.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
#include <linux/slab.h>
4747
#include <linux/font.h>
4848
#include <linux/crc32.h>
49+
#include <linux/fb.h>
4950

5051
#include <asm/io.h>
5152

@@ -392,7 +393,9 @@ static int __init sticonsole_init(void)
392393
for (i = 0; i < MAX_NR_CONSOLES; i++)
393394
font_data[i] = STI_DEF_FONT;
394395

395-
pr_info("sticon: Initializing STI text console.\n");
396+
pr_info("sticon: Initializing STI text console on %s at [%s]\n",
397+
sticon_sti->sti_data->inq_outptr.dev_name,
398+
sticon_sti->pa_path);
396399
console_lock();
397400
err = do_take_over_console(&sti_con, 0, MAX_NR_CONSOLES - 1,
398401
PAGE0->mem_cons.cl_class != CL_DUPLEX);

drivers/video/console/sticore.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
#include "../fbdev/sticore.h"
3636

37-
#define STI_DRIVERVERSION "Version 0.9b"
37+
#define STI_DRIVERVERSION "Version 0.9c"
3838

3939
static struct sti_struct *default_sti __read_mostly;
4040

@@ -503,7 +503,7 @@ sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name)
503503
if (!fbfont)
504504
return NULL;
505505

506-
pr_info("STI selected %ux%u framebuffer font %s for sticon\n",
506+
pr_info(" using %ux%u framebuffer font %s\n",
507507
fbfont->width, fbfont->height, fbfont->name);
508508

509509
bpc = ((fbfont->width+7)/8) * fbfont->height;
@@ -947,6 +947,7 @@ static struct sti_struct *sti_try_rom_generic(unsigned long address,
947947

948948
static void sticore_check_for_default_sti(struct sti_struct *sti, char *path)
949949
{
950+
pr_info(" located at [%s]\n", sti->pa_path);
950951
if (strcmp (path, default_sti_path) == 0)
951952
default_sti = sti;
952953
}
@@ -958,7 +959,6 @@ static void sticore_check_for_default_sti(struct sti_struct *sti, char *path)
958959
*/
959960
static int __init sticore_pa_init(struct parisc_device *dev)
960961
{
961-
char pa_path[21];
962962
struct sti_struct *sti = NULL;
963963
int hpa = dev->hpa.start;
964964

@@ -971,8 +971,8 @@ static int __init sticore_pa_init(struct parisc_device *dev)
971971
if (!sti)
972972
return 1;
973973

974-
print_pa_hwpath(dev, pa_path);
975-
sticore_check_for_default_sti(sti, pa_path);
974+
print_pa_hwpath(dev, sti->pa_path);
975+
sticore_check_for_default_sti(sti, sti->pa_path);
976976
return 0;
977977
}
978978

@@ -1008,9 +1008,8 @@ static int sticore_pci_init(struct pci_dev *pd, const struct pci_device_id *ent)
10081008

10091009
sti = sti_try_rom_generic(rom_base, fb_base, pd);
10101010
if (sti) {
1011-
char pa_path[30];
1012-
print_pci_hwpath(pd, pa_path);
1013-
sticore_check_for_default_sti(sti, pa_path);
1011+
print_pci_hwpath(pd, sti->pa_path);
1012+
sticore_check_for_default_sti(sti, sti->pa_path);
10141013
}
10151014

10161015
if (!sti) {

drivers/video/fbdev/sticore.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,9 @@ struct sti_struct {
370370

371371
/* pointer to all internal data */
372372
struct sti_all_data *sti_data;
373+
374+
/* pa_path of this device */
375+
char pa_path[24];
373376
};
374377

375378

0 commit comments

Comments
 (0)