These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / gpu / drm / nouveau / nvkm / subdev / fb / nv49.c
index 236e36c..7b91b9f 100644 (file)
  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  *
  */
-#include "nv04.h"
+#include "priv.h"
+#include "ram.h"
 
-struct nvkm_oclass *
-nv49_fb_oclass = &(struct nv04_fb_impl) {
-       .base.base.handle = NV_SUBDEV(FB, 0x49),
-       .base.base.ofuncs = &(struct nvkm_ofuncs) {
-               .ctor = nv04_fb_ctor,
-               .dtor = _nvkm_fb_dtor,
-               .init = nv41_fb_init,
-               .fini = _nvkm_fb_fini,
-       },
-       .base.memtype = nv04_fb_memtype_valid,
-       .base.ram = &nv49_ram_oclass,
+static const struct nvkm_fb_func
+nv49_fb = {
+       .init = nv41_fb_init,
        .tile.regions = 15,
        .tile.init = nv30_fb_tile_init,
        .tile.comp = nv40_fb_tile_comp,
        .tile.fini = nv20_fb_tile_fini,
        .tile.prog = nv41_fb_tile_prog,
-}.base.base;
+       .ram_new = nv49_ram_new,
+       .memtype_valid = nv04_fb_memtype_valid,
+};
+
+int
+nv49_fb_new(struct nvkm_device *device, int index, struct nvkm_fb **pfb)
+{
+       return nvkm_fb_new_(&nv49_fb, device, index, pfb);
+}