search for: rom16

Displaying 14 results from an estimated 14 matches for "rom16".

2013 Mar 13
1
Fix unaligned accesses for SPARC
The nouveau driver makes a number of unaligned accesses via the ROM16(), ROM32() and ROM64() macros which fault on SPARC (but would be transparently handled by x86 hardware). Making use of get_unaligned() macro fixes the problem for me. diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.h b/drivers/gpu/drm/nouveau/nouveau_bios.h index 7ccd28f..92031f6 100644 --- a/dr...
2016 Jul 27
0
[PATCH] nouveau: bios pointers may be unaligned, use proper accessors
...bdev/mxm/mxms.c | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drm/nouveau/nouveau_bios.h b/drm/nouveau/nouveau_bios.h index 0067586..18eb061 100644 --- a/drm/nouveau/nouveau_bios.h +++ b/drm/nouveau/nouveau_bios.h @@ -31,10 +31,8 @@ #define DCB_LOC_ON_CHIP 0 -#define ROM16(x) le16_to_cpu(*(u16 *)&(x)) -#define ROM32(x) le32_to_cpu(*(u32 *)&(x)) -#define ROM48(x) ({ u8 *p = &(x); (u64)ROM16(p[4]) << 32 | ROM32(p[0]); }) -#define ROM64(x) le64_to_cpu(*(u64 *)&(x)) +#define ROM16(x) get_unaligned_le16(&(x)) +#define ROM32(x) get_unaligned_le32(...
2009 Aug 20
1
Delays in DRM nouveau_bios.c
...u_bios.c index 99f7bd4..13b3fb1 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bios.c +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c @@ -40,8 +40,6 @@ #define BIOSLOG(sip, fmt, arg...) NV_DEBUG(sip->dev, fmt, ##arg) #define LOG_OLD_VALUE(x) //x -#define BIOS_USLEEP(n) mdelay((n)/1000) - #define ROM16(x) le16_to_cpu(*(uint16_t *)&(x)) #define ROM32(x) le32_to_cpu(*(uint32_t *)&(x)) @@ -50,6 +48,15 @@ struct init_exec { bool repeat; }; +static inline void bios_usleep(unsigned usecs) +{ + might_sleep(); + if (usecs < 1000 * MAX_UDELAY_MS) + udelay(usecs); + else + msleep(usecs...
2009 Oct 02
0
Disaster at annarchy
.../nouveau_bios.c @@ -40,8 +40,6 @@ > >> > #define BIOSLOG(sip, fmt, arg...) NV_DEBUG(sip->dev, fmt, > >> > ##arg) #define LOG_OLD_VALUE(x) //x > >> > > >> > -#define BIOS_USLEEP(n) mdelay((n)/1000) > >> > - > >> > #define ROM16(x) le16_to_cpu(*(uint16_t *)&(x)) > >> > #define ROM32(x) le32_to_cpu(*(uint32_t *)&(x)) > >> > > >> > @@ -50,6 +48,15 @@ struct init_exec { > >> > bool repeat; > >> > }; > >> > > >> > +static inline...
2016 Jul 07
19
[Bug 96836] New: Kernel unaligned access at TPC[105d9fb4] nvkm_instobj_wr32+0x14/0x20
https://bugs.freedesktop.org/show_bug.cgi?id=96836 Bug ID: 96836 Summary: Kernel unaligned access at TPC[105d9fb4] nvkm_instobj_wr32+0x14/0x20 [nouveau] Product: xorg Version: unspecified Hardware: SPARC OS: Linux (All) Status: NEW Severity: normal Priority: medium
2019 Jun 02
1
[PATCH] drm/nouveau/bios: downgrade absence of tmds table to info from an error
...u_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c index 66bf2aff4a3e..bdfadc63204a 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bios.c +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c @@ -935,7 +935,7 @@ static int parse_bit_tmds_tbl_entry(struct drm_device *dev, struct nvbios *bios, tmdstableptr = ROM16(bios->data[bitentry->offset]); if (!tmdstableptr) { - NV_ERROR(drm, "Pointer to TMDS table invalid\n"); + NV_INFO(drm, "Pointer to TMDS table not found\n"); return -EINVAL; } -- 2.20.1
2023 Jun 25
0
[PATCH] drm/nouveau: Remove the unused variable entry
...nouveau_connector.c +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c @@ -1295,11 +1295,8 @@ nouveau_connector_create(struct drm_device *dev, /* attempt to parse vbios connector type and hotplug gpio */ nv_connector->dcb = olddcb_conn(dev, index); if (nv_connector->dcb) { - u32 entry = ROM16(nv_connector->dcb[0]); - if (olddcb_conntab(dev)[3] >= 4) - entry |= (u32)ROM16(nv_connector->dcb[2]) << 16; - nv_connector->type = nv_connector->dcb[0]; + if (drm_conntype_from_dcb(nv_connector->type) == DRM_MODE_CONNECTOR_Unknown) { NV_WARN(drm, "...
2013 Oct 09
1
[PATCH] drm/nouveau: Do not show an error if the TMDS table pointer is invalid
...eau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c index 3e72876..7681b01 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bios.c +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c @@ -936,7 +936,8 @@ static int parse_bit_tmds_tbl_entry(struct drm_device *dev, struct nvbios *bios, tmdstableptr = ROM16(bios->data[bitentry->offset]); if (!tmdstableptr) { - NV_ERROR(drm, "Pointer to TMDS table invalid\n"); + /* Happens on NVD7 and other Optimus cards with no outputs */ + NV_INFO(drm, "TMDS table not found\n"); return -EINVAL; } -- 1.7.10.4
2009 Dec 15
2
[PATCH 1/2] drm/nouveau: Kill global state in NvShadowBIOS
--- drivers/gpu/drm/nouveau/nouveau_bios.c | 47 ++++++++++++++----------------- 1 files changed, 21 insertions(+), 26 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c index 5eec5ed..04ac564 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bios.c +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c @@ -181,43 +181,42 @@ struct methods { const char
2009 Nov 19
2
[RFC] nouveau: Add basic i2c sensor chip support
...t i; + + version = bios->data[tbl_ptr]; + headerlen = bios->data[tbl_ptr+1]; + entrylen = bios->data[tbl_ptr+2]; + num_entries = bios->data[tbl_ptr+3]; + + offset += headerlen; + + for (i = 0; i < num_entries; i++) { + uint8_t id = bios->data[offset+entrylen*i]; + uint16_t val = ROM16(bios->data[offset+1+entrylen*i]); + + switch (id) { + case 0x1: + if ((val & 0x8f) == 0) + bios->sensor.temp_correction = + (val >> 9) & 0x7f; + break; + case 0x10: + bios->sensor.diode_offset_mult = val; + break; + case 0x11: + bios->sensor.diode_offs...
2020 Nov 24
1
[PATCH 09/15] drm/nouveau: Remove references to struct drm_device.pdev
...l_lvds_manufacturer_script(struct drm_device *dev, struct dcb_outp > struct nvbios *bios = &drm->vbios; > uint8_t sub = bios->data[bios->fp.xlated_entry + script] + (bios->fp.link_c_increment && dcbent->or & DCB_OUTPUT_C ? 1 : 0); > uint16_t scriptofs = ROM16(bios->data[bios->init_script_tbls_ptr + sub * 2]); > +#ifdef __powerpc__ > + struct pci_dev *pdev = to_pci_dev(dev->dev); > +#endif Or int device = 0; > > if (!bios->fp.xlated_entry || !sub || !scriptofs) > return -EINVAL; > @@ -123,8 +126,8 @@ static int ca...
2009 Jun 10
0
[PATCH] Use nanosleep instead of usleep when waiting the hardware.
...a/src/nv_bios.c b/src/nv_bios.c index 182456a..b7490c1 100644 --- a/src/nv_bios.c +++ b/src/nv_bios.c @@ -41,7 +41,7 @@ #define BIOSLOG(sip, fmt, arg...) NV_DEBUG(sip, fmt, ##arg) #define LOG_OLD_VALUE(x) //x -#define BIOS_USLEEP(n) usleep(n) +#define BIOS_USLEEP(n) nouveau_usleep(n) #define ROM16(x) le16_to_cpu(*(uint16_t *)&(x)) #define ROM32(x) le32_to_cpu(*(uint32_t *)&(x)) diff --git a/src/nv_crtc.c b/src/nv_crtc.c index b8524fb..1ffb267 100644 --- a/src/nv_crtc.c +++ b/src/nv_crtc.c @@ -212,7 +212,7 @@ nv_crtc_dpms(xf86CrtcPtr crtc, int mode) seq1 |= (NVReadVgaSeq(pNv, nv_cr...
2009 Dec 13
3
[PATCH] drm/nouveau: use drm debug levels
...t;, dcbent->type, dcbent->location, dcbent->or); otable = bios_output_config_match(dev, dcbent, table[1] + bios->display.script_table_ptr, @@ -3884,7 +3884,7 @@ nouveau_bios_run_display_table(struct drm_device *dev, struct dcb_entry *dcbent, if (pxclk == 0) { script = ROM16(otable[6]); if (!script) { - NV_DEBUG(dev, "output script 0 not found\n"); + NV_DEBUG_KMS(dev, "output script 0 not found\n"); return 1; } @@ -3894,7 +3894,7 @@ nouveau_bios_run_display_table(struct drm_device *dev, struct dcb_entry *dcbent, if (pxclk == -1) {...
2012 May 20
16
nouveau_subdev & misc patches
Hello all, this series includes a wide range of fixes - from a few month's old one-liners from Andreas Heider regarding vga_switcheroo, via a null pointer dereference and double memory allocation, to a buffer overflow. Please review and comment --- drivers/gpu/drm/nouveau/nouveau_acpi.c | 3 ++- drivers/gpu/drm/nouveau/nouveau_device.c | 26 +++++++++++++++-----------