|
@@ -804,23 +804,10 @@ static const struct file_operations tegra_drm_fops = {
|
|
.llseek = noop_llseek,
|
|
.llseek = noop_llseek,
|
|
};
|
|
};
|
|
|
|
|
|
-static struct drm_crtc *tegra_crtc_from_pipe(struct drm_device *drm,
|
|
|
|
- unsigned int pipe)
|
|
|
|
-{
|
|
|
|
- struct drm_crtc *crtc;
|
|
|
|
-
|
|
|
|
- list_for_each_entry(crtc, &drm->mode_config.crtc_list, head) {
|
|
|
|
- if (pipe == drm_crtc_index(crtc))
|
|
|
|
- return crtc;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- return NULL;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
static u32 tegra_drm_get_vblank_counter(struct drm_device *drm,
|
|
static u32 tegra_drm_get_vblank_counter(struct drm_device *drm,
|
|
unsigned int pipe)
|
|
unsigned int pipe)
|
|
{
|
|
{
|
|
- struct drm_crtc *crtc = tegra_crtc_from_pipe(drm, pipe);
|
|
|
|
|
|
+ struct drm_crtc *crtc = drm_crtc_from_index(drm, pipe);
|
|
struct tegra_dc *dc = to_tegra_dc(crtc);
|
|
struct tegra_dc *dc = to_tegra_dc(crtc);
|
|
|
|
|
|
if (!crtc)
|
|
if (!crtc)
|
|
@@ -831,7 +818,7 @@ static u32 tegra_drm_get_vblank_counter(struct drm_device *drm,
|
|
|
|
|
|
static int tegra_drm_enable_vblank(struct drm_device *drm, unsigned int pipe)
|
|
static int tegra_drm_enable_vblank(struct drm_device *drm, unsigned int pipe)
|
|
{
|
|
{
|
|
- struct drm_crtc *crtc = tegra_crtc_from_pipe(drm, pipe);
|
|
|
|
|
|
+ struct drm_crtc *crtc = drm_crtc_from_index(drm, pipe);
|
|
struct tegra_dc *dc = to_tegra_dc(crtc);
|
|
struct tegra_dc *dc = to_tegra_dc(crtc);
|
|
|
|
|
|
if (!crtc)
|
|
if (!crtc)
|
|
@@ -844,7 +831,7 @@ static int tegra_drm_enable_vblank(struct drm_device *drm, unsigned int pipe)
|
|
|
|
|
|
static void tegra_drm_disable_vblank(struct drm_device *drm, unsigned int pipe)
|
|
static void tegra_drm_disable_vblank(struct drm_device *drm, unsigned int pipe)
|
|
{
|
|
{
|
|
- struct drm_crtc *crtc = tegra_crtc_from_pipe(drm, pipe);
|
|
|
|
|
|
+ struct drm_crtc *crtc = drm_crtc_from_index(drm, pipe);
|
|
struct tegra_dc *dc = to_tegra_dc(crtc);
|
|
struct tegra_dc *dc = to_tegra_dc(crtc);
|
|
|
|
|
|
if (crtc)
|
|
if (crtc)
|