diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-01-10 21:58:46 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-01-10 21:58:46 +0100 |
commit | 8d0749b4f83bf4768ceae45ee6a79e6e7eddfc2a (patch) | |
tree | 069cc92e93982e0b921c09e71df6f7b68b4cbfa2 /drivers/video | |
parent | Merge tag 'linux-kselftest-kunit-5.17-rc1' of git://git.kernel.org/pub/scm/li... (diff) | |
parent | Merge tag 'amd-drm-next-5.17-2021-12-30' of ssh://gitlab.freedesktop.org/agd5... (diff) | |
download | linux-8d0749b4f83bf4768ceae45ee6a79e6e7eddfc2a.tar.xz linux-8d0749b4f83bf4768ceae45ee6a79e6e7eddfc2a.zip |
Merge tag 'drm-next-2022-01-07' of git://anongit.freedesktop.org/drm/drm
Pull drm updates from Dave Airlie:
"Highlights are support for privacy screens found in new laptops, a
bunch of nomodeset refactoring, and i915 enables ADL-P systems by
default, while starting to add RPL-S support.
vmwgfx adds GEM and support for OpenGL 4.3 features in userspace.
Lots of internal refactorings around dma reservations, and lots of
driver refactoring as well.
Summary:
core:
- add privacy screen support
- move nomodeset option into drm subsystem
- clean up nomodeset handling in drivers
- make drm_irq.c legacy
- fix stack_depot name conflicts
- remove DMA_BUF_SET_NAME ioctl restrictions
- sysfs: send hotplug event
- replace several DRM_* logging macros with drm_*
- move hashtable to legacy code
- add error return from gem_create_object
- cma-helper: improve interfaces, drop CONFIG_DRM_KMS_CMA_HELPER
- kernel.h related include cleanups
- support XRGB2101010 source buffers
ttm:
- don't include drm hashtable
- stop pruning fences after wait
- documentation updates
dma-buf:
- add dma_resv selftest
- add debugfs helpers
- remove dma_resv_get_excl_unlocked
- documentation
- make fences mandatory in dma_resv_add_excl_fence
dp:
- add link training delay helpers
gem:
- link shmem/cma helpers into separate modules
- use dma_resv iteratior
- import dma-buf namespace into gem helper modules
scheduler:
- fence grab fix
- lockdep fixes
bridge:
- switch to managed MIPI DSI helpers
- register and attach during probe fixes
- convert to YAML in several places.
panel:
- add bunch of new panesl
simpledrm:
- support FB_DAMAGE_CLIPS
- support virtual screen sizes
- add Apple M1 support
amdgpu:
- enable seamless boot for DCN 3.01
- runtime PM fixes
- use drm_kms_helper_connector_hotplug_event
- get all fences at once
- use generic drm fb helpers
- PSR/DPCD/LTTPR/DSC/PM/RAS/OLED/SRIOV fixes
- add smart trace buffer (STB) for supported GPUs
- display debugfs entries
- new SMU debug option
- Documentation update
amdkfd:
- IP discovery enumeration refactor
- interface between driver fixes
- SVM fixes
- kfd uapi header to define some sysfs bitfields.
i915:
- support VESA panel backlights
- enable ADL-P by default
- add eDP privacy screen support
- add Raptor Lake S (RPL-S) support
- DG2 page table support
- lots of GuC/HuC fw refactoring
- refactored i915->gt interfaces
- CD clock squashing support
- enable 10-bit gamma support
- update ADL-P DMC fw to v2.14
- enable runtime PM autosuspend by default
- ADL-P DSI support
- per-lane DP drive settings for ICL+
- add support for pipe C/D DMC firmware
- Atomic gamma LUT updates
- remove CCS FB stride restrictions on ADL-P
- VRR platform support for display 11
- add support for display audio codec keepalive
- lots of display refactoring
- fix runtime PM handling during PXP suspend
- improved eviction performance with async TTM moves
- async VMA unbinding improvements
- VMA locking refactoring
- improved error capture robustness
- use per device iommu checks
- drop bits stealing from i915_sw_fence function ptr
- remove dma_resv_prune
- add IC cache invalidation on DG2
nouveau:
- crc fixes
- validate LUTs in atomic check
- set HDMI AVI RGB quant to full
tegra:
- buffer objects reworks for dma-buf compat
- NVDEC driver uAPI support
- power management improvements
etnaviv:
- IOMMU enabled system support
- fix > 4GB command buffer mapping
- close a DoS vector
- fix spurious GPU resets
ast:
- fix i2c initialization
rcar-du:
- DSI output support
exynos:
- replace legacy gpio interface
- implement generic GEM object mmap
msm:
- dpu plane state cleanup in prep for multirect
- dpu debugfs cleanups
- dp support for sc7280
- a506 support
- removal of struct_mutex
- remove old eDP sub-driver
anx7625:
- support MIPI DSI input
- support HDMI audio
- fix reading EDID
lvds:
- fix bridge DT bindings
megachips:
- probe both bridges before registering
dw-hdmi:
- allow interlace on bridge
ps8640:
- enable runtime PM
- support aux-bus
tx358768:
- enable reference clock
- add pulse mode support
ti-sn65dsi86:
- use regmap bulk write
- add PWM support
etnaviv:
- get all fences at once
gma500:
- gem object cleanups
kmb:
- enable fb console
radeon:
- use dma_resv_wait_timeout
rockchip:
- add DSP hold timeout
- suspend/resume fixes
- PLL clock fixes
- implement mmap in GEM object functions
- use generic fbdev emulation
sun4i:
- use CMA helpers without vmap support
vc4:
- fix HDMI-CEC hang with display is off
- power on HDMI controller while disabling
- support 4K@60Hz modes
- support 10-bit YUV 4:2:0 output
vmwgfx:
- fix leak on probe errors
- fail probing on broken hosts
- new placement for MOB page tables
- hide internal BOs from userspace
- implement GEM support
- implement GL 4.3 support
virtio:
- overflow fixes
xen:
- implement mmap as GEM object function
omapdrm:
- fix scatterlist export
- support virtual planes
mediatek:
- MT8192 support
- CMDQ refinement"
* tag 'drm-next-2022-01-07' of git://anongit.freedesktop.org/drm/drm: (1241 commits)
drm/amdgpu: no DC support for headless chips
drm/amd/display: fix dereference before NULL check
drm/amdgpu: always reset the asic in suspend (v2)
drm/amdgpu: put SMU into proper state on runpm suspending for BOCO capable platform
drm/amd/display: Fix the uninitialized variable in enable_stream_features()
drm/amdgpu: fix runpm documentation
amdgpu/pm: Make sysfs pm attributes as read-only for VFs
drm/amdgpu: save error count in RAS poison handler
drm/amdgpu: drop redundant semicolon
drm/amd/display: get and restore link res map
drm/amd/display: support dynamic HPO DP link encoder allocation
drm/amd/display: access hpo dp link encoder only through link resource
drm/amd/display: populate link res in both detection and validation
drm/amd/display: define link res and make it accessible to all link interfaces
drm/amd/display: 3.2.167
drm/amd/display: [FW Promotion] Release 0.0.98
drm/amd/display: Undo ODM combine
drm/amd/display: Add reg defs for DCN303
drm/amd/display: Changed pipe split policy to allow for multi-display pipe split
drm/amd/display: Set optimize_pwr_state for DCN31
...
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/console/vgacon.c | 21 | ||||
-rw-r--r-- | drivers/video/fbdev/core/fbsysfs.c | 14 | ||||
-rw-r--r-- | drivers/video/fbdev/omap/omapfb_main.c | 1 | ||||
-rw-r--r-- | drivers/video/fbdev/omap2/omapfb/dss/display-sysfs.c | 14 | ||||
-rw-r--r-- | drivers/video/fbdev/omap2/omapfb/dss/manager-sysfs.c | 18 | ||||
-rw-r--r-- | drivers/video/fbdev/omap2/omapfb/dss/overlay-sysfs.c | 20 | ||||
-rw-r--r-- | drivers/video/fbdev/omap2/omapfb/omapfb-sysfs.c | 12 | ||||
-rw-r--r-- | drivers/video/fbdev/simplefb.c | 21 |
8 files changed, 41 insertions, 80 deletions
diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c index 9a49ea6b5112..576612f18d59 100644 --- a/drivers/video/console/vgacon.c +++ b/drivers/video/console/vgacon.c @@ -97,30 +97,9 @@ static int vga_video_font_height; static int vga_scan_lines __read_mostly; static unsigned int vga_rolled_over; /* last vc_origin offset before wrap */ -static bool vgacon_text_mode_force; static bool vga_hardscroll_enabled; static bool vga_hardscroll_user_enable = true; -bool vgacon_text_force(void) -{ - return vgacon_text_mode_force; -} -EXPORT_SYMBOL(vgacon_text_force); - -static int __init text_mode(char *str) -{ - vgacon_text_mode_force = true; - - pr_warn("You have booted with nomodeset. This means your GPU drivers are DISABLED\n"); - pr_warn("Any video related functionality will be severely degraded, and you may not even be able to suspend the system properly\n"); - pr_warn("Unless you actually understand what nomodeset does, you should reboot without enabling it\n"); - - return 1; -} - -/* force text mode - used by kernel modesetting */ -__setup("nomodeset", text_mode); - static int __init no_scroll(char *str) { /* diff --git a/drivers/video/fbdev/core/fbsysfs.c b/drivers/video/fbdev/core/fbsysfs.c index 65dae05fff8e..26892940c213 100644 --- a/drivers/video/fbdev/core/fbsysfs.c +++ b/drivers/video/fbdev/core/fbsysfs.c @@ -230,7 +230,7 @@ static ssize_t show_bpp(struct device *device, struct device_attribute *attr, char *buf) { struct fb_info *fb_info = dev_get_drvdata(device); - return snprintf(buf, PAGE_SIZE, "%d\n", fb_info->var.bits_per_pixel); + return sysfs_emit(buf, "%d\n", fb_info->var.bits_per_pixel); } static ssize_t store_rotate(struct device *device, @@ -257,7 +257,7 @@ static ssize_t show_rotate(struct device *device, { struct fb_info *fb_info = dev_get_drvdata(device); - return snprintf(buf, PAGE_SIZE, "%d\n", fb_info->var.rotate); + return sysfs_emit(buf, "%d\n", fb_info->var.rotate); } static ssize_t store_virtual(struct device *device, @@ -285,7 +285,7 @@ static ssize_t show_virtual(struct device *device, struct device_attribute *attr, char *buf) { struct fb_info *fb_info = dev_get_drvdata(device); - return snprintf(buf, PAGE_SIZE, "%d,%d\n", fb_info->var.xres_virtual, + return sysfs_emit(buf, "%d,%d\n", fb_info->var.xres_virtual, fb_info->var.yres_virtual); } @@ -293,7 +293,7 @@ static ssize_t show_stride(struct device *device, struct device_attribute *attr, char *buf) { struct fb_info *fb_info = dev_get_drvdata(device); - return snprintf(buf, PAGE_SIZE, "%d\n", fb_info->fix.line_length); + return sysfs_emit(buf, "%d\n", fb_info->fix.line_length); } static ssize_t store_blank(struct device *device, @@ -381,7 +381,7 @@ static ssize_t show_pan(struct device *device, struct device_attribute *attr, char *buf) { struct fb_info *fb_info = dev_get_drvdata(device); - return snprintf(buf, PAGE_SIZE, "%d,%d\n", fb_info->var.xoffset, + return sysfs_emit(buf, "%d,%d\n", fb_info->var.xoffset, fb_info->var.yoffset); } @@ -390,7 +390,7 @@ static ssize_t show_name(struct device *device, { struct fb_info *fb_info = dev_get_drvdata(device); - return snprintf(buf, PAGE_SIZE, "%s\n", fb_info->fix.id); + return sysfs_emit(buf, "%s\n", fb_info->fix.id); } static ssize_t store_fbstate(struct device *device, @@ -418,7 +418,7 @@ static ssize_t show_fbstate(struct device *device, struct device_attribute *attr, char *buf) { struct fb_info *fb_info = dev_get_drvdata(device); - return snprintf(buf, PAGE_SIZE, "%d\n", fb_info->state); + return sysfs_emit(buf, "%d\n", fb_info->state); } #if IS_ENABLED(CONFIG_FB_BACKLIGHT) diff --git a/drivers/video/fbdev/omap/omapfb_main.c b/drivers/video/fbdev/omap/omapfb_main.c index 3d090d2d9ed9..b495c09e6102 100644 --- a/drivers/video/fbdev/omap/omapfb_main.c +++ b/drivers/video/fbdev/omap/omapfb_main.c @@ -1555,6 +1555,7 @@ static void omapfb_free_resources(struct omapfb_device *fbdev, int state) case 1: dev_set_drvdata(fbdev->dev, NULL); kfree(fbdev); + break; case 0: /* nothing to free */ break; diff --git a/drivers/video/fbdev/omap2/omapfb/dss/display-sysfs.c b/drivers/video/fbdev/omap2/omapfb/dss/display-sysfs.c index 6dbe265b312d..8f355d1caf86 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/display-sysfs.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/display-sysfs.c @@ -19,14 +19,14 @@ static ssize_t display_name_show(struct omap_dss_device *dssdev, char *buf) { - return snprintf(buf, PAGE_SIZE, "%s\n", + return sysfs_emit(buf, "%s\n", dssdev->name ? dssdev->name : ""); } static ssize_t display_enabled_show(struct omap_dss_device *dssdev, char *buf) { - return snprintf(buf, PAGE_SIZE, "%d\n", + return sysfs_emit(buf, "%d\n", omapdss_device_is_enabled(dssdev)); } @@ -59,7 +59,7 @@ static ssize_t display_enabled_store(struct omap_dss_device *dssdev, static ssize_t display_tear_show(struct omap_dss_device *dssdev, char *buf) { - return snprintf(buf, PAGE_SIZE, "%d\n", + return sysfs_emit(buf, "%d\n", dssdev->driver->get_te ? dssdev->driver->get_te(dssdev) : 0); } @@ -93,7 +93,7 @@ static ssize_t display_timings_show(struct omap_dss_device *dssdev, char *buf) dssdev->driver->get_timings(dssdev, &t); - return snprintf(buf, PAGE_SIZE, "%u,%u/%u/%u/%u,%u/%u/%u/%u\n", + return sysfs_emit(buf, "%u,%u/%u/%u/%u,%u/%u/%u/%u\n", t.pixelclock, t.x_res, t.hfp, t.hbp, t.hsw, t.y_res, t.vfp, t.vbp, t.vsw); @@ -143,7 +143,7 @@ static ssize_t display_rotate_show(struct omap_dss_device *dssdev, char *buf) if (!dssdev->driver->get_rotate) return -ENOENT; rotate = dssdev->driver->get_rotate(dssdev); - return snprintf(buf, PAGE_SIZE, "%u\n", rotate); + return sysfs_emit(buf, "%u\n", rotate); } static ssize_t display_rotate_store(struct omap_dss_device *dssdev, @@ -171,7 +171,7 @@ static ssize_t display_mirror_show(struct omap_dss_device *dssdev, char *buf) if (!dssdev->driver->get_mirror) return -ENOENT; mirror = dssdev->driver->get_mirror(dssdev); - return snprintf(buf, PAGE_SIZE, "%u\n", mirror); + return sysfs_emit(buf, "%u\n", mirror); } static ssize_t display_mirror_store(struct omap_dss_device *dssdev, @@ -203,7 +203,7 @@ static ssize_t display_wss_show(struct omap_dss_device *dssdev, char *buf) wss = dssdev->driver->get_wss(dssdev); - return snprintf(buf, PAGE_SIZE, "0x%05x\n", wss); + return sysfs_emit(buf, "0x%05x\n", wss); } static ssize_t display_wss_store(struct omap_dss_device *dssdev, diff --git a/drivers/video/fbdev/omap2/omapfb/dss/manager-sysfs.c b/drivers/video/fbdev/omap2/omapfb/dss/manager-sysfs.c index b52cc1af0959..3ffb1fe4a38a 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/manager-sysfs.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/manager-sysfs.c @@ -22,14 +22,14 @@ static ssize_t manager_name_show(struct omap_overlay_manager *mgr, char *buf) { - return snprintf(buf, PAGE_SIZE, "%s\n", mgr->name); + return sysfs_emit(buf, "%s\n", mgr->name); } static ssize_t manager_display_show(struct omap_overlay_manager *mgr, char *buf) { struct omap_dss_device *dssdev = mgr->get_device(mgr); - return snprintf(buf, PAGE_SIZE, "%s\n", dssdev ? + return sysfs_emit(buf, "%s\n", dssdev ? dssdev->name : "<none>"); } @@ -120,7 +120,7 @@ static ssize_t manager_default_color_show(struct omap_overlay_manager *mgr, mgr->get_manager_info(mgr, &info); - return snprintf(buf, PAGE_SIZE, "%#x\n", info.default_color); + return sysfs_emit(buf, "%#x\n", info.default_color); } static ssize_t manager_default_color_store(struct omap_overlay_manager *mgr, @@ -165,7 +165,7 @@ static ssize_t manager_trans_key_type_show(struct omap_overlay_manager *mgr, key_type = info.trans_key_type; BUG_ON(key_type >= ARRAY_SIZE(trans_key_type_str)); - return snprintf(buf, PAGE_SIZE, "%s\n", trans_key_type_str[key_type]); + return sysfs_emit(buf, "%s\n", trans_key_type_str[key_type]); } static ssize_t manager_trans_key_type_store(struct omap_overlay_manager *mgr, @@ -200,7 +200,7 @@ static ssize_t manager_trans_key_value_show(struct omap_overlay_manager *mgr, mgr->get_manager_info(mgr, &info); - return snprintf(buf, PAGE_SIZE, "%#x\n", info.trans_key); + return sysfs_emit(buf, "%#x\n", info.trans_key); } static ssize_t manager_trans_key_value_store(struct omap_overlay_manager *mgr, @@ -236,7 +236,7 @@ static ssize_t manager_trans_key_enabled_show(struct omap_overlay_manager *mgr, mgr->get_manager_info(mgr, &info); - return snprintf(buf, PAGE_SIZE, "%d\n", info.trans_enabled); + return sysfs_emit(buf, "%d\n", info.trans_enabled); } static ssize_t manager_trans_key_enabled_store(struct omap_overlay_manager *mgr, @@ -275,7 +275,7 @@ static ssize_t manager_alpha_blending_enabled_show( mgr->get_manager_info(mgr, &info); - return snprintf(buf, PAGE_SIZE, "%d\n", + return sysfs_emit(buf, "%d\n", info.partial_alpha_enabled); } @@ -316,7 +316,7 @@ static ssize_t manager_cpr_enable_show(struct omap_overlay_manager *mgr, mgr->get_manager_info(mgr, &info); - return snprintf(buf, PAGE_SIZE, "%d\n", info.cpr_enable); + return sysfs_emit(buf, "%d\n", info.cpr_enable); } static ssize_t manager_cpr_enable_store(struct omap_overlay_manager *mgr, @@ -358,7 +358,7 @@ static ssize_t manager_cpr_coef_show(struct omap_overlay_manager *mgr, mgr->get_manager_info(mgr, &info); - return snprintf(buf, PAGE_SIZE, + return sysfs_emit(buf, "%d %d %d %d %d %d %d %d %d\n", info.cpr_coefs.rr, info.cpr_coefs.rg, diff --git a/drivers/video/fbdev/omap2/omapfb/dss/overlay-sysfs.c b/drivers/video/fbdev/omap2/omapfb/dss/overlay-sysfs.c index 36acf366213a..421dcb7564ad 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/overlay-sysfs.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/overlay-sysfs.c @@ -22,12 +22,12 @@ static ssize_t overlay_name_show(struct omap_overlay *ovl, char *buf) { - return snprintf(buf, PAGE_SIZE, "%s\n", ovl->name); + return sysfs_emit(buf, "%s\n", ovl->name); } static ssize_t overlay_manager_show(struct omap_overlay *ovl, char *buf) { - return snprintf(buf, PAGE_SIZE, "%s\n", + return sysfs_emit(buf, "%s\n", ovl->manager ? ovl->manager->name : "<none>"); } @@ -108,7 +108,7 @@ static ssize_t overlay_input_size_show(struct omap_overlay *ovl, char *buf) ovl->get_overlay_info(ovl, &info); - return snprintf(buf, PAGE_SIZE, "%d,%d\n", + return sysfs_emit(buf, "%d,%d\n", info.width, info.height); } @@ -118,7 +118,7 @@ static ssize_t overlay_screen_width_show(struct omap_overlay *ovl, char *buf) ovl->get_overlay_info(ovl, &info); - return snprintf(buf, PAGE_SIZE, "%d\n", info.screen_width); + return sysfs_emit(buf, "%d\n", info.screen_width); } static ssize_t overlay_position_show(struct omap_overlay *ovl, char *buf) @@ -127,7 +127,7 @@ static ssize_t overlay_position_show(struct omap_overlay *ovl, char *buf) ovl->get_overlay_info(ovl, &info); - return snprintf(buf, PAGE_SIZE, "%d,%d\n", + return sysfs_emit(buf, "%d,%d\n", info.pos_x, info.pos_y); } @@ -166,7 +166,7 @@ static ssize_t overlay_output_size_show(struct omap_overlay *ovl, char *buf) ovl->get_overlay_info(ovl, &info); - return snprintf(buf, PAGE_SIZE, "%d,%d\n", + return sysfs_emit(buf, "%d,%d\n", info.out_width, info.out_height); } @@ -201,7 +201,7 @@ static ssize_t overlay_output_size_store(struct omap_overlay *ovl, static ssize_t overlay_enabled_show(struct omap_overlay *ovl, char *buf) { - return snprintf(buf, PAGE_SIZE, "%d\n", ovl->is_enabled(ovl)); + return sysfs_emit(buf, "%d\n", ovl->is_enabled(ovl)); } static ssize_t overlay_enabled_store(struct omap_overlay *ovl, const char *buf, @@ -231,7 +231,7 @@ static ssize_t overlay_global_alpha_show(struct omap_overlay *ovl, char *buf) ovl->get_overlay_info(ovl, &info); - return snprintf(buf, PAGE_SIZE, "%d\n", + return sysfs_emit(buf, "%d\n", info.global_alpha); } @@ -273,7 +273,7 @@ static ssize_t overlay_pre_mult_alpha_show(struct omap_overlay *ovl, ovl->get_overlay_info(ovl, &info); - return snprintf(buf, PAGE_SIZE, "%d\n", + return sysfs_emit(buf, "%d\n", info.pre_mult_alpha); } @@ -314,7 +314,7 @@ static ssize_t overlay_zorder_show(struct omap_overlay *ovl, char *buf) ovl->get_overlay_info(ovl, &info); - return snprintf(buf, PAGE_SIZE, "%d\n", info.zorder); + return sysfs_emit(buf, "%d\n", info.zorder); } static ssize_t overlay_zorder_store(struct omap_overlay *ovl, diff --git a/drivers/video/fbdev/omap2/omapfb/omapfb-sysfs.c b/drivers/video/fbdev/omap2/omapfb/omapfb-sysfs.c index 2d39dbfa742e..06dc41aa0354 100644 --- a/drivers/video/fbdev/omap2/omapfb/omapfb-sysfs.c +++ b/drivers/video/fbdev/omap2/omapfb/omapfb-sysfs.c @@ -29,7 +29,7 @@ static ssize_t show_rotate_type(struct device *dev, struct fb_info *fbi = dev_get_drvdata(dev); struct omapfb_info *ofbi = FB2OFB(fbi); - return snprintf(buf, PAGE_SIZE, "%d\n", ofbi->rotation_type); + return sysfs_emit(buf, "%d\n", ofbi->rotation_type); } static ssize_t store_rotate_type(struct device *dev, @@ -83,7 +83,7 @@ static ssize_t show_mirror(struct device *dev, struct fb_info *fbi = dev_get_drvdata(dev); struct omapfb_info *ofbi = FB2OFB(fbi); - return snprintf(buf, PAGE_SIZE, "%d\n", ofbi->mirror); + return sysfs_emit(buf, "%d\n", ofbi->mirror); } static ssize_t store_mirror(struct device *dev, @@ -415,7 +415,7 @@ static ssize_t show_size(struct device *dev, struct fb_info *fbi = dev_get_drvdata(dev); struct omapfb_info *ofbi = FB2OFB(fbi); - return snprintf(buf, PAGE_SIZE, "%lu\n", ofbi->region->size); + return sysfs_emit(buf, "%lu\n", ofbi->region->size); } static ssize_t store_size(struct device *dev, struct device_attribute *attr, @@ -492,7 +492,7 @@ static ssize_t show_phys(struct device *dev, struct fb_info *fbi = dev_get_drvdata(dev); struct omapfb_info *ofbi = FB2OFB(fbi); - return snprintf(buf, PAGE_SIZE, "%0x\n", ofbi->region->paddr); + return sysfs_emit(buf, "%0x\n", ofbi->region->paddr); } static ssize_t show_virt(struct device *dev, @@ -501,7 +501,7 @@ static ssize_t show_virt(struct device *dev, struct fb_info *fbi = dev_get_drvdata(dev); struct omapfb_info *ofbi = FB2OFB(fbi); - return snprintf(buf, PAGE_SIZE, "%p\n", ofbi->region->vaddr); + return sysfs_emit(buf, "%p\n", ofbi->region->vaddr); } static ssize_t show_upd_mode(struct device *dev, @@ -516,7 +516,7 @@ static ssize_t show_upd_mode(struct device *dev, if (r) return r; - return snprintf(buf, PAGE_SIZE, "%u\n", (unsigned)mode); + return sysfs_emit(buf, "%u\n", (unsigned int)mode); } static ssize_t store_upd_mode(struct device *dev, struct device_attribute *attr, diff --git a/drivers/video/fbdev/simplefb.c b/drivers/video/fbdev/simplefb.c index b63074fd892e..57541887188b 100644 --- a/drivers/video/fbdev/simplefb.c +++ b/drivers/video/fbdev/simplefb.c @@ -541,26 +541,7 @@ static struct platform_driver simplefb_driver = { .remove = simplefb_remove, }; -static int __init simplefb_init(void) -{ - int ret; - struct device_node *np; - - ret = platform_driver_register(&simplefb_driver); - if (ret) - return ret; - - if (IS_ENABLED(CONFIG_OF_ADDRESS) && of_chosen) { - for_each_child_of_node(of_chosen, np) { - if (of_device_is_compatible(np, "simple-framebuffer")) - of_platform_device_create(np, NULL, NULL); - } - } - - return 0; -} - -fs_initcall(simplefb_init); +module_platform_driver(simplefb_driver); MODULE_AUTHOR("Stephen Warren <swarren@wwwdotorg.org>"); MODULE_DESCRIPTION("Simple framebuffer driver"); |