simpledrm.c (d25654b3fad9906ca80912701fd4bd6e2419f54d) | simpledrm.c (216b9bbaeaea96b7f05c220f61855d174be972d8) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2 3#include <linux/clk.h> 4#include <linux/of_clk.h> 5#include <linux/minmax.h> 6#include <linux/platform_data/simplefb.h> 7#include <linux/platform_device.h> 8#include <linux/regulator/consumer.h> --- 556 unchanged lines hidden (view full) --- 565 DRM_GEM_SHADOW_PLANE_FUNCS, 566}; 567 568static enum drm_mode_status simpledrm_crtc_helper_mode_valid(struct drm_crtc *crtc, 569 const struct drm_display_mode *mode) 570{ 571 struct simpledrm_device *sdev = simpledrm_device_of_dev(crtc->dev); 572 | 1// SPDX-License-Identifier: GPL-2.0-only 2 3#include <linux/clk.h> 4#include <linux/of_clk.h> 5#include <linux/minmax.h> 6#include <linux/platform_data/simplefb.h> 7#include <linux/platform_device.h> 8#include <linux/regulator/consumer.h> --- 556 unchanged lines hidden (view full) --- 565 DRM_GEM_SHADOW_PLANE_FUNCS, 566}; 567 568static enum drm_mode_status simpledrm_crtc_helper_mode_valid(struct drm_crtc *crtc, 569 const struct drm_display_mode *mode) 570{ 571 struct simpledrm_device *sdev = simpledrm_device_of_dev(crtc->dev); 572 |
573 if (mode->hdisplay != sdev->mode.hdisplay && 574 mode->vdisplay != sdev->mode.vdisplay) 575 return MODE_ONE_SIZE; 576 else if (mode->hdisplay != sdev->mode.hdisplay) 577 return MODE_ONE_WIDTH; 578 else if (mode->vdisplay != sdev->mode.vdisplay) 579 return MODE_ONE_HEIGHT; 580 581 return MODE_OK; | 573 return drm_crtc_helper_mode_valid_fixed(crtc, mode, &sdev->mode); |
582} 583 584static int simpledrm_crtc_helper_atomic_check(struct drm_crtc *crtc, 585 struct drm_atomic_state *new_state) 586{ 587 struct drm_crtc_state *new_crtc_state = drm_atomic_get_new_crtc_state(new_state, crtc); 588 int ret; 589 --- 358 unchanged lines hidden --- | 574} 575 576static int simpledrm_crtc_helper_atomic_check(struct drm_crtc *crtc, 577 struct drm_atomic_state *new_state) 578{ 579 struct drm_crtc_state *new_crtc_state = drm_atomic_get_new_crtc_state(new_state, crtc); 580 int ret; 581 --- 358 unchanged lines hidden --- |