drm/nouveau: allocate device object for every client
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
@@ -97,7 +97,7 @@ nv10_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
|
||||
uint32_t src_w, uint32_t src_h)
|
||||
{
|
||||
struct nouveau_drm *drm = nouveau_drm(plane->dev);
|
||||
struct nvif_object *dev = &drm->device.object;
|
||||
struct nvif_object *dev = &drm->client.device.object;
|
||||
struct nouveau_plane *nv_plane =
|
||||
container_of(plane, struct nouveau_plane, base);
|
||||
struct nouveau_framebuffer *nv_fb = nouveau_framebuffer(fb);
|
||||
@@ -119,7 +119,7 @@ nv10_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
|
||||
if (format > 0xffff)
|
||||
return -ERANGE;
|
||||
|
||||
if (drm->device.info.chipset >= 0x30) {
|
||||
if (drm->client.device.info.chipset >= 0x30) {
|
||||
if (crtc_w < (src_w >> 1) || crtc_h < (src_h >> 1))
|
||||
return -ERANGE;
|
||||
} else {
|
||||
@@ -174,7 +174,7 @@ nv10_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
|
||||
static int
|
||||
nv10_disable_plane(struct drm_plane *plane)
|
||||
{
|
||||
struct nvif_object *dev = &nouveau_drm(plane->dev)->device.object;
|
||||
struct nvif_object *dev = &nouveau_drm(plane->dev)->client.device.object;
|
||||
struct nouveau_plane *nv_plane =
|
||||
container_of(plane, struct nouveau_plane, base);
|
||||
|
||||
@@ -198,7 +198,7 @@ nv_destroy_plane(struct drm_plane *plane)
|
||||
static void
|
||||
nv10_set_params(struct nouveau_plane *plane)
|
||||
{
|
||||
struct nvif_object *dev = &nouveau_drm(plane->base.dev)->device.object;
|
||||
struct nvif_object *dev = &nouveau_drm(plane->base.dev)->client.device.object;
|
||||
u32 luma = (plane->brightness - 512) << 16 | plane->contrast;
|
||||
u32 chroma = ((sin_mul(plane->hue, plane->saturation) & 0xffff) << 16) |
|
||||
(cos_mul(plane->hue, plane->saturation) & 0xffff);
|
||||
@@ -268,7 +268,7 @@ nv10_overlay_init(struct drm_device *device)
|
||||
if (!plane)
|
||||
return;
|
||||
|
||||
switch (drm->device.info.chipset) {
|
||||
switch (drm->client.device.info.chipset) {
|
||||
case 0x10:
|
||||
case 0x11:
|
||||
case 0x15:
|
||||
@@ -347,7 +347,7 @@ nv04_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
|
||||
uint32_t src_x, uint32_t src_y,
|
||||
uint32_t src_w, uint32_t src_h)
|
||||
{
|
||||
struct nvif_object *dev = &nouveau_drm(plane->dev)->device.object;
|
||||
struct nvif_object *dev = &nouveau_drm(plane->dev)->client.device.object;
|
||||
struct nouveau_plane *nv_plane =
|
||||
container_of(plane, struct nouveau_plane, base);
|
||||
struct nouveau_framebuffer *nv_fb = nouveau_framebuffer(fb);
|
||||
@@ -427,7 +427,7 @@ nv04_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
|
||||
static int
|
||||
nv04_disable_plane(struct drm_plane *plane)
|
||||
{
|
||||
struct nvif_object *dev = &nouveau_drm(plane->dev)->device.object;
|
||||
struct nvif_object *dev = &nouveau_drm(plane->dev)->client.device.object;
|
||||
struct nouveau_plane *nv_plane =
|
||||
container_of(plane, struct nouveau_plane, base);
|
||||
|
||||
@@ -495,7 +495,7 @@ err:
|
||||
void
|
||||
nouveau_overlay_init(struct drm_device *device)
|
||||
{
|
||||
struct nvif_device *dev = &nouveau_drm(device)->device;
|
||||
struct nvif_device *dev = &nouveau_drm(device)->client.device;
|
||||
if (dev->info.chipset < 0x10)
|
||||
nv04_overlay_init(device);
|
||||
else if (dev->info.chipset <= 0x40)
|
||||
|
مرجع در شماره جدید
Block a user