drm/nouveau: port all engines to new engine module format
This is a HUGE commit, but it's not nearly as bad as it looks - any problems can be isolated to a particular chipset and engine combination. It was simply too difficult to port each one at a time, the compat layers are *already* ridiculous. Most of the changes here are simply to the glue, the process for each of the engine modules was to start with a standard skeleton and copy+paste the old code into the appropriate places, fixing up variable names etc as needed. v2: Marcin Slusarz <marcin.slusarz@gmail.com> - fix find/replace bug in license header v3: Ben Skeggs <bskeggs@redhat.com> - bump indirect pushbuf size to 8KiB, 4KiB barely enough for userspace and left no space for kernel's requirements during GEM pushbuf submission. - fix duplicate assignments noticed by clang v4: Marcin Slusarz <marcin.slusarz@gmail.com> - add sparse annotations to nv04_fifo_pause/nv04_fifo_start - use ioread32_native/iowrite32_native for fifo control registers v5: Ben Skeggs <bskeggs@redhat.com> - rebase on v3.6-rc4, modified to keep copy engine fix intact - nv10/fence: unmap fence bo before destroying - fixed fermi regression when using nvidia gr fuc - fixed typo in supported dma_mask checking Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
@@ -22,20 +22,16 @@
|
||||
* Authors: Ben Skeggs
|
||||
*/
|
||||
|
||||
#include "drmP.h"
|
||||
#include "nouveau_drv.h"
|
||||
#include "nouveau_drm.h"
|
||||
#include "nouveau_dma.h"
|
||||
#include <core/ramht.h>
|
||||
#include "nouveau_fbcon.h"
|
||||
#include <core/mm.h>
|
||||
|
||||
int
|
||||
nvc0_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
|
||||
{
|
||||
struct nouveau_fbdev *nfbdev = info->par;
|
||||
struct drm_device *dev = nfbdev->dev;
|
||||
struct drm_nouveau_private *dev_priv = dev->dev_private;
|
||||
struct nouveau_channel *chan = dev_priv->channel;
|
||||
struct nouveau_drm *drm = nouveau_newpriv(nfbdev->dev);
|
||||
struct nouveau_channel *chan = drm->channel;
|
||||
int ret;
|
||||
|
||||
ret = RING_SPACE(chan, rect->rop == ROP_COPY ? 7 : 11);
|
||||
@@ -69,9 +65,8 @@ int
|
||||
nvc0_fbcon_copyarea(struct fb_info *info, const struct fb_copyarea *region)
|
||||
{
|
||||
struct nouveau_fbdev *nfbdev = info->par;
|
||||
struct drm_device *dev = nfbdev->dev;
|
||||
struct drm_nouveau_private *dev_priv = dev->dev_private;
|
||||
struct nouveau_channel *chan = dev_priv->channel;
|
||||
struct nouveau_drm *drm = nouveau_newpriv(nfbdev->dev);
|
||||
struct nouveau_channel *chan = drm->channel;
|
||||
int ret;
|
||||
|
||||
ret = RING_SPACE(chan, 12);
|
||||
@@ -98,9 +93,8 @@ int
|
||||
nvc0_fbcon_imageblit(struct fb_info *info, const struct fb_image *image)
|
||||
{
|
||||
struct nouveau_fbdev *nfbdev = info->par;
|
||||
struct drm_device *dev = nfbdev->dev;
|
||||
struct drm_nouveau_private *dev_priv = dev->dev_private;
|
||||
struct nouveau_channel *chan = dev_priv->channel;
|
||||
struct nouveau_drm *drm = nouveau_newpriv(nfbdev->dev);
|
||||
struct nouveau_channel *chan = drm->channel;
|
||||
uint32_t width, dwords, *data = (uint32_t *)image->data;
|
||||
uint32_t mask = ~(~0 >> (32 - info->var.bits_per_pixel));
|
||||
uint32_t *palette = info->pseudo_palette;
|
||||
@@ -157,12 +151,14 @@ nvc0_fbcon_accel_init(struct fb_info *info)
|
||||
{
|
||||
struct nouveau_fbdev *nfbdev = info->par;
|
||||
struct drm_device *dev = nfbdev->dev;
|
||||
struct drm_nouveau_private *dev_priv = dev->dev_private;
|
||||
struct nouveau_channel *chan = dev_priv->channel;
|
||||
struct nouveau_framebuffer *fb = &nfbdev->nouveau_fb;
|
||||
struct nouveau_drm *drm = nouveau_newpriv(dev);
|
||||
struct nouveau_channel *chan = drm->channel;
|
||||
struct nouveau_object *object;
|
||||
int ret, format;
|
||||
|
||||
ret = nouveau_gpuobj_gr_new(chan, 0x902d, 0x902d);
|
||||
ret = nouveau_object_new(nv_object(chan->cli), NVDRM_CHAN, Nv2D,
|
||||
0x902d, NULL, 0, &object);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@@ -202,9 +198,6 @@ nvc0_fbcon_accel_init(struct fb_info *info)
|
||||
|
||||
BEGIN_NVC0(chan, NvSub2D, 0x0000, 1);
|
||||
OUT_RING (chan, 0x0000902d);
|
||||
BEGIN_NVC0(chan, NvSub2D, 0x0104, 2);
|
||||
OUT_RING (chan, upper_32_bits(chan->notifier_vma.offset));
|
||||
OUT_RING (chan, lower_32_bits(chan->notifier_vma.offset));
|
||||
BEGIN_NVC0(chan, NvSub2D, 0x0290, 1);
|
||||
OUT_RING (chan, 0);
|
||||
BEGIN_NVC0(chan, NvSub2D, 0x0888, 1);
|
||||
|
Reference in New Issue
Block a user