Lines Matching defs:odev

286 	void __iomem *(*cmap_ioremap)(struct ofdrm_device *odev,
289 void (*cmap_write)(struct ofdrm_device *odev, unsigned char index,
356 static int ofdrm_device_init_pci(struct ofdrm_device *odev)
358 struct drm_device *dev = &odev->dev;
388 static int ofdrm_device_init_pci(struct ofdrm_device *odev)
398 static struct resource *ofdrm_find_fb_resource(struct ofdrm_device *odev,
401 struct platform_device *pdev = to_platform_device(odev->dev.dev);
424 static void __iomem *get_cmap_address_of(struct ofdrm_device *odev, struct device_node *of_node,
427 struct drm_device *dev = &odev->dev;
456 static void __iomem *ofdrm_mach64_cmap_ioremap(struct ofdrm_device *odev,
460 struct drm_device *dev = &odev->dev;
474 static void ofdrm_mach64_cmap_write(struct ofdrm_device *odev, unsigned char index,
477 void __iomem *addr = odev->cmap_base + 0xcc0;
478 void __iomem *data = odev->cmap_base + 0xcc0 + 1;
486 static void __iomem *ofdrm_rage128_cmap_ioremap(struct ofdrm_device *odev,
490 return get_cmap_address_of(odev, of_node, 2, 0, 0x1fff);
493 static void ofdrm_rage128_cmap_write(struct ofdrm_device *odev, unsigned char index,
496 void __iomem *addr = odev->cmap_base + 0xb0;
497 void __iomem *data = odev->cmap_base + 0xb4;
504 static void __iomem *ofdrm_rage_m3a_cmap_ioremap(struct ofdrm_device *odev,
508 return get_cmap_address_of(odev, of_node, 2, 0, 0x1fff);
511 static void ofdrm_rage_m3a_cmap_write(struct ofdrm_device *odev, unsigned char index,
514 void __iomem *dac_ctl = odev->cmap_base + 0x58;
515 void __iomem *addr = odev->cmap_base + 0xb0;
516 void __iomem *data = odev->cmap_base + 0xb4;
530 static void __iomem *ofdrm_rage_m3b_cmap_ioremap(struct ofdrm_device *odev,
534 return get_cmap_address_of(odev, of_node, 2, 0, 0x1fff);
537 static void ofdrm_rage_m3b_cmap_write(struct ofdrm_device *odev, unsigned char index,
540 void __iomem *dac_ctl = odev->cmap_base + 0x58;
541 void __iomem *addr = odev->cmap_base + 0xb0;
542 void __iomem *data = odev->cmap_base + 0xb4;
556 static void __iomem *ofdrm_radeon_cmap_ioremap(struct ofdrm_device *odev,
560 return get_cmap_address_of(odev, of_node, 1, 0, 0x1fff);
563 static void __iomem *ofdrm_gxt2000_cmap_ioremap(struct ofdrm_device *odev,
567 return get_cmap_address_of(odev, of_node, 0, 0x6000, 0x1000);
570 static void ofdrm_gxt2000_cmap_write(struct ofdrm_device *odev, unsigned char index,
573 void __iomem *data = ((unsigned int __iomem *)odev->cmap_base) + index;
579 static void __iomem *ofdrm_avivo_cmap_ioremap(struct ofdrm_device *odev,
587 cmap_base = get_cmap_address_of(odev, of_parent, 0, 0, 0x10000);
593 static void ofdrm_avivo_cmap_write(struct ofdrm_device *odev, unsigned char index,
596 void __iomem *lutsel = odev->cmap_base + AVIVO_DC_LUT_RW_SELECT;
597 void __iomem *addr = odev->cmap_base + AVIVO_DC_LUT_RW_INDEX;
598 void __iomem *data = odev->cmap_base + AVIVO_DC_LUT_30_COLOR;
612 static void __iomem *ofdrm_qemu_cmap_ioremap(struct ofdrm_device *odev,
622 struct drm_device *dev = &odev->dev;
637 static void ofdrm_qemu_cmap_write(struct ofdrm_device *odev, unsigned char index,
640 void __iomem *addr = odev->cmap_base;
641 void __iomem *data = odev->cmap_base + 1;
649 static void ofdrm_device_set_gamma_linear(struct ofdrm_device *odev,
652 struct drm_device *dev = &odev->dev;
664 odev->funcs->cmap_write(odev, i, r, g, b);
672 odev->funcs->cmap_write(odev, i, r, g, b);
678 odev->funcs->cmap_write(odev, i, i, i, i);
687 static void ofdrm_device_set_gamma(struct ofdrm_device *odev,
691 struct drm_device *dev = &odev->dev;
703 odev->funcs->cmap_write(odev, i, r, g, b);
711 odev->funcs->cmap_write(odev, i, r, g, b);
721 odev->funcs->cmap_write(odev, i, r, g, b);
792 struct ofdrm_device *odev = ofdrm_device_of_dev(dev);
797 unsigned int dst_pitch = odev->pitch;
798 const struct drm_format_info *dst_format = odev->format;
812 struct iosys_map dst = odev->screen_base;
832 struct ofdrm_device *odev = ofdrm_device_of_dev(dev);
833 struct iosys_map dst = odev->screen_base;
836 unsigned int dst_pitch = odev->pitch;
837 const struct drm_format_info *dst_format = odev->format;
879 struct ofdrm_device *odev = ofdrm_device_of_dev(crtc->dev);
881 return drm_crtc_helper_mode_valid_fixed(crtc, mode, &odev->mode);
914 struct ofdrm_device *odev = ofdrm_device_of_dev(crtc->dev);
922 ofdrm_device_set_gamma(odev, format, crtc_state->gamma_lut->data);
924 ofdrm_device_set_gamma_linear(odev, format);
992 struct ofdrm_device *odev = ofdrm_device_of_dev(connector->dev);
994 return drm_connector_helper_get_modes_fixed(connector, &odev->mode);
1081 struct ofdrm_device *odev;
1099 odev = devm_drm_dev_alloc(&pdev->dev, drv, struct ofdrm_device, dev);
1100 if (IS_ERR(odev))
1101 return ERR_CAST(odev);
1102 dev = &odev->dev;
1105 ret = ofdrm_device_init_pci(odev);
1118 odev->funcs = &ofdrm_unknown_device_funcs;
1121 odev->funcs = &ofdrm_mach64_device_funcs;
1124 odev->funcs = &ofdrm_rage128_device_funcs;
1127 odev->funcs = &ofdrm_rage_m3a_device_funcs;
1130 odev->funcs = &ofdrm_rage_m3b_device_funcs;
1133 odev->funcs = &ofdrm_radeon_device_funcs;
1136 odev->funcs = &ofdrm_gxt2000_device_funcs;
1139 odev->funcs = &ofdrm_avivo_device_funcs;
1142 odev->funcs = &ofdrm_qemu_device_funcs;
1186 res = ofdrm_find_fb_resource(odev, &fb_res);
1196 res = ofdrm_find_fb_resource(odev, &fb_res);
1225 if (odev->funcs->cmap_ioremap) {
1226 void __iomem *cmap_base = odev->funcs->cmap_ioremap(odev, of_node, fb_base);
1232 odev->cmap_base = cmap_base;
1240 iosys_map_set_vaddr_iomem(&odev->screen_base, screen_base);
1241 odev->mode = ofdrm_mode(width, height);
1242 odev->format = format;
1243 odev->pitch = linebytes;
1245 drm_dbg(dev, "display mode={" DRM_MODE_FMT "}\n", DRM_MODE_ARG(&odev->mode));
1271 odev->formats, ARRAY_SIZE(odev->formats));
1273 primary_plane = &odev->primary_plane;
1275 odev->formats, nformats,
1285 crtc = &odev->crtc;
1292 if (odev->cmap_base) {
1299 encoder = &odev->encoder;
1307 connector = &odev->connector;
1323 return odev;
1349 struct ofdrm_device *odev;
1354 odev = ofdrm_device_create(&ofdrm_driver, pdev);
1355 if (IS_ERR(odev))
1356 return PTR_ERR(odev);
1357 dev = &odev->dev;
1363 color_mode = drm_format_info_bpp(odev->format, 0);
1365 color_mode = odev->format->depth; // can be 15 or 16