Magellan Linux

Diff of /mcore-src/trunk/mcore-tools/src/modules/basic-video/graphic.control.class.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2755 by niro, Tue Feb 2 14:11:44 2016 UTC revision 2842 by niro, Fri Nov 16 13:43:52 2018 UTC
# Line 7  push_config 10_graphic_driver Line 7  push_config 10_graphic_driver
7  push_config 10_graphic_resolution  push_config 10_graphic_resolution
8  push_config 10_graphic_depth  push_config 10_graphic_depth
9  #push_config 10_graphic_refresh  #push_config 10_graphic_refresh
10    push_config 10_graphic_hdmi
11    
12  help_graphic_resolution()  help_graphic_resolution()
13  {  {
# Line 32  help_graphic_driver() Line 33  help_graphic_driver()
33   control_client "${serial}" help graphic.driver   control_client "${serial}" help graphic.driver
34  }  }
35    
36    help_graphic_hdmi()
37    {
38     local serial="${CLASS_ARGV[0]}"
39     control_client "${serial}" help graphic.hdmi
40    }
41    
42  # set_graphic_driver $serial $value  # set_graphic_driver $serial $value
43  set_graphic_driver()  set_graphic_driver()
44  {  {
# Line 130  push_config_10_graphic_refresh() Line 137  push_config_10_graphic_refresh()
137   control_client "${serial}" set graphic.resolution "${value}"   control_client "${serial}" set graphic.resolution "${value}"
138  }  }
139    
140    # set_graphic_hdmi $serial $value
141    set_graphic_hdmi()
142    {
143     local serial="${CLASS_ARGV[0]}"
144     local value="${CLASS_ARGV[1]}"
145    
146     import_resource cfg_graphic "${serial}" hdmi "${value}"
147    }
148    
149    # control_graphic_hdmi $serial
150    control_graphic_hdmi()
151    {
152     local serial="${CLASS_ARGV[0]}"
153     push_config_10_graphic_hdmi "${serial}"
154    }
155    
156    push_config_10_graphic_hdmi()
157    {
158     local serial="$1"
159     local value
160    
161     value=$(mysqldo "select hdmi from cfg_graphic where serial='${serial}'")
162     control_client "${serial}" set graphic.hdmi "${value}"
163    }
164    
165  push_firstboot_10_graphic_driver()  push_firstboot_10_graphic_driver()
166  {  {
167   local serial="$1"   local serial="$1"
168   local graphic_driver   local graphic_driver
169    
170   nsslsay_queue_init   if [[ ${MCORE_GRAPHIC_HWDETECT_DEEP} = 1 ]]
  nsslsay_queue_add "nocolors"  
  nsslsay_queue_add "get hardware.detect driver graphic"  
  graphic_driver=$(control_client "${serial}" run-queue)  
  if [[ -n ${graphic_driver} ]]  
171   then   then
172   decho "graphic_driver='${graphic_driver}'"   nsslsay_queue_init
173   import_resource cfg_graphic "${serial}" module "${graphic_driver}"   nsslsay_queue_add "nocolors"
174     nsslsay_queue_add "get hardware.detect driver graphic"
175     graphic_driver=$(control_client "${serial}" run-queue)
176     if [[ -n ${graphic_driver} ]]
177     then
178     decho "graphic_driver='${graphic_driver}'"
179     import_resource cfg_graphic "${serial}" module "${graphic_driver}"
180     else
181     decho "no graphic_driver found"
182     fi
183   else   else
184   decho "no graphic_driver found"   # default to runtime autodetection
185     graphic_driver="auto"
186     import_resource cfg_graphic "${serial}" module "${graphic_driver}"
187   fi   fi
188  }  }
189    
# Line 154  push_firstboot_10_graphic_resolution() Line 193  push_firstboot_10_graphic_resolution()
193   local monitor_info   local monitor_info
194   local monitor_resolution   local monitor_resolution
195    
196   nsslsay_queue_init   if [[ ${MCORE_GRAPHIC_HWDETECT_DEEP} = 1 ]]
  nsslsay_queue_add "nocolors"  
  nsslsay_queue_add "get hardware.detect info monitor"  
  monitor_info=$(control_client "${serial}" run-queue)  
  monitor_resolution="${monitor_info##*;}"  
  if [[ -n ${monitor_resolution} ]]  
197   then   then
198   decho "monitor_resolution='${monitor_resolution}'"   nsslsay_queue_init
199   import_resource cfg_graphic "${serial}" resolution "${monitor_resolution}"   nsslsay_queue_add "nocolors"
200     nsslsay_queue_add "get hardware.detect info monitor"
201     monitor_info=$(control_client "${serial}" run-queue)
202     monitor_resolution="${monitor_info##*;}"
203     if [[ -n ${monitor_resolution} ]]
204     then
205     decho "monitor_resolution='${monitor_resolution}'"
206     import_resource cfg_graphic "${serial}" resolution "${monitor_resolution}"
207     else
208     decho "no monitor_resolution found"
209     fi
210   else   else
211   decho "no monitor_resolution found"   monitor_resolution="auto"
212     import_resource cfg_graphic "${serial}" resolution "${monitor_resolution}"
213   fi   fi
214  }  }

Legend:
Removed from v.2755  
changed lines
  Added in v.2842