Merge remote-tracking branch 'stable/linux-3.0.y' into develop-3.0
[firefly-linux-kernel-4.4.55.git] / drivers / video / rockchip / hdmi / rk_hdmi_sysfs.c
index a93c3211083918d7daa02c8668fc66cafc96b2f3..e0e6bf4b67ff6c01484f0dc72591cbd7241d7d06 100755 (executable)
@@ -42,7 +42,7 @@ static int hdmi_set_enable(struct rk_display_device *device, int enable)
        else {
                if(hdmi->irq)
                        enable_irq(hdmi->irq);
-               #ifdef CONFIG_HDMI_RK610
+               #if defined(CONFIG_HDMI_RK610) || defined(CONFIG_HDMI_RK2928)
                        queue_delayed_work(hdmi->workqueue, &hdmi->delay_work, 0);
                #endif
                mutex_unlock(&hdmi->enable_mutex);
@@ -73,12 +73,12 @@ static int hdmi_set_mode(struct rk_display_device *device, struct fb_videomode *
        struct hdmi *hdmi = device->priv_data;
        int vic = hdmi_videomode_to_vic(mode);
        
-       if(!hdmi->hotplug)
-               return -1;
        hdmi->autoconfig = HDMI_DISABLE;
        if(vic && hdmi->vic != vic)
        {
                hdmi->vic = vic;
+               if(!hdmi->hotplug)
+                       return 0;
                hdmi->command = HDMI_CONFIG_VIDEO;
                init_completion(&hdmi->complete);
                hdmi->wait = 1;
@@ -110,7 +110,10 @@ static int hdmi_set_scale(struct rk_display_device *device, int direction, int v
        
        if(!hdmi || value < 0 || value > 100)
                return -1;
-                       
+
+       if(!hdmi->hotplug)
+               return 0;
+               
        if(direction == DISPLAY_SCALE_X)
                hdmi->xscale = value;
        else if(direction == DISPLAY_SCALE_Y)