Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
c0077061
Commit
c0077061
authored
Jul 26, 2012
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/acpi: move definitions out of nouveau_drv.h
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
d38ac521
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
40 additions
and
36 deletions
+40
-36
drivers/gpu/drm/nouveau/Makefile
drivers/gpu/drm/nouveau/Makefile
+3
-1
drivers/gpu/drm/nouveau/nouveau_acpi.c
drivers/gpu/drm/nouveau/nouveau_acpi.c
+11
-16
drivers/gpu/drm/nouveau/nouveau_acpi.h
drivers/gpu/drm/nouveau/nouveau_acpi.h
+22
-0
drivers/gpu/drm/nouveau/nouveau_connector.c
drivers/gpu/drm/nouveau/nouveau_connector.c
+2
-1
drivers/gpu/drm/nouveau/nouveau_drv.c
drivers/gpu/drm/nouveau/nouveau_drv.c
+1
-0
drivers/gpu/drm/nouveau/nouveau_drv.h
drivers/gpu/drm/nouveau/nouveau_drv.h
+0
-18
drivers/gpu/drm/nouveau/nouveau_state.c
drivers/gpu/drm/nouveau/nouveau_state.c
+1
-0
No files found.
drivers/gpu/drm/nouveau/Makefile
View file @
c0077061
...
@@ -167,6 +167,9 @@ nouveau-y += nv50_fbcon.o nvc0_fbcon.o
...
@@ -167,6 +167,9 @@ nouveau-y += nv50_fbcon.o nvc0_fbcon.o
# drm/kms/nvd9-
# drm/kms/nvd9-
# other random bits
nouveau-$(CONFIG_ACPI)
+=
nouveau_acpi.o
##
##
## unported bits below
## unported bits below
##
##
...
@@ -200,7 +203,6 @@ nouveau-y += nouveau_mem.o
...
@@ -200,7 +203,6 @@ nouveau-y += nouveau_mem.o
# optional stuff
# optional stuff
nouveau-$(CONFIG_COMPAT)
+=
nouveau_ioc32.o
nouveau-$(CONFIG_COMPAT)
+=
nouveau_ioc32.o
nouveau-$(CONFIG_DRM_NOUVEAU_BACKLIGHT)
+=
nouveau_backlight.o
nouveau-$(CONFIG_DRM_NOUVEAU_BACKLIGHT)
+=
nouveau_backlight.o
nouveau-$(CONFIG_ACPI)
+=
nouveau_acpi.o
obj-$(CONFIG_DRM_NOUVEAU)
+=
nouveau.o
obj-$(CONFIG_DRM_NOUVEAU)
+=
nouveau.o
drivers/gpu/drm/nouveau/nouveau_acpi.c
View file @
c0077061
...
@@ -7,16 +7,13 @@
...
@@ -7,16 +7,13 @@
#include <acpi/acpi.h>
#include <acpi/acpi.h>
#include <linux/mxm-wmi.h>
#include <linux/mxm-wmi.h>
#include "drmP.h"
#include "drm.h"
#include "drm_sarea.h"
#include "drm_crtc_helper.h"
#include "nouveau_drv.h"
#include <nouveau_drm.h>
#include "nouveau_connector.h"
#include <linux/vga_switcheroo.h>
#include <linux/vga_switcheroo.h>
#include "drm_edid.h"
#include "nouveau_drm.h"
#include "nouveau_acpi.h"
#define NOUVEAU_DSM_LED 0x02
#define NOUVEAU_DSM_LED 0x02
#define NOUVEAU_DSM_LED_STATE 0x00
#define NOUVEAU_DSM_LED_STATE 0x00
#define NOUVEAU_DSM_LED_OFF 0x10
#define NOUVEAU_DSM_LED_OFF 0x10
...
@@ -389,10 +386,9 @@ int nouveau_acpi_get_bios_chunk(uint8_t *bios, int offset, int len)
...
@@ -389,10 +386,9 @@ int nouveau_acpi_get_bios_chunk(uint8_t *bios, int offset, int len)
return
nouveau_rom_call
(
nouveau_dsm_priv
.
rom_handle
,
bios
,
offset
,
len
);
return
nouveau_rom_call
(
nouveau_dsm_priv
.
rom_handle
,
bios
,
offset
,
len
);
}
}
int
void
*
nouveau_acpi_edid
(
struct
drm_device
*
dev
,
struct
drm_connector
*
connector
)
nouveau_acpi_edid
(
struct
drm_device
*
dev
,
struct
drm_connector
*
connector
)
{
{
struct
nouveau_connector
*
nv_connector
=
nouveau_connector
(
connector
);
struct
acpi_device
*
acpidev
;
struct
acpi_device
*
acpidev
;
acpi_handle
handle
;
acpi_handle
handle
;
int
type
,
ret
;
int
type
,
ret
;
...
@@ -404,21 +400,20 @@ nouveau_acpi_edid(struct drm_device *dev, struct drm_connector *connector)
...
@@ -404,21 +400,20 @@ nouveau_acpi_edid(struct drm_device *dev, struct drm_connector *connector)
type
=
ACPI_VIDEO_DISPLAY_LCD
;
type
=
ACPI_VIDEO_DISPLAY_LCD
;
break
;
break
;
default:
default:
return
-
EINVA
L
;
return
NUL
L
;
}
}
handle
=
DEVICE_ACPI_HANDLE
(
&
dev
->
pdev
->
dev
);
handle
=
DEVICE_ACPI_HANDLE
(
&
dev
->
pdev
->
dev
);
if
(
!
handle
)
if
(
!
handle
)
return
-
ENODEV
;
return
NULL
;
ret
=
acpi_bus_get_device
(
handle
,
&
acpidev
);
ret
=
acpi_bus_get_device
(
handle
,
&
acpidev
);
if
(
ret
)
if
(
ret
)
return
-
ENODEV
;
return
NULL
;
ret
=
acpi_video_get_edid
(
acpidev
,
type
,
-
1
,
&
edid
);
ret
=
acpi_video_get_edid
(
acpidev
,
type
,
-
1
,
&
edid
);
if
(
ret
<
0
)
if
(
ret
<
0
)
return
ret
;
return
NULL
;
nv_connector
->
edid
=
kmemdup
(
edid
,
EDID_LENGTH
,
GFP_KERNEL
);
return
kmemdup
(
edid
,
EDID_LENGTH
,
GFP_KERNEL
);
return
0
;
}
}
drivers/gpu/drm/nouveau/nouveau_acpi.h
0 → 100644
View file @
c0077061
#ifndef __NOUVEAU_ACPI_H__
#define __NOUVEAU_ACPI_H__
#define ROM_BIOS_PAGE 4096
#if defined(CONFIG_ACPI)
void
nouveau_register_dsm_handler
(
void
);
void
nouveau_unregister_dsm_handler
(
void
);
void
nouveau_switcheroo_optimus_dsm
(
void
);
int
nouveau_acpi_get_bios_chunk
(
uint8_t
*
bios
,
int
offset
,
int
len
);
bool
nouveau_acpi_rom_supported
(
struct
pci_dev
*
pdev
);
void
*
nouveau_acpi_edid
(
struct
drm_device
*
,
struct
drm_connector
*
);
#else
static
inline
void
nouveau_register_dsm_handler
(
void
)
{}
static
inline
void
nouveau_unregister_dsm_handler
(
void
)
{}
static
inline
void
nouveau_switcheroo_optimus_dsm
(
void
)
{}
static
inline
bool
nouveau_acpi_rom_supported
(
struct
pci_dev
*
pdev
)
{
return
false
;
}
static
inline
int
nouveau_acpi_get_bios_chunk
(
uint8_t
*
bios
,
int
offset
,
int
len
)
{
return
-
EINVAL
;
}
static
inline
void
*
nouveau_acpi_edid
(
struct
drm_device
*
dev
,
struct
drm_connector
*
connector
)
{
return
NULL
;
}
#endif
#endif
drivers/gpu/drm/nouveau/nouveau_connector.c
View file @
c0077061
...
@@ -36,6 +36,7 @@
...
@@ -36,6 +36,7 @@
#include "nouveau_crtc.h"
#include "nouveau_crtc.h"
#include "nouveau_connector.h"
#include "nouveau_connector.h"
#include "nouveau_hw.h"
#include "nouveau_hw.h"
#include "nouveau_acpi.h"
#include <subdev/bios/gpio.h>
#include <subdev/bios/gpio.h>
...
@@ -335,7 +336,7 @@ nouveau_connector_detect_lvds(struct drm_connector *connector, bool force)
...
@@ -335,7 +336,7 @@ nouveau_connector_detect_lvds(struct drm_connector *connector, bool force)
* valid - it's not (rh#613284)
* valid - it's not (rh#613284)
*/
*/
if
(
nv_encoder
->
dcb
->
lvdsconf
.
use_acpi_for_edid
)
{
if
(
nv_encoder
->
dcb
->
lvdsconf
.
use_acpi_for_edid
)
{
if
(
!
nouveau_acpi_edid
(
dev
,
connector
))
{
if
(
!
(
nv_connector
->
edid
=
nouveau_acpi_edid
(
dev
,
connector
)
))
{
status
=
connector_status_connected
;
status
=
connector_status_connected
;
goto
out
;
goto
out
;
}
}
...
...
drivers/gpu/drm/nouveau/nouveau_drv.c
View file @
c0077061
...
@@ -36,6 +36,7 @@
...
@@ -36,6 +36,7 @@
#include "nouveau_fence.h"
#include "nouveau_fence.h"
#include "nouveau_pm.h"
#include "nouveau_pm.h"
#include "nv50_display.h"
#include "nv50_display.h"
#include "nouveau_acpi.h"
#include "drm_pciids.h"
#include "drm_pciids.h"
...
...
drivers/gpu/drm/nouveau/nouveau_drv.h
View file @
c0077061
...
@@ -366,24 +366,6 @@ extern void nouveau_irq_preinstall(struct drm_device *);
...
@@ -366,24 +366,6 @@ extern void nouveau_irq_preinstall(struct drm_device *);
extern
int
nouveau_irq_postinstall
(
struct
drm_device
*
);
extern
int
nouveau_irq_postinstall
(
struct
drm_device
*
);
extern
void
nouveau_irq_uninstall
(
struct
drm_device
*
);
extern
void
nouveau_irq_uninstall
(
struct
drm_device
*
);
/* nouveau_acpi.c */
#define ROM_BIOS_PAGE 4096
#if defined(CONFIG_ACPI)
void
nouveau_register_dsm_handler
(
void
);
void
nouveau_unregister_dsm_handler
(
void
);
void
nouveau_switcheroo_optimus_dsm
(
void
);
int
nouveau_acpi_get_bios_chunk
(
uint8_t
*
bios
,
int
offset
,
int
len
);
bool
nouveau_acpi_rom_supported
(
struct
pci_dev
*
pdev
);
int
nouveau_acpi_edid
(
struct
drm_device
*
,
struct
drm_connector
*
);
#else
static
inline
void
nouveau_register_dsm_handler
(
void
)
{}
static
inline
void
nouveau_unregister_dsm_handler
(
void
)
{}
static
inline
void
nouveau_switcheroo_optimus_dsm
(
void
)
{}
static
inline
bool
nouveau_acpi_rom_supported
(
struct
pci_dev
*
pdev
)
{
return
false
;
}
static
inline
int
nouveau_acpi_get_bios_chunk
(
uint8_t
*
bios
,
int
offset
,
int
len
)
{
return
-
EINVAL
;
}
static
inline
int
nouveau_acpi_edid
(
struct
drm_device
*
dev
,
struct
drm_connector
*
connector
)
{
return
-
EINVAL
;
}
#endif
/* nouveau_backlight.c */
/* nouveau_backlight.c */
#ifdef CONFIG_DRM_NOUVEAU_BACKLIGHT
#ifdef CONFIG_DRM_NOUVEAU_BACKLIGHT
extern
int
nouveau_backlight_init
(
struct
drm_device
*
);
extern
int
nouveau_backlight_init
(
struct
drm_device
*
);
...
...
drivers/gpu/drm/nouveau/nouveau_state.c
View file @
c0077061
...
@@ -38,6 +38,7 @@
...
@@ -38,6 +38,7 @@
#include "nouveau_pm.h"
#include "nouveau_pm.h"
#include "nv04_display.h"
#include "nv04_display.h"
#include "nv50_display.h"
#include "nv50_display.h"
#include "nouveau_acpi.h"
static
void
nouveau_stub_takedown
(
struct
drm_device
*
dev
)
{}
static
void
nouveau_stub_takedown
(
struct
drm_device
*
dev
)
{}
static
int
nouveau_stub_init
(
struct
drm_device
*
dev
)
{
return
0
;
}
static
int
nouveau_stub_init
(
struct
drm_device
*
dev
)
{
return
0
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment